all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20600: 24.5.3: add-hook - wrong arguments error
@ 2015-05-18  5:34 Andreas Röhler
  2015-05-18 11:54 ` Artur Malabarba
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Röhler @ 2015-05-18  5:34 UTC (permalink / raw)
  To: 20600

[-- 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 --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-05-19  8:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-05-19  8:17       ` Andreas Röhler

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.