* src/xdisp.c (handle_single_display_spec): Use FIXNATP for margin column.
Also use 'Vleft_margin_columns' instead of 'Fsymbol_value' (bug#80025).
(left-margin-columns, right-margin-columns): Use Fmake_variable_buffer_local.
* src/term.c (append_glyph): Add 'handled_column' variable
and use it on existing code instead of immediately returning
after adding margin column glyph (bug#80025).
* src/xdisp.c (left-margin-columns, right-margin-columns): New variables.
(handle_single_display_spec): Find the column number that
corresponds to the position of the column symbol in these variables.
* lisp/outline.el (outline--create-button-icons):
Add the symbol 'outline' to margin column spec.
(outline-minor-mode): Add/remove the symbol 'outline' to/from
'left-margin-columns' and 'right-margin-columns'.
* lisp/progmodes/flymake.el (flymake--bs-display):
Add the symbol 'flymake' to margin column spec.
(flymake--restore-margins): Remove the symbol 'outline' from
'left-margin-columns' and 'right-margin-columns'.
(flymake--resize-margins): Add the symbol 'outline' to
'left-margin-columns' and 'right-margin-columns'.
* lisp/progmodes/hideshow.el (hs--make-indicators-overlays):
Add the symbol 'hideshow' to margin column spec.
(hs-minor-mode): Add/remove the symbol 'outline' to/from
'left-margin-columns'.
* src/term.c (append_glyph):
* src/xdisp.c (produce_image_glyph):
Copy the margin-column random-access indexing with space-padding
from 'append_glyph' in xdisp.c. Also copy code from the end of these
functions before return after handling the margin column.
* src/dispextern.h (it): Add 'margin_column' field.
* src/xdisp.c (handle_single_display_spec): Parse margin column
specification '(margin left-margin COLUMN)' and set the column
to 'it->margin_column'.
(append_glyph): Support random-access indexing of margin column,
padding with spaces when the required column is beyond the used area.
* test/lisp/progmodes/project-tests.el
(project-vc-supports-project-in-different-dir):
Account for difference in behavior when failing over to 'find'
(comments in bug#79809).
Provide a command to easily swap FROM and TO arguments in a query
replace operation.
* lisp/replace.el (query-replace-read-transpose-from-to): New function.
(query-replace-read-map): New keymap.
(query-replace-read-from): Use new keymap to read from minibuffer.
(read-regexp-map): Inherit from 'query-replace-read-map'.
(query-replace-read-from, query-replace-read-to): Fix parameter
references in doc strings.
* etc/NEWS: Document the change. (Bug#79835)
* lisp/imenu.el (imenu--flatten-index-alist): Add special handling
of the text property 'breadcrumb-region' added by 'eglot-imenu'.
Add non-leaf nodes with these text properties to the flat index alist.
(imenu--parentify-index-alist): New function.
(imenu-choose-buffer-index): For the case when imenu-flatten is nil,
use 'imenu--parentify-index-alist' to add separate ".." to non-leaf nodes
when the first node of 'index-alist' has Eglot text properties (bug#79980).
* src/editfns.c (Ftranspose_regions): Separate code related to character
semantics from that related to byte semantics and in that way leverage
optimizations for regions of equal length with respect to both
semantics. Move and update comments dating back to the initial
implementation.
* test/src/editfns-tests.el (editfns-tests--transpose-regions-tests)
(editfns-tests--transpose-regions-markups)
(editfns-tests--transpose-regions): New test and accompanying variables.
* src/editfns.c (Ftranspose_regions): Calculate length of range between
regions both in units of bytes and characters and use these values as
appropriate.
This solves for background vtable mutations, i.e., updates
initiated from buffers other than the vtable buffer, and for
buffer-adjusted string-pixel-width computations.
* lisp/emacs-lisp/vtable.el (vtable): New '-buffer' slot.
(vtable-buffer, vtable-set-buffer): New function.
(vtable-update-object, vtable-remove-object)
(vtable-insert-object): Wrap operation with the vtable buffer.
(vtable--insert): Split from old 'vtable-insert'.
(vtable-insert): Insert table and record the buffer.
(vtable--insert-line, vtable--insert-header-line): Use
'vtable-buffer' for pixel-width computation.
(vtable--limit-string, vtable--char-width): Pass buffer to
'string-pixel-width'.
(vtable-revert): New optional table argument.
(vtable--alter-column-width, vtable-revert-command)
(vtable-sort-by-current-column): Call 'vtable-revert' with the
table.
* test/lisp/emacs-lisp/vtable-tests.el
(vtable-tests--make-no-header-2-object-table): New helper
function.
(test-vstable-compute-columns): Correct typo in test name. Use
new helper function.
(test-vtable-unique-buffer)
(test-vtable-non-current-buffer-insert-object)
(test-vtable-non-current-buffer-remove-object)
(test-vtable-non-current-buffer-update-object)
(test-vtable--limit-string-with-face-remapped-buffer): New test.
* lisp/progmodes/csharp-mode.el
(csharp-ts-mode--font-lock-settings): Improve specificity
of selectors. Don't let type-selector bleed into
name-selector. (Bug#80038)
* lisp/hi-lock.el (hi-lock-line-face-buffer, hi-lock-face-buffer)
(hi-lock-face-phrase-buffer): Use the new function
`hi-lock-read-regexp' to read font-lock patterns, mirroring
`hi-lock-read-face-name' used to read face names. For end users,
all three functions now get the default value from the active
region, rather than just `hi-lock-face-buffer'.
(hi-lock-read-regexp): Extract font-lock pattern reading
functionality from `hi-lock-face-buffer' into this function, to
mirror how faces are read with `hi-lock-read-face-name' and to
promote reuse. (Bug#79976)
Suggested by Mattias Engdegård (bug#80021#17).
* src/lisp.h (lisp_h_FIXNUMP, lisp_h_TAGGEDP):
Go back to the simpler (X&7) == TAG approach for checking object tags.
This reverses my commit ccdb08ef4e
“Improve performance of CONSP, FIXNUMP, etc.”
dated 2018-08-25 13:39:18 -0700,
though it keeps the TAGGEDP function the older commit introduced.
Although the older commit improved performance on its circa 2010
platform, when I ran today’s ‘make -C lisp compile-always’
benchmark on Ubuntu 25.10 which uses gcc (Ubuntu 15.2.0-4ubuntu4)
on an circa-2021 Intel Xeon W-1350, this patch makes the
‘make -C lisp compile-always’ benchmark 3.1% faster. Although the
patch unfortunately also makes the Emacs text segment 0.6% larger,
in this case speed and simplicity beat text size in importance.
Without the fix, ‘make compile-always’ failed nearly immediately
in a native compilation build, with ‘ELC+ELN
emacs-lisp/loaddefs-gen.elc’ outputting “Error: file-missing
("Cannot open load file" "No such file or directory" "comp")...”.
* lisp/Makefile.in (compile-always):
Build ../src first, since the ‘find ... -delete’ removes files
needed by ‘make compile’.
Else will make a number of file-notify descriptors proportional to
the number of files in a directory (though this doesn't apply to
out-of-root watchers).
* lisp/progmodes/eglot.el (eglot--watch-globs): Tweak.
This reverts commit 821c0d36df.
Despite re-enacting what the modern Git versions seem to do under the
covers, the effect is not the same: filtering works differently.
When find-based directory listing fails, fallback to project-files
strategy for robustness.
* lisp/progmodes/eglot.el (eglot--watch-globs): Inline directory
listing and add error handling with fallback. Rename BASE-PATH to DIR,
add IN-ROOT parameter.
(eglot--list-directories): Delete
(eglot-register-capability): Adjust caller, group by both DIR and
IN-ROOT.
* test/lisp/erc/erc-scenarios-join-display-context.el
(erc-scenarios-join-display-context--errors): Attempt to indirectly fix
a reoccurring failure on EMBA. Instead of asserting the membership of
`erc-join--requested-channels', have the client attempt to manually join
an autojoined channel previously denied by an error response. But this
time assert that the display context for the now successfully joined
channel doesn't indicate it originated from the autojoin module.
* test/lisp/erc/resources/base/gapless-connect/barnet.eld: Increase
timeout.
* test/lisp/erc/resources/join/buffer-display/mode-context.eld: Update
accordingly.