diff options
Diffstat (limited to 'doc/lispref/text.texi')
-rw-r--r-- | doc/lispref/text.texi | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index ab554dcd421..35ba5d0dddc 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -525,9 +525,17 @@ responsible for calling @code{blink-paren-function} when the inserted character has close parenthesis syntax (@pxref{Blinking}). @vindex post-self-insert-hook +@vindex self-insert-uses-region-functions 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. +reindent text as it is typed, for example. If any function on this +hook needs to act on the region (@pxref{The Region}), it should make +sure Delete Selection mode (@pxref{Using Region, Delete Selection, , +emacs, The GNU Emacs Manual}) doesn't delete the region before +@code{post-self-insert-hook} functions are invoked. The way to do so +is to add a function that returns @code{nil} to +@code{self-insert-uses-region-functions}, a special hook that tells +Delete Selection mode it should not delete the region. Do not try substituting your own definition of @code{self-insert-command} for the standard one. The editor command |