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

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

[elpa] externals/marginalia ab2ed46651 1/2: Add "&" as symbol class char


From: ELPA Syncer
Subject: [elpa] externals/marginalia ab2ed46651 1/2: Add "&" as symbol class character for aliases (#144)
Date: Thu, 21 Jul 2022 14:57:41 -0400 (EDT)

branch: externals/marginalia
commit ab2ed46651bef3fd2a1e1b4517e1c5494ae47409
Author: Bruno Heridet <delapouite@gmail.com>
Commit: GitHub <noreply@github.com>

    Add "&" as symbol class character for aliases (#144)
---
 marginalia.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/marginalia.el b/marginalia.el
index 3cd2b11c0c..9721107da0 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -426,8 +426,8 @@ FACE is the name of the face, with which the field should 
be propertized."
   (let ((flist (indirect-function fun)))
     (advice--p (if (eq 'macro (car-safe flist)) (cdr flist) flist))))
 
-;; Symbol class characters from Emacs 28 
`help--symbol-completion-table-affixation'
-;; ! and * are our additions
+;; Symbol class characters from Emacs 28 `help--symbol-class'
+;; ! and & are our additions
 (defun marginalia--symbol-class (s)
   "Return symbol class characters for symbol S.
 
@@ -443,12 +443,14 @@ s side-effect-free
 @ autoloaded
 ! advised
 - obsolete
+& alias
 
 Variable:
 u custom (U modified compared to global value)
 v variable
 l local (L modified compared to default value)
 - obsolete
+& alias
 
 Other:
 a face
@@ -469,7 +471,8 @@ t cl-type"
         (t "f"))
        (and (autoloadp (symbol-function s)) "@")
        (and (marginalia--advised s) "!")
-       (and (get s 'byte-obsolete-info) "-")))
+       (and (get s 'byte-obsolete-info) "-")
+       (and (caddr (help-fns--analyze-function s)) "&")))
     (when (boundp s)
       (concat
        (when (local-variable-if-set-p s)
@@ -484,7 +487,8 @@ t cl-type"
                        (eval (car (get s 'standard-value))))))
                "U" "u")
          "v")
-       (and (get s 'byte-obsolete-variable) "-")))
+       (and (get s 'byte-obsolete-variable) "-")
+       (and (not (eq s (condition-case nil (indirect-variable s) (error s)))) 
"&")))
     (and (facep s) "a")
     (and (fboundp 'cl-find-class) (cl-find-class s) "t"))))
 



reply via email to

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