[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20600: 24.5.3: add-hook - wrong arguments error

From: Artur Malabarba
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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]