diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2022-08-21 18:00:53 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-08-21 18:04:40 +0200 |
commit | 52b240b29b7bfc9819f52e8312ce95c9aaa2a78e (patch) | |
tree | 639a2219d17fab7061cd00afedb5cf565fa764e9 /lisp/bookmark.el | |
parent | fe194f179d74de54128a3fdc294175e361146caf (diff) | |
download | emacs-52b240b29b7bfc9819f52e8312ce95c9aaa2a78e.tar.gz |
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.
Diffstat (limited to 'lisp/bookmark.el')
-rw-r--r-- | lisp/bookmark.el | 8 |
1 files changed, 4 insertions, 4 deletions
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)) |