all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: <jakanakaevangeli@chiru.no>
Cc: 46407@debbugs.gnu.org
Subject: bug#46407: 27.1; Hooks with permanent-local-hook are not cleared of lambdas
Date: Tue, 25 May 2021 21:10:04 +0200	[thread overview]
Message-ID: <87o8cypr3n.fsf@gnus.org> (raw)
In-Reply-To: <87r1hv2sr0.fsf@miha-pc> (jakanakaevangeli@chiru.no's message of "Tue, 25 May 2021 09:10:43 +0200")

<jakanakaevangeli@chiru.no> writes:

> On the other hand, this side effect is so undocumented and
> undiscoverable (and most probably not really of any use as well), that I
> highly doubt there is even a single instance of anyone relying in it
> deliberately. I may be wrong though.

Yeah, that's the problem -- it's hard to say whether anybody relies on
this weird behaviour.

There are no in-tree usages of permanent-local-hook at all as far as I
can see, so I wondered whether is was used at all:

https://github.com/search?q=permanent-local-hook+extension%3A.el&type=Code&ref=advsearch&l=&l=

And the answer is yes.  (But that doesn't tell us if anybody relies on
the non-symbol behaviour, though.)

> I'm personally in favour of fixing the `kill-all-local-variables'
> inconsistency (patch follows).
>
> If not, then yes, we should document it in add-hook and fix the info
> node I mentioned. Though that would leave virtually every local addition
> of a lambda to a hook invalid and a possible bug (a quick grep reveals
> that there are at least three such usages in Emacs itself).

I'm leaning towards applying your patch (i.e., changing the behaviour as
you suggest), because it's somewhat difficult to imagine anybody relying
on the current, odd behaviour.

Does anybody object?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-05-25 19:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 19:29 bug#46407: 27.1; Hooks with permanent-local-hook are not cleared of lambdas jakanakaevangeli
2021-02-09 21:38 ` jakanakaevangeli
2021-05-21 12:56   ` jakanakaevangeli
2021-05-24 21:55 ` Lars Ingebrigtsen
2021-05-25  7:10   ` jakanakaevangeli
2021-05-25 19:10     ` Lars Ingebrigtsen [this message]
2021-07-20 14:31       ` Lars Ingebrigtsen

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=87o8cypr3n.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=46407@debbugs.gnu.org \
    --cc=jakanakaevangeli@chiru.no \
    /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.