emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/marginalia 5d15697 169/241: marginalia-annotate-bookmar


From: Stefan Monnier
Subject: [elpa] externals/marginalia 5d15697 169/241: marginalia-annotate-bookmark with no front context still returns filename
Date: Fri, 28 May 2021 20:49:20 -0400 (EDT)

branch: externals/marginalia
commit 5d15697804a6ee2d46b0187eea2bf0d01ed422b1
Author: Wojciech Siewierski <wojciech@siewierski.eu>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    marginalia-annotate-bookmark with no front context still returns filename
    
    The `(not front)` condition in this function was also effectively
    never true.
---
 marginalia.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/marginalia.el b/marginalia.el
index 54367d7..653f679 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -519,14 +519,14 @@ Similar to `marginalia-annotate-symbol', but does not 
show symbol class."
 
 (defun marginalia-annotate-bookmark (cand)
   "Annotate bookmark CAND with its file name and front context string."
-  (when-let ((bm (bookmark-get-bookmark-record (assoc cand bookmark-alist)))
-             (front (alist-get 'front-context-string bm)))
-    (marginalia--fields
-     ((alist-get 'filename bm) :width 40 :face 'marginalia-file-name)
-     ((if (or (not front) (string= front ""))
-          ""
-        (concat (replace-regexp-in-string "\n" "\\\\n" front) "…"))
-      :width 20 :face 'marginalia-documentation))))
+  (when-let ((bm (bookmark-get-bookmark-record (assoc cand bookmark-alist))))
+    (let ((front (alist-get 'front-context-string bm)))
+      (marginalia--fields
+       ((alist-get 'filename bm) :width 40 :face 'marginalia-file-name)
+       ((if (or (not front) (string= front ""))
+            ""
+          (concat (replace-regexp-in-string "\n" "\\\\n" front) "…"))
+        :width 20 :face 'marginalia-documentation)))))
 
 (defun marginalia-annotate-customize-group (cand)
   "Annotate customization group CAND with its documentation string."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]