all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: 20600@debbugs.gnu.org
Subject: bug#20600: 24.5.3: add-hook - wrong arguments error
Date: Mon, 18 May 2015 07:34:42 +0200	[thread overview]
Message-ID: <555979F2.1010705@easy-emacs.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 559 bytes --]

||after-change-functions|  wrongly accepts functions with three args only
  
Issue is explained in docstring of workaround below.
If the function to be hooked in --save-buffer-- doesn't require args, add-hook resp. after-change-functions should not.

(defun my-instant-save-buffer (eins zwei drei)
   "To be hooked into list `after-change-functions'

`after-change-functions' expects functions receiving three arguments.
Arguments are ignored here, but slots needed by add-hook"
   (save-buffer))

(add-hook 'after-change-functions 'my-instant-save-buffer)|


[-- Attachment #2: Type: text/html, Size: 752 bytes --]

             reply	other threads:[~2015-05-18  5:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18  5:34 Andreas Röhler [this message]
2015-05-18 11:54 ` bug#20600: 24.5.3: add-hook - wrong arguments error 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
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=555979F2.1010705@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=20600@debbugs.gnu.org \
    /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.