diff options
| author | Stefan Monnier | 2025-12-28 22:32:23 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2025-12-28 22:32:23 -0500 |
| commit | e119514ae8b391f41577d22d4e41cc3fea7ab9eb (patch) | |
| tree | d1d68551bcf4ae83481731de0ffb93f876dc7b07 /doc | |
| parent | 8f2557844d2f0e7a87b4c94d7a28bc6e4207d9da (diff) | |
| download | emacs-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.texi | 13 |
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, | |||
| 6582 | because the @var{signal} is re-enabled only after @var{func} finishes. | 6582 | because 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 | ||
| 6586 | If your code uses @code{track-changes} to perform further modifications | ||
| 6587 | to the buffer (for example, to mark the parts of the buffer that have | ||
| 6588 | been edited), then you may want to refrain from making those | ||
| 6589 | modifications when the changes are the result of an undo (which | ||
| 6590 | presumably also undoes the modifications you had applied back when the | ||
| 6591 | corresponding edit was made). | ||
| 6592 | To 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 |
| 6586 | This function tells the library that the tracker @var{id} does not need | 6599 | This function tells the library that the tracker @var{id} does not need |
| 6587 | to know about buffer changes any more. Most clients will never want to | 6600 | to know about buffer changes any more. Most clients will never want to |