summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2024-03-25 15:51:07 +0200
committerEli Zaretskii <eliz@gnu.org>2024-03-25 15:51:07 +0200
commit7fba25cf5344f5c3507aedf59e6ae099e7662508 (patch)
tree30ddbe35a6da1856e0d80705963c1572e7890245 /lisp
parenta79b424f7fdecf577e46c5fea6ee3d921e606596 (diff)
downloademacs-7fba25cf5344f5c3507aedf59e6ae099e7662508.tar.gz
Fix removal of bookmark's fringe mark in Info and Dired
* lisp/bookmark.el (bookmark-buffer-file-name): Support Info buffers. (bookmark--remove-fringe-mark): Call 'bookmark-buffer-file-name' instead of using 'buffer-file-name', which could be nil. (Bug#69974)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/bookmark.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 60dd61a5ac8..bf2357207d8 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -515,10 +515,11 @@ See user option `bookmark-fringe-mark'."
(non-essential t)
overlays found temp)
(when (and pos filename)
- (setq filename (expand-file-name filename))
+ (setq filename (abbreviate-file-name (expand-file-name filename)))
(dolist (buf (buffer-list))
(with-current-buffer buf
- (when (equal filename buffer-file-name)
+ (when (equal filename
+ (ignore-errors (bookmark-buffer-file-name)))
(setq overlays
(save-excursion
(goto-char pos)
@@ -1192,6 +1193,8 @@ it to the name of the bookmark currently being set, advancing
(if (stringp dired-directory)
dired-directory
(car dired-directory)))
+ ((and (boundp 'Info-current-file) (stringp Info-current-file))
+ Info-current-file)
(t (error "Buffer not visiting a file or directory")))))
(defvar bookmark--watch-already-asked-mtime nil