[ESS-bugs] ess-mode 5.3.8; after-change-functions; RET at end of file
Markus Triska
markus.triska at gmx.at
Mon Nov 10 18:25:15 CET 2008
Hi Rodney,
Rodney Sparapani <rsparapa at mcw.edu> writes:
> A) A little help? I'm not a noweb-mode user other than some testing.
> I can see this line 443 in noweb-mode.el:
>
> (add-hook 'after-change-functions 'noweb-after-change-function)
This should be:
(add-hook 'after-change-functions 'noweb-after-change-function nil t)
to only affect the buffer-local value. This change should also be made
for the other hooks.
(By the way, this fixes a real problem: For example, with the current
ESS version, after editing an Rnw file, you get errors if you display an
image file that coincidentally contains code chunk markers.)
> (make-local-hook 'after-change-functions)
As of Emacs 21.1, make-local-hook is obsolete, since add-hook does the
same with non-nil `local' argument.
> Which would also require changing line 456 to:
>
> (remove-local-hook 'after-change-functions ...)
This should accordingly be:
(remove-hook 'after-change-functions 'noweb-after-change-function t)
to only affect the buffer-local value.
Also, noweb-mode does not follow the Major Mode conventions, see:
(info "(Elisp)Major Mode Conventions")
For example, (kill-all-local-variables) is missing.
Thank you and all the best,
Markus
More information about the ESS-bugs
mailing list