diff options
| author | Alan Mackenzie | 2016-05-08 13:24:20 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2016-05-08 13:24:20 +0000 |
| commit | 2eb6817ba971184cc109f8530f4b3b38f65650ea (patch) | |
| tree | b23258db9a4d1720583784fd1b90824a45835f91 /etc | |
| parent | 344eb61ab3607827930354589174bb8d270241b9 (diff) | |
| download | emacs-2eb6817ba971184cc109f8530f4b3b38f65650ea.tar.gz emacs-2eb6817ba971184cc109f8530f4b3b38f65650ea.zip | |
Add :after-hook facility to define-derived-mode.
This allow a form to be evaluated _after_ a major mode's hooks have been run.
It is needed to solve some problems in CC Mode, including bug #16759 and
bug #23476.
* lisp/emacs-lisp/derived.el (define-derived-mode): introduce the new argument
`:after-hook', and generate the requisite code for it.
(derived-mode-make-docstring): Take account of the possibility of :after-hook.
* lisp/subr.el (delayed-after-hook-forms): New variable.
(run-mode-hooks): As the last thing evaluate the forms in
delayed-after-hook-forms.
* doc/lispref/modes.texi (Derived Modes): Document :after-hook.
(Mode Hooks): Document the new feature in run-mode-hooks.
* etc/NEWS: Note the new feature.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -369,6 +369,12 @@ variable. | |||
| 369 | 369 | ||
| 370 | ** New var syntax-ppss-table to control the syntax-table used in syntax-ppss. | 370 | ** New var syntax-ppss-table to control the syntax-table used in syntax-ppss. |
| 371 | 371 | ||
| 372 | +++ | ||
| 373 | ** `define-derived-mode' can now specify an :after-hook form, which | ||
| 374 | gets evaluated after the new mode's hook has run. This can be used to | ||
| 375 | incorporate configuration changes made in the mode hook into the | ||
| 376 | mode's setup. | ||
| 377 | |||
| 372 | ** Autoload files can be generated without timestamps, | 378 | ** Autoload files can be generated without timestamps, |
| 373 | by setting 'autoload-timestamps' to nil. | 379 | by setting 'autoload-timestamps' to nil. |
| 374 | FIXME As an experiment, nil is the current default. | 380 | FIXME As an experiment, nil is the current default. |