branch: externals/marginalia commit 5d15697804a6ee2d46b0187eea2bf0d01ed422b1 Author: Wojciech Siewierski <wojci...@siewierski.eu> Commit: Daniel Mendler <m...@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."