all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: Phillip Lord <phillip.lord@russet.org.uk>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: A programming puzzle with buffer-local hooks
Date: Thu, 18 May 2017 11:45:49 -0400	[thread overview]
Message-ID: <192122c9-35c7-c19d-d5ec-c28e7ede446a@gmail.com> (raw)
In-Reply-To: <31503e0214fda5fdb91dce79cfa51251.squirrel@cloud103.planethippo.com>

On 2017-05-18 11:16, Phillip Lord wrote:
> Add the hook globally, and then have your hook functions check whether the
> mode is on or off before they do anything.

I think that's mostly what I meant by "never removing the hook". Am I misunderstanding you?



  reply	other threads:[~2017-05-18 15:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 15:10 A programming puzzle with buffer-local hooks Clément Pit-Claudel
2017-05-18 15:16 ` Phillip Lord
2017-05-18 15:45   ` Clément Pit-Claudel [this message]
2017-05-18 16:51 ` Stefan Monnier
2017-05-18 18:38   ` Clément Pit-Claudel
2017-05-19  6:30 ` martin rudalics
  -- strict thread matches above, loose matches on Subject: below --
2017-05-18 15:54 Phillip Lord
2017-05-18 15:56 ` Clément Pit-Claudel
2017-05-18 18:46   ` Phillip Lord
2017-05-18 19:03     ` Clément Pit-Claudel

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=192122c9-35c7-c19d-d5ec-c28e7ede446a@gmail.com \
    --to=cpitclaudel@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=phillip.lord@russet.org.uk \
    /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.