[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 21:58:30 CET 2008


Hi Rodney,

Rodney Sparapani <rsparapa at mcw.edu> writes:

> (if (fboundp 'make-local-hook) (progn
> (make-local-hook 'after-change-functions)
> (add-local-hook 'after-change-functions 'noweb-after-change-function))
> (add-hook 'after-change-functions 'noweb-after-change-function nil t))

Yes, this is a good way to stay backwards compatible.

> However, I'm not adding kill-all-... without some further guidance.
> I've checked this in and it will appear in 5.3.9 RSN.

Great, thank you. By convention, every major mode starts by calling
`kill-all-local-variables'. Importantly, this automatically calls
`change-major-mode-hook'. In lisp/ChangeLog `change-major-mode-hook' is
confused with `after-change-major-mode-hook'. Using `run-mode-hooks'
ensures that *after*-change-major-mode-hook is run. This is also
documented in the "Major Mode Conventions" of the Elisp info manual.

Thank you and all the best,
Markus



More information about the ESS-bugs mailing list