all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Artur Malabarba <bruce.connor.am@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 20600@debbugs.gnu.org
Subject: bug#20600: 24.5.3: add-hook - wrong arguments error
Date: Mon, 18 May 2015 18:29:25 +0100	[thread overview]
Message-ID: <CAAdUY-JtX2CozVnDY7mWbZYDZxN-UZORFVEDMmR0vbvC8SthqQ@mail.gmail.com> (raw)
In-Reply-To: <jwvk2w5x288.fsf-monnier+emacsbugs@gnu.org>

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	other threads:[~2015-05-18 17:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18  5:34 bug#20600: 24.5.3: add-hook - wrong arguments error Andreas Röhler
2015-05-18 11:54 ` Artur Malabarba
2015-05-18 14:25   ` Eli Zaretskii
2015-05-18 15:38     ` Artur Malabarba
2015-05-18 17:49       ` Stefan Monnier
2015-05-18 18:22         ` Artur Malabarba
2015-05-18 16:47   ` Stefan Monnier
2015-05-18 17:29     ` Artur Malabarba [this message]
2015-05-19  8:17       ` Andreas Röhler

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=CAAdUY-JtX2CozVnDY7mWbZYDZxN-UZORFVEDMmR0vbvC8SthqQ@mail.gmail.com \
    --to=bruce.connor.am@gmail.com \
    --cc=20600@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.