* Re: master d4ae640: * lisp/help-fns.el (help--symbol-class): New function.
[not found] ` <20210603204159.B8F88209AA@vcs0.savannah.gnu.org>
@ 2021-06-03 20:45 ` Dmitry Gutov
2021-06-03 20:51 ` Juri Linkov
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Gutov @ 2021-06-03 20:45 UTC (permalink / raw)
To: emacs-devel, Juri Linkov
On 03.06.2021 23:41, Juri Linkov wrote:
> +(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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master d4ae640: * lisp/help-fns.el (help--symbol-class): New function.
2021-06-03 20:45 ` master d4ae640: * lisp/help-fns.el (help--symbol-class): New function Dmitry Gutov
@ 2021-06-03 20:51 ` Juri Linkov
2021-06-03 21:01 ` Dmitry Gutov
0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2021-06-03 20:51 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: emacs-devel
>> +(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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master d4ae640: * lisp/help-fns.el (help--symbol-class): New function.
2021-06-03 20:51 ` Juri Linkov
@ 2021-06-03 21:01 ` Dmitry Gutov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Gutov @ 2021-06-03 21:01 UTC (permalink / raw)
To: Juri Linkov, Daniel Mendler, Jens C. Jensen; +Cc: emacs-devel
On 03.06.2021 23:51, Juri Linkov wrote:
>>> +(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.
I think it calls for more design discussion up front, to satisfy all
parties.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-03 21:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210603204158.4014.59130@vcs0.savannah.gnu.org>
[not found] ` <20210603204159.B8F88209AA@vcs0.savannah.gnu.org>
2021-06-03 20:45 ` master d4ae640: * lisp/help-fns.el (help--symbol-class): New function Dmitry Gutov
2021-06-03 20:51 ` Juri Linkov
2021-06-03 21:01 ` Dmitry Gutov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.