diff options
| -rw-r--r-- | doc/lispref/text.texi | 7 | ||||
| -rw-r--r-- | src/insdel.c | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index f027cdf8ede..ffdf952b081 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -5776,4 +5776,11 @@ code that is itself run from a modification hook, then rebind locally | |||
| 5776 | may cause recursive calls to the modification hooks, so be sure to | 5776 | may cause recursive calls to the modification hooks, so be sure to |
| 5777 | prepare for that (for example, by binding some variable which tells | 5777 | prepare for that (for example, by binding some variable which tells |
| 5778 | your hook to do nothing). | 5778 | your hook to do nothing). |
| 5779 | |||
| 5780 | We recommend that you only bind this variable for modifications that | ||
| 5781 | do not result in lasting changes to buffer text contents (for example | ||
| 5782 | face changes or temporary modifications). If you need to delay change | ||
| 5783 | hooks during a series of changes (typically for performance reasons), | ||
| 5784 | use @code{combine-change-calls} or @code{combine-after-change-calls} | ||
| 5785 | instead. | ||
| 5779 | @end defvar | 5786 | @end defvar |
diff --git a/src/insdel.c b/src/insdel.c index 21acf0e61db..dfa1cc311ca 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -2397,7 +2397,13 @@ This affects `before-change-functions' and `after-change-functions', | |||
| 2397 | as well as hooks attached to text properties and overlays. | 2397 | as well as hooks attached to text properties and overlays. |
| 2398 | Setting this variable non-nil also inhibits file locks and checks | 2398 | Setting this variable non-nil also inhibits file locks and checks |
| 2399 | whether files are locked by another Emacs session, as well as | 2399 | whether files are locked by another Emacs session, as well as |
| 2400 | handling of the active region per `select-active-regions'. */); | 2400 | handling of the active region per `select-active-regions'. |
| 2401 | |||
| 2402 | To delay change hooks during a series of changes, use | ||
| 2403 | `combine-change-calls' or `combine-after-change-calls' instead of | ||
| 2404 | binding this variable. | ||
| 2405 | |||
| 2406 | See also the info node `(elisp) Change Hooks'. */); | ||
| 2401 | inhibit_modification_hooks = 0; | 2407 | inhibit_modification_hooks = 0; |
| 2402 | DEFSYM (Qinhibit_modification_hooks, "inhibit-modification-hooks"); | 2408 | DEFSYM (Qinhibit_modification_hooks, "inhibit-modification-hooks"); |
| 2403 | 2409 | ||