all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 21311@debbugs.gnu.org
Subject: bug#21311: 25.0.50; non-defvared hooks are not declared special with lexical-binding
Date: Fri, 21 Aug 2015 17:40:32 +0200	[thread overview]
Message-ID: <8737zc645r.fsf@gnu.org> (raw)
In-Reply-To: <jwvh9ns4uwv.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Fri, 21 Aug 2015 09:48:53 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> It seems that hooks that are not declared using defvar but come into
>> being just because of a (add-hook 'my-hook ...) are not declared as
>> special meaning you cannot let-bind them to change their value in the
>> dynamic scope of the let.
>
> Yes.
>
>> The bug disappears as soon as I
>>   - don't use lexical-binding, or
>>   - defvar the hook (Fix #1 or #2)
>
> I think either of fix #1 or #2 are proper fixes and I think there's not
> much more we can do about it.

Allright.

> Arguably, nowadays packages should defvar all their hooks.

Ok, then I'll issue a bug report for magit.  That's the package whose
non-defvared hook I wanted to let-bind.

Bye,
Tassilo





  parent reply	other threads:[~2015-08-21 15:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21 11:59 bug#21311: 25.0.50; non-defvared hooks are not declared special with lexical-binding Tassilo Horn
2015-08-21 13:48 ` Stefan Monnier
2015-08-21 15:03   ` Drew Adams
2015-08-21 15:40   ` Tassilo Horn [this message]
2015-08-22  6:05   ` Tassilo Horn
2015-08-22 18:12     ` Glenn Morris
2015-08-23  5:17       ` Tassilo Horn

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=8737zc645r.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=21311@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.