GNU bug report logs - #20600
24.5.3: add-hook - wrong arguments error

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Mon, 18 May 2015 05:35:02 UTC

Severity: wishlist

Tags: notabug, wontfix

Found in version 24.5.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Artur Malabarba <bruce.connor.am <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 20600 <at> debbugs.gnu.org
Subject: bug#20600: 24.5.3: add-hook - wrong arguments error
Date: Mon, 18 May 2015 18:29:25 +0100
2015-05-18 17:47 GMT+01:00 Stefan Monnier

>> Still, it sounds like it might be useful for run-hooks to properly handle
>> functions whose arity is less than the expected arity.
>
> I have no idea what kind of "properly handle" you're thinking of.

(add-hook '1-arity-functions 'some-zero-arity-function)
(run-hooks '1-arity-functions some-arg)

Here, it will throw an error because run-hooks will try to call
(some-zero-arity-function some-arg). That's all fine and well
documented, I'm just saying it may be more convenient if run-hooks
took care to check that some-zero-arity-function has zero arity and
invoked it without arguments.




This bug report was last modified 10 years and 10 days ago.

Previous Next


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