diff options
-rw-r--r-- | doc/lispref/ChangeLog | 8 | ||||
-rw-r--r-- | doc/lispref/hooks.texi | 3 | ||||
-rw-r--r-- | doc/lispref/modes.texi | 11 | ||||
-rw-r--r-- | doc/lispref/text.texi | 5 | ||||
-rw-r--r-- | etc/NEWS | 1 |
5 files changed, 21 insertions, 7 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 92c46d0c8c5..5765b151b41 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,6 +1,12 @@ 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. diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index bf4afb4cf2c..ef3ebc4be35 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -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}. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index e142be44e0d..0eda905f82f 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -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 diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 55b0c0a4be8..448634ba5a7 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -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. @@ -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. +++ |