[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`
From: |
Lars Ingebrigtsen |
Subject: |
bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook` |
Date: |
Sun, 04 Jul 2021 03:09:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Michael Heerdegen <michael_heerdegen@web.de> writes:
> If you ask me: that problem exists mainly for end users and their init
> files, it's not that we have a problem in Emacs. Instead we should try
> to provide a better tool for users to add stuff to hooks conveniently.
>
> Since the problem of identification is not trivial - how about forcing
> the user to specify a name? How about a macro like
>
> (user-add-hook foo-hook my-configure-foo-keybindings
> code...) ?
Some other languages have the ability to add names to anonymous
functions (yes, a contradiction in terms) to aid debugging and the like.
We could also extend our `lambda' with an optional name -- it seems like
that could be generally useful beyond this particular use case -- and
then this new add-hook function could refuse to accept name-less
lambdas...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`, Michael Heerdegen, 2021/07/03
- bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`,
Lars Ingebrigtsen <=
- bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`, Michael Heerdegen, 2021/07/03
- bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`, Lars Ingebrigtsen, 2021/07/03
- bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`, Michael Heerdegen, 2021/07/04
- bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`, Lars Ingebrigtsen, 2021/07/04
- bug#47992: [External] : bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`, Drew Adams, 2021/07/04
- bug#47992: [External] : bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`, Michael Heerdegen, 2021/07/04
- bug#47992: [External] : bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`, Lars Ingebrigtsen, 2021/07/05
- bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`, Richard Stallman, 2021/07/05
- bug#47992: [External] : bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`, Drew Adams, 2021/07/05
- bug#47992: [External] : bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`, Michael Heerdegen, 2021/07/05