emacs-devel
[Top][All Lists]
Advanced

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

Re: master d4ae640: * lisp/help-fns.el (help--symbol-class): New functio


From: Juri Linkov
Subject: Re: master d4ae640: * lisp/help-fns.el (help--symbol-class): New function.
Date: Thu, 03 Jun 2021 23:51:11 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> +(defun help--symbol-class (s)
>> +  "Return symbol class characters for symbol S."
>> +  (when (stringp s)
>> +    (setq s (intern-soft s)))
>> +  (cond ((commandp s)
>> +         "c")                           ; command
>> +        ((eq (car-safe (symbol-function s)) 'macro)
>> +         "m")                           ; macro
>> +        ((fboundp s)
>> +         "f")                           ; function
>> +        ((custom-variable-p s)
>> +         "u")                           ; user option
>> +        ((boundp s)
>> +         "v")                           ; variable
>> +        ((facep s)
>> +         "a")                           ; fAce
>> +        ((and (fboundp 'cl-find-class)
>> +              (cl-find-class s))
>> +         "t")                           ; CL type
>> +        (" ")                           ; something else
>> +        ))
>
> Looks awfully similar to elisp--company-kind.

Feel free to improve it, taking into account wishes expressed by
Daniel and Jens.



reply via email to

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