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

From: Andreas Röhler <[email-masked]>
Date: Mon, 18 May 2015 07:34:42 +0200

||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)|