aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorStefan Monnier2025-12-28 22:32:23 -0500
committerStefan Monnier2025-12-28 22:32:23 -0500
commite119514ae8b391f41577d22d4e41cc3fea7ab9eb (patch)
treed1d68551bcf4ae83481731de0ffb93f876dc7b07 /doc
parent8f2557844d2f0e7a87b4c94d7a28bc6e4207d9da (diff)
downloademacs-e119514ae8b391f41577d22d4e41cc3fea7ab9eb.tar.gz
emacs-e119514ae8b391f41577d22d4e41cc3fea7ab9eb.zip
track-changes.el (track-changes-undo-only): New var
* lisp/emacs-lisp/track-changes.el (track-changes-undo-only): New var. (track-changes-fetch): Bind it. (track-changes--state): New slot `undo`. (track-changes--after): Set it. * lisp/vc/diff-mode.el (diff--track-changes-function): Use the new var. * doc/lispref/text.texi (Tracking changes): Mention `track-changes-undo-only`.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/text.texi13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index c6e3b1bdbec..c1457c49562 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -6582,6 +6582,19 @@ risk that the @var{signal} function gets triggered in the middle of it,
6582because the @var{signal} is re-enabled only after @var{func} finishes. 6582because the @var{signal} is re-enabled only after @var{func} finishes.
6583@end defun 6583@end defun
6584 6584
6585@defvar track-changes-undo-only
6586If your code uses @code{track-changes} to perform further modifications
6587to the buffer (for example, to mark the parts of the buffer that have
6588been edited), then you may want to refrain from making those
6589modifications when the changes are the result of an undo (which
6590presumably also undoes the modifications you had applied back when the
6591corresponding edit was made).
6592To that end @code{track-changes-fetch} binds
6593@code{track-changes-undo-only} to non-@code{nil} during calls to
6594@var{func} if the changes were the result of undo.
6595@end defvar
6596
6597
6585@defun track-changes-unregister id 6598@defun track-changes-unregister id
6586This function tells the library that the tracker @var{id} does not need 6599This function tells the library that the tracker @var{id} does not need
6587to know about buffer changes any more. Most clients will never want to 6600to know about buffer changes any more. Most clients will never want to