GNU bug report logs - #47992
27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Sat, 24 Apr 2021 12:12:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Arthur Miller <arthur.miller <at> live.com>
To: Richard Stallman <rms <at> gnu.org>
Cc: jakanakaevangeli <at> chiru.no, Michael Heerdegen <michael_heerdegen <at> web.de>, mail <at> daniel-mendler.de, 47992 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, larsi <at> gnus.org
Subject: bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook`
Date: Tue, 06 Jul 2021 11:46:01 +0200
Richard Stallman <rms <at> gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> People are proposing a lot of work on a little wrinkle that isn't worth
> much effort.  There are other changes we could make that would
> really help users do editing.
>
> Here's an easy way to help users avoid such collisions: to say
> they should include a name in each anonymous lambda that they put on a
> hook in their init files -- a name based on the user's name.
>
> Adding a name to a lambda is easy.  Just write the symbol after the
> argument list (and doc string and interactive spec, if any), like
> this:
>
>    (lambda () rms-init-3 (glum-mode 1))
>
> The mame will distinguish it from any otherwise-identical function
> such as
>
>    (lambda () j-r-gensym (glum-mode 1))
>
> because they will not be equal.
>
> Thus, the only change needed is in documentation.

If they are equal, why do they need to be distinguished?

Also, if we name lambdas, arent they becoming just as functions? What is
the advantage of named lambda over named function?

Sorry I am not so fluent with elisp yet, so I am trying to understand.




This bug report was last modified 3 years and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.