GNU bug report logs - #25581
25.1; Incorrect statement in (elisp) `Hooks'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Mon, 30 Jan 2017 16:52:02 UTC

Severity: minor

Tags: fixed

Found in version 25.1

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; Incorrect statement in (elisp) `Hooks'
Date: Mon, 30 Jan 2017 08:51:20 -0800 (PST)
The second sentence here is incorrect:

 If the variable’s name ends in ‘-function’, then its value is just a
 single function, not a list of functions.  ‘add-hook’ cannot be used to
 modify such a _single function hook_, and you have to use ‘add-function’
 instead (*note Advising Functions::).

You CAN use `add-hook' to modify such a single-function hook.
Nothing prevents you from doing so.  And nothing even suggests
that you should not.  And you have always been able to do so.

And this is the case whether or not the "single function hook"
is intended to always be single-function (which intention
AFAIK, is not enforced anywhere) or it is intended to have
any number (including zero and one) of functions.

See http://lists.gnu.org/archive/html/emacs-devel/2016-10/msg00448.html.
See the other msgs of that thread also.

At the very least, this text is misleading, in more than one way.

In GNU Emacs 25.1.1 (x86_64-w64-mingw32)
 of 2016-09-17 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
 'configure --without-dbus --without-compress-install CFLAGS=-static'




This bug report was last modified 4 years and 286 days ago.

Previous Next


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