From: Stefan Kangas Date: Sun, 21 Aug 2022 16:00:53 +0000 (+0200) Subject: Prefer pos-bol and pos-eol in bookmark.el X-Git-Tag: emacs-29.0.90~1893^2~119 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=52b240b29b7bfc9819f52e8312ce95c9aaa2a78e;p=emacs.git Prefer pos-bol and pos-eol in bookmark.el * lisp/bookmark.el (bookmark--set-fringe-mark) (bookmark--remove-fringe-mark, bookmark-kill-line) (bookmark--jump-via): Prefer pos-bol and pos-eol. --- diff --git a/lisp/bookmark.el b/lisp/bookmark.el index b3b36609022..8dfc16bf9fa 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -495,7 +495,7 @@ In other words, return all information but the name." (defun bookmark--set-fringe-mark () "Apply a colorized overlay to the bookmarked location. See user option `bookmark-fringe-mark'." - (let ((bm (make-overlay (point-at-bol) (1+ (point-at-bol))))) + (let ((bm (make-overlay (pos-bol) (1+ (pos-bol))))) (overlay-put bm 'category 'bookmark) (overlay-put bm 'evaporate t) (overlay-put bm 'before-string @@ -518,7 +518,7 @@ See user option `bookmark-fringe-mark'." (setq overlays (save-excursion (goto-char pos) - (overlays-in (point-at-bol) (1+ (point-at-bol))))) + (overlays-in (pos-bol) (1+ (pos-bol))))) (while (and (not found) (setq temp (pop overlays))) (when (eq 'bookmark (overlay-get temp 'category)) (delete-overlay (setq found temp)))))))))) @@ -1014,7 +1014,7 @@ the list of bookmarks.)" "Kill from point to end of line. If optional arg NEWLINE-TOO is non-nil, delete the newline too. Does not affect the kill ring." - (let ((eol (line-end-position))) + (let ((eol (pos-eol))) (delete-region (point) eol) (when (and newline-too (= (following-char) ?\n)) (delete-char 1)))) @@ -1221,7 +1221,7 @@ and then show any annotations for this bookmark." ;; FIXME: we used to only run bookmark-after-jump-hook in ;; `bookmark-jump' itself, but in none of the other commands. (when bookmark-fringe-mark - (let ((overlays (overlays-in (point-at-bol) (1+ (point-at-bol)))) + (let ((overlays (overlays-in (pos-bol) (1+ (pos-bol)))) temp found) (while (and (not found) (setq temp (pop overlays))) (when (eq 'bookmark (overlay-get temp 'category))