[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 52b240b29b: Prefer pos-bol and pos-eol in bookmark.el
From: |
Stefan Kangas |
Subject: |
master 52b240b29b: Prefer pos-bol and pos-eol in bookmark.el |
Date: |
Sun, 21 Aug 2022 12:05:12 -0400 (EDT) |
branch: master
commit 52b240b29b7bfc9819f52e8312ce95c9aaa2a78e
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
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.
---
lisp/bookmark.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index b3b3660902..8dfc16bf9f 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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 52b240b29b: Prefer pos-bol and pos-eol in bookmark.el,
Stefan Kangas <=