diff --git a/lisp/doom-compat.el b/lisp/doom-compat.el index 42dfc1bc5..5fc74f2ee 100644 --- a/lisp/doom-compat.el +++ b/lisp/doom-compat.el @@ -105,9 +105,10 @@ and return the value found in PLACE instead." ,(funcall setter val) ,val)))))) -;; Introduced in emacs-mirror/emacs@f117b5df4dc6 -(unless (fboundp 'bol) (defalias 'bol #'line-beginning-position)) -(unless (fboundp 'eol) (defalias 'eol #'line-end-position)) +;; Introduced in emacs-mirror/emacs@f117b5df4dc6, renamed to pos-* in +;; emacs-mirror/emacs@2614e5321639 +(unless (fboundp 'pos-bol) (defalias 'pos-bol #'line-beginning-position)) +(unless (fboundp 'pos-eol) (defalias 'pos-eol #'line-end-position)) ;; Introduced in Emacs 29+ (unless (boundp 'major-mode-remap-alist) diff --git a/lisp/lib/print.el b/lisp/lib/print.el index 36cd49e7c..8accafd9a 100644 --- a/lisp/lib/print.el +++ b/lisp/lib/print.el @@ -344,7 +344,7 @@ based on the print level of the message. For example: (letf! (defun current-fill-column () (let ((target (funcall current-fill-column))) (save-excursion - (goto-char (line-beginning-position)) + (goto-char (pos-bol)) (let ((n 0) (c 0)) (while (and (not (eolp)) (<= n target)) diff --git a/lisp/lib/ui.el b/lisp/lib/ui.el index a295b3233..2b9e0035c 100644 --- a/lisp/lib/ui.el +++ b/lisp/lib/ui.el @@ -200,7 +200,7 @@ narrowing doesn't affect other windows displaying the same buffer. Call Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/" (interactive (if (region-active-p) (list (doom-region-beginning) (doom-region-end)) - (list (bol) (eol)))) + (list (pos-bol) (pos-eol)))) (deactivate-mark) (let ((orig-buffer (current-buffer))) (with-current-buffer (switch-to-buffer (clone-indirect-buffer nil nil)) @@ -241,7 +241,7 @@ If the current buffer is not an indirect buffer, it is `widen'ed." "Narrow the buffer to BEG END. If narrowed, widen it." (interactive (if (region-active-p) (list (doom-region-beginning) (doom-region-end)) - (list (bol) (eol)))) + (list (pos-bol) (pos-eol)))) (if (buffer-narrowed-p) (widen) (narrow-to-region beg end))) diff --git a/modules/lang/beancount/autoload.el b/modules/lang/beancount/autoload.el index 5b2729f67..4053e3300 100644 --- a/modules/lang/beancount/autoload.el +++ b/modules/lang/beancount/autoload.el @@ -197,7 +197,7 @@ If DISABLE? (universal arg), reveal hidden accounts without prompting." (seq-let (beg end) (beancount-find-transaction-extents (point)) ;; TODO: Highlight entry (ala org-occur) (if (= beg end) - (setq end (save-excursion (goto-char end) (1+ (eol))))) + (setq end (save-excursion (goto-char end) (1+ (pos-eol))))) (put-text-property start beg 'invisible t) (put-text-property start beg 'display placeholder) (setq start end)))) @@ -228,7 +228,7 @@ Return non-nil if successful." ;; Ensures "jump to top of current transaction" behavior that is ;; common for jump-to-previous commands like this in other Emacs modes ;; (like org-mode). - (or (bolp) (goto-char (eol))) + (or (bolp) (goto-char (pos-eol))) (re-search-backward (concat beancount-timestamped-directive-regexp "\\|" beancount-transaction-regexp))) diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 98b21875f..2e4ade158 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -66,7 +66,7 @@ Intended to replace `lisp-outline-level'." (re-search-backward "\\_<:\\(?:\\sw\\|\\s_\\)+\\_>" ;; Find a keyword. doom-start 'noerror)) - (unless (looking-back "(" (bol)) + (unless (looking-back "(" (pos-bol)) (let ((kw-syntax (syntax-ppss))) (when (and (= (ppss-depth kw-syntax) doom-depth) (not (ppss-string-terminator kw-syntax))