1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
emacs/test/lisp/emacs-lisp
Stefan Monnier d7a83e23d4 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`.
2024-04-13 09:43:11 -04:00
..
bytecomp-resources Single string literal in body is return value only, not doc string 2024-03-07 13:47:53 +01:00
edebug-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio-tests EIEIO: Fix regession (bug#69631) 2024-03-08 11:24:18 -05:00
ert-font-lock-resources Improve ert-font-lock assertion parser (Bug#69714) 2024-03-28 11:40:27 +02:00
faceup-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
faceup-tests ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
macroexp-resources Use defvar for variables that are not constant 2024-02-07 11:13:56 -05:00
package-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
pp-resources Fix pp-emacs-lisp-code printing of cons cells 2022-05-17 19:45:20 +02:00
shadow-resources
testcover-resources ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
backquote-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
backtrace-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
benchmark-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
bindat-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
byte-run-tests.el ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
bytecomp-tests.el Make lexical-binding cookie warning test more robust 2024-04-03 11:27:16 +02:00
cconv-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
check-declare-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
checkdoc-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-extra-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cl-generic-tests.el Merge from origin/emacs-29 2024-03-30 04:35:24 -04:00
cl-lib-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-macs-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-preloaded-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cl-print-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-seq-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
comp-cstr-tests.el * test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-test-93): Add test. 2024-03-19 11:05:40 +01:00
comp-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
copyright-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
derived-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
easy-mmode-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
edebug-tests.el (edebug-tests-trivial-comma): Avoid interaction (bug#69406) 2024-02-26 12:33:35 -05:00
ert-font-lock-tests.el Fix symbol list matching regexps. 2024-04-01 11:13:12 +02:00
ert-tests.el Fix ert-tests.el for the new handler-bind code 2024-01-04 16:34:13 -05:00
ert-x-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
find-func-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
float-sup-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
generator-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
gv-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
hierarchy-tests.el ; hierarchy-tests.el: keep doc string within 80 columns 2024-01-31 17:55:53 +01:00
icons-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
let-alist-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
lisp-mnt-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
lisp-mode-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
lisp-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
macroexp-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
map-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
memory-report-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
multisession-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
nadvice-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
oclosure-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
package-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
pcase-tests.el (pcase-mutually-exclusive): Use auto-generated table 2024-03-28 00:06:00 -04:00
pp-tests.el pp.el: Try and fix bug#70039 2024-03-28 15:31:04 -04:00
range-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
regexp-opt-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ring-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
rmc-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
rx-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
seq-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
shadow-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
shortdoc-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
subr-x-tests.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
syntax-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
tabulated-list-tests.el Add tabulated-list-groups and Buffer-menu-group-by (bug#69305) 2024-02-29 19:50:04 +02:00
testcover-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
text-property-search-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
thunk-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
timer-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
track-changes-tests.el lisp/emacs-lisp/track-changes.el: New file (bug#70077) 2024-04-13 09:43:11 -04:00
unsafep-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
vtable-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
warnings-tests.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00