]> git.eshelyaron.com Git - emacs.git/commit
track-changes.el: Minor changes for version 1.0
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 17 Apr 2024 01:57:05 +0000 (21:57 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sat, 20 Apr 2024 11:02:56 +0000 (14:02 +0300)
commit563f01499b8ee41656872f757b91442583a09837
tree7bd9fdfbdc284af43181f91c58c03d8b9e2705f0
parenteec6e1bce391f19b8ca2da0df4ae737b563f70d1
track-changes.el: Minor changes for version 1.0

Arrange for the library to be usable on older Emacsen, which
includes reducing the noise when `before/after-change-functions`
are badly paired or missing.
Also, since the signal function receives the distance (for `:disjoint`),
we don't need `track-changes--disjoint-threshold`: the signal
function can simply do nothing when the distance is smaller than
the threshold it wants to use.

* lisp/emacs-lisp/track-changes.el: Prepare header for ELPA.
(track-changes--tracker, track-changes--state): Don't use `:noinline`,
so as to be compatible with Emacs<27.
(track-changes-record-errors): New variable.
(track-changes--recover-from-error): Use it.  Record only the last 20
keys and the last 50 stack frames in the error log.
(track-changes--disjoint-threshold): Delete variable.
(track-changes--before): Don't use it any more.

* lisp/progmodes/eglot.el (eglot--track-changes-signal):
Coalesce disjoint changes nearer than what used to be coalesced because of
`track-changes--disjoint-threshold`.

(cherry picked from commit a33ab7565e20d9c04731491f6ae38a8d35be729f)
lisp/emacs-lisp/track-changes.el
lisp/progmodes/eglot.el