After a ~10 month period of using track-changes.el as a support library
for tracking buffer changes, I've decided to go back to manually using
after-change-functions and before-change-functions.
track-changes.el showed promise:
- One of the selling points was to turn complicated a-c-functions and
b-c-functions into something easier, but that objectively didn't pan
out, with "virtual" positions, one-shot hooks, and tracker
registrations being abstractions and complications mastered by very
few.
- The other selling point was the ability to log and detect those parts
of Emacs that cheat the modification hooks and correct them. As far
as I can tell, only one such cheater -- quail.el -- was identified.
But with little consequence, only an ugly workaround in eglot.el (now
removed).
- After using Eglot daily for all this time, I didn't notice any
decrease in desynchronization events.
- I did notice an increase in track-changes.el related bugs, some of
which still baffle me and and hard to reproduce. A common occurence
is the '(cl-assertion-failed (memq id track-changes--trackers))'
which is hard to track down.
- The library makes it more complicated to run Eglot on older Emacsen.
I might yet revisit this matter for the next version but this
experience has shown that it didn't bring the advantages I thought it
would, so I'm abandoning it until at least 1.19 is out.
* lisp/progmodes/eglot.el (track-changes): No longer require.
(eglot--virtual-pos-to-lsp-position): Delete.
(eglot--managed-mode): Simplify.
(eglot--track-changes): Delete this variable.
(eglot--recent-changes): Reword doc.
(eglot--before-change, eglot--after-change): Bring back.
(eglot--track-changes-fetch): Delete.
(eglot--add-one-shot-hook): Delete.
(eglot--track-changes-signal): Delete.
* src/image.c (image_create_x_image_and_pixmap_1): Avoid temporary
variable by passing the value directly to image_error.
(tiff_handler): Prefer image_error to add_to_log for local
consistency.
* test/src/emacs-tests.el (emacs-tests/bwrap/allows-stdout):
Skip test if bwrap prohibits even "echo Hi",
which it does on my Ubuntu 24.10 platform.
This extra check means we no longer need to test
separately whether the filter is readable.
* src/pdumper.c (dump_ptr_referrer): Port to platforms
where sprintf %p generates absurdly long output.
(dump_vectorlike): Port to hypothetical platforms
where %d generates absurdly long output.
* src/image.c (image_build_heuristic_mask, png_load_body):
Abort if snprintf truncated. (If truncation is not possible
here we should use sprintf instead, as that simplifies
automatic runtime checking.)
* src/image.c (svg_css_length_to_pixels): Restructure so GCC warns
about new enum members. Add case for RSVG_UNIT_CH. Warn about
unknown units discovered at runtime.
* src/dispnew.c (is_tty_root_frame_with_visible_child): New function.
* src/dispextern.h: Declare it.
* src/xdisp.c (redisplay_internal): Don't use optimization 1 for tty root
frames with a visible child frame.
* src/xdiso.c (update_tab_bar)_ Don't use #ifdef HAVE_WINDOW_SYSTEM for
setting the selected frame. That only makes a build without window
system misbehave.
These functions are specified to be passed at least one
argument, so our implementation must accept an arbitrary number
of arguments.
* lisp/progmodes/eglot.el (eglot-signature-eldoc-function)
(eglot-hover-eldoc-function): Fix signature.
Emacs partial completion simply doesn't make sense in LSP.
Attempts to make it make some sense end up failing for one
reason or another.
This commit restores the original intention of the
eglot--dumb-allc and eglot--dumb-tryc functions, which was to be
dumb and pop up a *Completions* buffer (or a company tooltip),
as soon as there is doubt over what the user wants to do.
It also fixes tests, including an expensive Rust test that had
been broken for a long time.
* lisp/progmodes/eglot.el (eglot--dumb-allc): Consider point.
(eglot--dumb-tryc): Make it suitably dumb again.
* test/lisp/progmodes/eglot-tests.el
(eglot--wait-for-rust-analyzer): Wait longer.
(eglot-test-common-prefix-completion): Delete this test. It's not
the intended behavior.
(eglot--kill-completions-buffer): New helper.
(eglot-test-try-completion-nomatch): Rework test.
(eglot-test-try-completion-inside-symbol): Pops *Completions*
buffer because mustn't partial complete.
(eglot-test-try-completion-inside-symbol-2): Does complete.
(eglot-test-rust-completion-exit-function): Fix long-broken test.
* lisp/dired.el (dired--inhibit-auto-revert): New variable.
(dired-map-over-marks): Make the generated code bind it.
(dired-buffer-stale-p): Return nil if dired--inhibit-auto-revert is
non-nil.
* doc/lispref/parsing.texi (Using Parser): Update manual.
* src/treesit.c (Ftreesit_parser_create): Use the LANGUAGE
argument given as the language for the parser, not the actual
language.
The case_Lisp_Int macro was originally introduced with different
definitions depending on USE_2_TAGS_FOR_INTS. However, since commit
2b57012478, we have assumed that USE_2_TAGS_FOR_INTS is always
defined, and the macro has only a single definition. As a result, the
macro is now unnecessary, and replacing it with standard C case labels
improves readability and understanding.
* src/lisp.h (case_Lisp_Int): Delete macro.
* src/alloc.c (process_mark_stack, survives_gc_p):
* src/data.c (Fcl_type_of):
* src/fns.c (value_cmp, sxhash_obj):
* src/pdumper.c (dump_object):
* src/print.c (print_object):
* src/xfaces.c (face_attr_equal_p): Remove uses of above macro.
Emacs does not support AIX 3.2 since 2008.
This workaround for AIX 3.2.3 and 3.2.4 (released in 1992) was
introduced in 1999 and was only active with #ifdef AIX3_2. In 2008, the
condition was changed to #ifdef AIX when support for these older AIX
versions was dropped. I couldn't find any justification for why this
workaround was retained (instead of being removed) in the commit message
or mailing list archives.
Given that users of AIX 4.0 (released in 1995) or later have not had
this workaround for over a decade (1999-2008), it seems safe to assume
that it is no longer necessary. Removing it will also prevent the
incorrect overriding of the LANG variable on those systems.
* src/emacs.c [AIX] (main): Remove workaround for AIX 3.2. (Bug#75153)
* lisp/net/nsm.el (network-security-protocol-checks): Bump rsa-kx
severity to medium.
(nsm-protocol-check--dhe-kx): Update docstring to describe several more
recent attacks, and its removal in TLS 1.3.
Since the introduction of the 'calln' macro, the 'call1', 'call2', ...,
'call8' macros are just aliases for the former. This is slightly
misleading and potentially unhelpful. The number of arguments N can
also easily go out-of-synch with the used alias callN. There is no
reason not to replace these aliases with using 'calln' directly.
To reduce the risk for mistakes, the tool Coccinelle was used to make
these changes. See <https://coccinelle.gitlabpages.inria.fr/website/>.
* src/alloc.c, src/androidvfs.c, src/androidfns.c, src/buffer.c:
* src/callint.c, src/callproc.c, src/casefiddle.c, src/charset.c:
* src/chartab.c, src/cmds.c, src/coding.c, src/composite.c:
* src/data.c, src/dbusbind.c, src/dired.c, src/doc.c:
* src/emacs.c, src/eval.c, src/fileio.c, src/filelock.c:
* src/fns.c, src/frame.c, src/gtkutil.c, src/haikufns.c:
* src/haikumenu.c, src/image.c, src/insdel.c, src/intervals.c:
* src/keyboard.c, src/keymap.c, src/lisp.h, src/lread.c:
* src/minibuf.c, src/nsfns.m, src/nsselect.m, src/pgtkfns.c:
* src/pgtkselect.c, src/print.c, src/process.c, src/sort.c:
* src/syntax.c, src/textconv.c, src/textprop.c, src/undo.c:
* src/w32fns.c, src/window.c, src/xfaces.c, src/xfns.c:
* src/xmenu.c, src/xselect.c, src/xterm.c:
Replace all uses of 'call1', 'call2', ..., 'call8' with 'calln'.
* doc/lispref/internals.texi
(Writing Emacs Primitives): Don't recommend `call0`, `call1`, etc.
Instead recommend `calln`, which covers all of those use cases.
* lisp/tmm.el (tmm--shorten-space-width): New function that
reduces the space between the text menu entry and its keybinding
to avoid a misalignement.
(tmm-add-one-shortcut): Use it. (Bug#75500)