[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New Package for GNU ELPA
From: |
John Wiegley |
Subject: |
Re: New Package for GNU ELPA |
Date: |
Fri, 27 May 2016 10:19:09 -0700 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.94 (darwin) |
>>>>> Kaushal Modi <address@hidden> writes:
> IMO the standard add-hook and remove-hook don't seem to need syntactic
> sugar. The macros in the package lack many things that the default
> add-hook/remove-hook do and also it is more verbose.
> It's not too difficult to define a foo function and add that to a hook using
> the standard way. And ALWAYS explicitly defining a function first is a good
> rule of thumb. It applies to hooks and advices both.
I like this package. First, it's not being suggested for core, or as an
alternative to standard methods. Second, just because you *can* do something
in a manual way, is no reason to argue against convenience. I would both
welcome this addition, and start using it.
As a bonus, it could be implemented as a macro that does actually generates a
new function and adds that function symbol to the hook, in such a way that if
you change the body and re-evaluate with C-M-x, it removes the old function,
and adds the changed one. Then it would be identical to what "best practices"
say one should do when adding a hook, but with a clearer declaration of
intent: "I want the following FORMS to happen when the hook is run".
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
signature.asc
Description: PGP signature