[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Supporting newer Emacs features in older Emacs versions without warn
From: |
Stefan Monnier |
Subject: |
Re: Supporting newer Emacs features in older Emacs versions without warnings? |
Date: |
Mon, 27 Sep 2021 14:38:24 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Basil L. Contovounesios [2021-09-26 17:49:33] wrote:
> Stefan Monnier [2021-09-24 09:14 -0400] wrote:
>> Can you guys come up with an idea of how to change shortdoc.el so that
>> your package can do its job more easily and cleanly?
>> [ Ideally without having to use eval-after-load nor having to require
>> shortdoc. ]
>
> Apart from eval-after-load, what other mechanisms do we have that can
> register information before a package is loaded? There's obarray and
> there are hooks, is there something else?
For buffer-local info, the standard way is for the amjor mode to do
(setq-local <foo> <bar>)
Example of <foo> include `font-lock-defaults` (back when font-lock was
not enabled by default), `outline-regexp`, `imenu-generic-expression`, ...
Here I think we want something that's not buffer-local, so we'd need
something else. Not sure what's the best option. Maybe
(add-hook 'shortdoc-foo-functions #'...)
?
> The entrypoint command shortdoc-display-group could, every time it is
> invoked, scan obarray for certain symbol properties, or run a hook, to
> accumulate auxiliary shortdoc forms, in addition to those that were
> already permanently stored in shortdoc--groups.
That's also an option, yes (scanning `obarray` is fairly quick).
Stefan
- Supporting newer Emacs features in older Emacs versions without warnings?, Adam Porter, 2021/09/22
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Basil L. Contovounesios, 2021/09/23
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Adam Porter, 2021/09/24
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Stefan Monnier, 2021/09/24
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Adam Porter, 2021/09/24
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Basil L. Contovounesios, 2021/09/26
- Re: Supporting newer Emacs features in older Emacs versions without warnings?,
Stefan Monnier <=
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Basil L. Contovounesios, 2021/09/28
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Stefan Monnier, 2021/09/28
- Re: Supporting newer Emacs features in older Emacs versions without warnings?, Basil L. Contovounesios, 2021/09/28