summaryrefslogtreecommitdiff
path: root/etc/NEWS
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2024-04-05 17:37:32 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2024-04-13 09:43:11 -0400
commitd7a83e23d47ca9e3e6ca70078e956e31301e5e6d (patch)
tree837781513617ce2dd14618d76f5bd9870b861c5a /etc/NEWS
parentdd6b9c9426c5d7dde66974c5790815c3520a755b (diff)
downloademacs-d7a83e23d47ca9e3e6ca70078e956e31301e5e6d.tar.gz
lisp/emacs-lisp/track-changes.el: New file (bug#70077)
This new package provides an API that is easier to use right than our `*-change-functions` hooks. The patch includes changes to `diff-mode.el` and `eglot.el` to make use of this new package. * lisp/emacs-lisp/track-changes.el: New file. * test/lisp/emacs-lisp/track-changes-tests.el: New file. * doc/lispref/text.texi (Tracking changes): New subsection. * lisp/progmodes/eglot.el: Require `track-changes`. (eglot--virtual-pos-to-lsp-position): New function. (eglot--track-changes): New var. (eglot--managed-mode): Use `track-changes-register` i.s.o `after/before-change-functions` when available. (eglot--track-changes-signal): New function, partly extracted from `eglot--after-change`. (eglot--after-change): Use it. (eglot--track-changes-fetch): New function. (eglot--signal-textDocument/didChange): Use it. * lisp/vc/diff-mode.el: Require `track-changes`. Also require `easy-mmode` before the `eval-when-compile`s. (diff-unhandled-changes): Delete variable. (diff-after-change-function): Delete function. (diff--track-changes-function): Rename from `diff-post-command-hook` and adjust to new calling convention. (diff--track-changes): New variable. (diff--track-changes-signal): New function. (diff-mode, diff-minor-mode): Use it with `track-changes-register`.
Diffstat (limited to 'etc/NEWS')
-rw-r--r--etc/NEWS18
1 files changed, 18 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index a2a3fe494cb..2cf6477ba99 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -15,6 +15,12 @@ in older Emacs versions.
You can narrow news to a specific version by calling 'view-emacs-news'
with a prefix argument or by typing 'C-u C-h C-n'.
+Temporary note:
++++ indicates that all relevant manuals in doc/ have been updated.
+--- means no change in the manuals is needed.
+When you add a new item, use the appropriate mark if you are sure it
+applies, and please also update docstrings as needed.
+
* Installation Changes in Emacs 30.1
@@ -1586,6 +1592,18 @@ options of GNU 'ls'.
* New Modes and Packages in Emacs 30.1
++++
+** New package Track-Changes.
+This library is a layer of abstraction above 'before-change-functions'
+and 'after-change-functions' which provides a superset of
+the functionality of 'after-change-functions':
+- It provides the actual previous text rather than only its length.
+- It takes care of accumulating and bundling changes until a time when
+ its client finds it convenient to react to them.
+- It detects most cases where some changes were not properly
+ reported (calls to 'before/after-change-functions' that are
+ incorrectly paired, missing, etc...) and reports them adequately.
+
** New major modes based on the tree-sitter library
+++