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.
This commit is contained in:
parent
b030b3df20
commit
f58b982241
5 changed files with 21 additions and 7 deletions
|
@ -1,5 +1,11 @@
|
|||
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.
|
||||
|
@ -18,8 +24,6 @@
|
|||
|
||||
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.
|
||||
|
||||
|
|
|
@ -295,6 +295,9 @@ Manual}.
|
|||
@item post-command-hook
|
||||
@xref{Command Overview}.
|
||||
|
||||
@item post-self-insert-hook
|
||||
@xref{Keymaps and Minor Modes}.
|
||||
|
||||
@item pre-command-hook
|
||||
@xref{Command Overview}.
|
||||
|
||||
|
|
|
@ -1341,11 +1341,12 @@ alist @code{minor-mode-map-alist}. @xref{Definition of minor-mode-map-alist}.
|
|||
@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
|
||||
|
|
|
@ -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
|
||||
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.
|
||||
|
|
1
etc/NEWS
1
etc/NEWS
|
@ -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
|
||||
syntactic rules.
|
||||
|
||||
+++
|
||||
** New hook post-self-insert-hook run at the end of self-insert-command.
|
||||
|
||||
+++
|
||||
|
|
Loading…
Add table
Reference in a new issue