1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; Improve documentation of change hooks

* doc/lispref/text.texi (Change Hooks): Warn against buffer
changes in the hook functions.  (Bug#79115)
This commit is contained in:
Eli Zaretskii 2025-07-30 19:48:07 +03:00
parent f20d5e63bc
commit 456f44a7b3

View file

@ -6291,7 +6291,11 @@ specific parts of the text.
The functions you use in these hooks should save and restore the match
data if they do anything that uses regular expressions; otherwise, they
will interfere in bizarre ways with the editing operations that call
them.
them. In addition, the functions in these hooks should avoid changing
buffer text, faces, properties, overlays, and other aspects of the
buffer-specific state except those that the hook functions themselves
create and manage, because other parts of Emacs might become confused by
such changes behind their back.
@defvar before-change-functions
This variable holds a list of functions to call when Emacs is about to