all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Wiegley <jwiegley@gmail.com>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: Ian Dunn <dunni@gnu.org>, emacs-devel@gnu.org
Subject: Re: New Package for GNU ELPA
Date: Fri, 27 May 2016 10:19:09 -0700	[thread overview]
Message-ID: <m2mvnbpgfm.fsf@newartisans.com> (raw)
In-Reply-To: <CAFyQvY3QbzasuWFv5vqSWbNJCSJxoYAZbpTXfxKWpU7bMjZ0Jg@mail.gmail.com> (Kaushal Modi's message of "Fri, 27 May 2016 10:26:14 +0000")

[-- Attachment #1: Type: text/plain, Size: 1358 bytes --]

>>>>> Kaushal Modi <kaushal.modi@gmail.com> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 629 bytes --]

  reply	other threads:[~2016-05-27 17:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-27  2:00 New Package for GNU ELPA Ian Dunn
2016-05-27 10:26 ` Kaushal Modi
2016-05-27 17:19   ` John Wiegley [this message]
2016-05-28  1:16     ` Ian Dunn
  -- strict thread matches above, loose matches on Subject: below --
2016-05-24 23:37 Ian Dunn
2016-05-25  0:16 ` Drew Adams
2016-05-22 17:27 Ian Dunn
2016-05-22 17:51 ` Clément Pit--Claudel
2016-05-22 18:17   ` Ian Dunn
2016-05-22 16:45 Ian Dunn
2016-05-22 17:06 ` Clément Pit--Claudel
2016-05-22 17:20   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2mvnbpgfm.fsf@newartisans.com \
    --to=jwiegley@gmail.com \
    --cc=dunni@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=kaushal.modi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.