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):
* modes.texi (Major Mode Conventions, Mode Hooks):
Document change-major-mode-after-body-hook.
2012-01-31 Glenn Morris <rgm@gnu.org>
- * hooks.texi (Standard Hooks): Add prog-mode-hook.
-
* modes.texi (Defining Minor Modes):
Document define-minor-mode's new :variable keyword.
@item post-command-hook
@xref{Command Overview}.
+@item post-self-insert-hook
+@xref{Keymaps and Minor Modes}.
+
@item pre-command-hook
@xref{Command Overview}.
@cindex @code{self-insert-command}, minor modes
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-insert. In general, this is the only way to do that, since the
-facilities for customizing @code{self-insert-command} are limited to
-special cases (designed for abbrevs and Auto Fill mode). (Do not try
-substituting your own definition of @code{self-insert-command} for the
-standard one. The editor command loop handles this function specially.)
+self-insert. (Another way to customize @code{self-insert-command} is
+through @code{post-self-insert-hook}. Apart from this, the facilities
+for customizing @code{self-insert-command} are limited to special cases,
+designed for abbrevs and Auto Fill mode. Do not try substituting your
+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}
followed by one of @kbd{.,/?`'"[]\|~!#$%^&*()-_+=}. (The other
responsible for calling @code{blink-paren-function} when the inserted
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
@code{self-insert-command} for the standard one. The editor command
loop handles this function specially.
as-is; and syntax-propertize-rules which provides a new way to specify
syntactic rules.
++++
** New hook post-self-insert-hook run at the end of self-insert-command.
+++