[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Supporting newer Emacs features in older Emacs versions without warn
From: |
Basil L. Contovounesios |
Subject: |
Re: Supporting newer Emacs features in older Emacs versions without warnings? |
Date: |
Tue, 28 Sep 2021 11:26:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Monnier [2021-09-27 14:38 -0400] wrote:
> 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 #'...)
>
> ?
It faces the same problem: shortdoc somehow needs to know about 'foo'
a priori, for interactive group name completion.
>> 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).
I'll try to propose something soon™ unless someone beats me to it.
Thanks,
--
Basil
- 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, 2021/09/27
- Re: Supporting newer Emacs features in older Emacs versions without warnings?,
Basil L. Contovounesios <=
- 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