emacs-devel
[Top][All Lists]
Advanced

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

Re: [ELPA] New package: marginalia


From: Daniel Mendler
Subject: Re: [ELPA] New package: marginalia
Date: Wed, 2 Jun 2021 17:07:54 +0200

On 6/2/21 4:46 PM, Jens C. Jensen wrote:
> I ended up with something like:
> #+begin_src emacs-lisp
> (cond
>  ((commandp sym) 'command)
>  ((macrop sym) 'macro)
>  ((functionp sym) 'function)
>  ((booleanp sym) 'boolean)
>  ((keywordp sym) 'keyword)
>  ((keymapp (symbol-value sym)) 'keymap)
>  ((facep sym) 'face)
>  ((boundp sym) 'variable)
>  ((symbolp sym) 'symbol))
> #+end_src
> 
> It has worked fine for my use-case thus far, but is neither complete nor 
> robust enough for documentation, as Daniel pointed out emacs-lisp is a Lisp-2 
> - the above code completely misses this point.

Yes exactly, such a classifier should return a list of types. The
Marginalia symbol annotator gets this right and annotates each symbol
with multiple characters. I like this annotation functionality when
doing Elisp hacking. Also `marginalia-annotate-variable` is quite useful.

Jens, where are you using this classifier in your configuration?

Daniel



reply via email to

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