]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix and simplify last change in bookmark.el.
authorBasil L. Contovounesios <contovob@tcd.ie>
Tue, 4 May 2021 09:36:56 +0000 (10:36 +0100)
committerBasil L. Contovounesios <contovob@tcd.ie>
Tue, 4 May 2021 09:54:24 +0000 (10:54 +0100)
lisp/bookmark.el

index 4e717a7dc0561d79fe1a418e244db16fd4f12efb..3b7519059f7fa2e4ca35701e43efa25dad43456f 100644 (file)
@@ -169,7 +169,7 @@ A non-nil value may result in truncated bookmark names."
 
 (defcustom bookmark-fontify t
   "Whether to colorize a bookmarked line.
-If non-nil, setting a bookmark wil colorize the current line with
+If non-nil, setting a bookmark will colorize the current line with
 `bookmark-face'."
   :type  'boolean
   :version "28.1")
@@ -183,18 +183,18 @@ If non-nil, setting a bookmark wil colorize the current line with
 (defface bookmark-face
   '((((class grayscale)
       (background light))
-     (:background "DimGray"))
+     :background "DimGray")
     (((class grayscale)
       (background dark))
-     (:background "LightGray"))
+     :background "LightGray")
     (((class color)
       (background light))
-     (:foreground "White" :background "DarkOrange1"))
+     :foreground "White" :background "DarkOrange1")
     (((class color)
       (background dark))
-     (:foreground "Black" :background "DarkOrange1")))
+     :foreground "Black" :background "DarkOrange1"))
   "Face used to highlight current line."
-  :version "28.2")
+  :version "28.1")
 
 ;;; No user-serviceable parts beyond this point.
 
@@ -451,23 +451,22 @@ In other words, return all information but the name."
 
 (defun bookmark--fontify ()
   "Apply a colorized overlay to the bookmarked location.
-See defcustom variable `bookmark-fontify'."
+See user option `bookmark-fontify'."
   (let ((bm (make-overlay (point-at-bol)
-                          (min (point-max) (+ 1 (point-at-eol))))))
+                          (min (point-max) (1+ (point-at-eol))))))
     (overlay-put bm 'category 'bookmark)
     (overlay-put bm 'face 'bookmark-face)))
 
 (defun bookmark--unfontify (bm)
   "Remove a bookmark's colorized overlay.
 BM is a bookmark as returned from function `bookmark-get-bookmark'.
-See defcustom variable `bookmark-fontify'."
+See user option `bookmark-fontify'."
   (let ((filename (assq 'filename bm))
         (pos      (assq 'position bm))
-        (buffers  (buffer-list))
-        buf overlays found temp)
+        overlays found temp)
     (when filename (setq filename (expand-file-name (cdr filename))))
     (when pos (setq pos (cdr pos)))
-    (while (setq buf (pop buffers))
+    (dolist (buf (buffer-list))
       (with-current-buffer buf
         (when (equal filename buffer-file-name)
           (setq overlays (overlays-at pos))