Commit f58b9822 authored by Glenn Morris's avatar Glenn Morris
Browse files

Document post-self-insert-hook

* doc/lispref/hooks.texi (Standard Hooks):
* doc/lispref/modes.texi (Keymaps and Minor Modes):
* doc/lispref/text.texi (Commands for Insertion):
Document post-self-insert-hook.

*etc/NEWS: Markup.
parent b030b3df
2012-02-02 Glenn Morris <rgm@gnu.org> 2012-02-02 Glenn Morris <rgm@gnu.org>
* hooks.texi (Standard Hooks):
* modes.texi (Keymaps and Minor Modes):
* text.texi (Commands for Insertion): Document post-self-insert-hook.
* hooks.texi (Standard Hooks): Add prog-mode-hook.
* hooks.texi (Standard Hooks): * hooks.texi (Standard Hooks):
* modes.texi (Major Mode Conventions, Mode Hooks): * modes.texi (Major Mode Conventions, Mode Hooks):
Document change-major-mode-after-body-hook. Document change-major-mode-after-body-hook.
...@@ -18,8 +24,6 @@ ...@@ -18,8 +24,6 @@
2012-01-31 Glenn Morris <rgm@gnu.org> 2012-01-31 Glenn Morris <rgm@gnu.org>
* hooks.texi (Standard Hooks): Add prog-mode-hook.
* modes.texi (Defining Minor Modes): * modes.texi (Defining Minor Modes):
Document define-minor-mode's new :variable keyword. Document define-minor-mode's new :variable keyword.
......
...@@ -295,6 +295,9 @@ Manual}. ...@@ -295,6 +295,9 @@ Manual}.
@item post-command-hook @item post-command-hook
@xref{Command Overview}. @xref{Command Overview}.
@item post-self-insert-hook
@xref{Keymaps and Minor Modes}.
@item pre-command-hook @item pre-command-hook
@xref{Command Overview}. @xref{Command Overview}.
......
...@@ -1341,11 +1341,12 @@ alist @code{minor-mode-map-alist}. @xref{Definition of minor-mode-map-alist}. ...@@ -1341,11 +1341,12 @@ alist @code{minor-mode-map-alist}. @xref{Definition of minor-mode-map-alist}.
@cindex @code{self-insert-command}, minor modes @cindex @code{self-insert-command}, minor modes
One use of minor mode keymaps is to modify the behavior of certain One use of minor mode keymaps is to modify the behavior of certain
self-inserting characters so that they do something else as well as self-inserting characters so that they do something else as well as
self-insert. In general, this is the only way to do that, since the self-insert. (Another way to customize @code{self-insert-command} is
facilities for customizing @code{self-insert-command} are limited to through @code{post-self-insert-hook}. Apart from this, the facilities
special cases (designed for abbrevs and Auto Fill mode). (Do not try for customizing @code{self-insert-command} are limited to special cases,
substituting your own definition of @code{self-insert-command} for the designed for abbrevs and Auto Fill mode. Do not try substituting your
standard one. The editor command loop handles this function specially.) own definition of @code{self-insert-command} for the standard one. The
editor command loop handles this function specially.)
The key sequences bound in a minor mode should consist of @kbd{C-c} The key sequences bound in a minor mode should consist of @kbd{C-c}
followed by one of @kbd{.,/?`'"[]\|~!#$%^&*()-_+=}. (The other followed by one of @kbd{.,/?`'"[]\|~!#$%^&*()-_+=}. (The other
......
...@@ -500,6 +500,11 @@ syntax. (@xref{Abbrevs}, and @ref{Syntax Class Table}.) It is also ...@@ -500,6 +500,11 @@ syntax. (@xref{Abbrevs}, and @ref{Syntax Class Table}.) It is also
responsible for calling @code{blink-paren-function} when the inserted responsible for calling @code{blink-paren-function} when the inserted
character has close parenthesis syntax (@pxref{Blinking}). character has close parenthesis syntax (@pxref{Blinking}).
@vindex post-self-insert-hook
The final thing this command does is to run the hook
@code{post-self-insert-hook}. You could use this to automatically
reindent text as it is typed, for example.
Do not try substituting your own definition of Do not try substituting your own definition of
@code{self-insert-command} for the standard one. The editor command @code{self-insert-command} for the standard one. The editor command
loop handles this function specially. loop handles this function specially.
......
...@@ -1271,6 +1271,7 @@ syntax-propertize-via-font-lock to reuse old font-lock-syntactic-keywords ...@@ -1271,6 +1271,7 @@ syntax-propertize-via-font-lock to reuse old font-lock-syntactic-keywords
as-is; and syntax-propertize-rules which provides a new way to specify as-is; and syntax-propertize-rules which provides a new way to specify
syntactic rules. syntactic rules.
+++
** New hook post-self-insert-hook run at the end of self-insert-command. ** New hook post-self-insert-hook run at the end of self-insert-command.
+++ +++
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment