diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/modes.texi | 9 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 10 |
2 files changed, 14 insertions, 5 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index f7013da9433..bd94aeadf15 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -1490,10 +1490,11 @@ alist @code{minor-mode-map-alist}. @xref{Definition of minor-mode-map-alist}. | |||
| 1490 | One use of minor mode keymaps is to modify the behavior of certain | 1490 | One use of minor mode keymaps is to modify the behavior of certain |
| 1491 | self-inserting characters so that they do something else as well as | 1491 | self-inserting characters so that they do something else as well as |
| 1492 | self-insert. (Another way to customize @code{self-insert-command} is | 1492 | self-insert. (Another way to customize @code{self-insert-command} is |
| 1493 | through @code{post-self-insert-hook}. Apart from this, the facilities | 1493 | through @code{post-self-insert-hook}, see @ref{Commands for |
| 1494 | for customizing @code{self-insert-command} are limited to special cases, | 1494 | Insertion}. Apart from this, the facilities for customizing |
| 1495 | designed for abbrevs and Auto Fill mode. Do not try substituting your | 1495 | @code{self-insert-command} are limited to special cases, designed for |
| 1496 | own definition of @code{self-insert-command} for the standard one. The | 1496 | abbrevs and Auto Fill mode. Do not try substituting your own |
| 1497 | definition of @code{self-insert-command} for the standard one. The | ||
| 1497 | editor command loop handles this function specially.) | 1498 | editor command loop handles this function specially.) |
| 1498 | 1499 | ||
| 1499 | Minor modes may bind commands to key sequences consisting of @kbd{C-c} | 1500 | Minor modes may bind commands to key sequences consisting of @kbd{C-c} |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 3d26d0930f7..1e19f75d682 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 | |||
| 525 | character has close parenthesis syntax (@pxref{Blinking}). | 525 | character has close parenthesis syntax (@pxref{Blinking}). |
| 526 | 526 | ||
| 527 | @vindex post-self-insert-hook | 527 | @vindex post-self-insert-hook |
| 528 | @vindex self-insert-uses-region-functions | ||
| 528 | The final thing this command does is to run the hook | 529 | The final thing this command does is to run the hook |
| 529 | @code{post-self-insert-hook}. You could use this to automatically | 530 | @code{post-self-insert-hook}. You could use this to automatically |
| 530 | reindent text as it is typed, for example. | 531 | reindent text as it is typed, for example. If any function on this |
| 532 | hook needs to act on the region (@pxref{The Region}), it should make | ||
| 533 | sure Delete Selection mode (@pxref{Using Region, Delete Selection, , | ||
| 534 | emacs, The GNU Emacs Manual}) doesn't delete the region before | ||
| 535 | @code{post-self-insert-hook} functions are invoked. The way to do so | ||
| 536 | is to add a function that returns @code{nil} to | ||
| 537 | @code{self-insert-uses-region-functions}, a special hook that tells | ||
| 538 | Delete Selection mode it should not delete the region. | ||
| 531 | 539 | ||
| 532 | Do not try substituting your own definition of | 540 | Do not try substituting your own definition of |
| 533 | @code{self-insert-command} for the standard one. The editor command | 541 | @code{self-insert-command} for the standard one. The editor command |