Commit graph

181969 commits

Author SHA1 Message Date
Yuan Fu
ddbd311d37
; Move treesit-languages-require-line-column-tracking to treesit.c.
* lisp/treesit.el: Remove it.
* src/treesit.c (syms_of_treesit): Add it.
2026-04-25 10:49:26 -07:00
Yuan Fu
d3debef28d
Make :range-fn in treesit-range-rules actually work
* lisp/treesit.el (treesit--range-start):
(treesit--range-end):
(treesit--flatten-ranges): New helpers.
(treesit-query-range):
(treesit-query-range-by-language): Don't flatten the ranges
returned by each range-fn.
(treesit--update-ranges-non-local):
(treesit--update-ranges-local): Handle the case where the range
is a complicated ((START . END)...).
* test/src/treesit-tests.el (treesit-range-helper): New test.
2026-04-25 10:49:26 -07:00
Stefan Monnier
28f828e8a6 register.el: Allow jumping to kmacros again (bug#80894)
* lisp/register.el (register--get-method-type): Fix handling for
OClosure args.
* test/lisp/register-tests.el (register--jumpable-p): New test.
2026-04-25 10:41:16 -04:00
Stefan Monnier
5a9cfbd7fd (Info-documentlanguage): Keep Info-related code in info.el
* lisp/simple.el (Info-documentlanguage): Move from here...
* lisp/info.el (Info-documentlanguage): ...to here.
2026-04-25 09:56:25 -04:00
Eli Zaretskii
700768cd1d Fix line-truncation on horizontally-split TTY frames
* src/term.c (append_glyph, append_composite_glyph)
(append_glyphless_glyph): Account for the right-border glyph
when computing the end glyph of TEXT_AREA.  (Bug#80900)
2026-04-25 14:39:53 +03:00
Michael Albinus
aa067441d6 Some minor Tramp fixes
* doc/misc/tramp.texi (Customizing Methods): Add comment.

* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Comment out setting `command-line-max-length', it doesn't work reliably.

* test/lisp/net/tramp-tests.el (tramp-test03-file-error)
(tramp-test26-file-name-completion-boundaries): Adapt tests.
2026-04-25 10:01:37 +02:00
Eli Zaretskii
faa7fa0501 ; * lisp/simple.el (Info-documentlanguage): Add a local safe variable. 2026-04-25 10:36:29 +03:00
Eli Zaretskii
6425df6a80 ; * doc/lispref/text.texi (Undo): Advice about restoring point. 2026-04-25 10:04:47 +03:00
Eli Zaretskii
e077bd21ad ; Improve documentation of Proced
* lisp/proced.el (proced-grammar-alist)
(proced-process-attributes, proced, proced-mode)
(proced-format-alist, proced-format): Doc fixes.
2026-04-25 09:01:48 +03:00
Eli Zaretskii
52c4ef1109 ; * src/process.c (Fprocess_attributes): Doc fix. 2026-04-25 08:48:51 +03:00
Pip Cet
6a19ab9cce Don't modify kbd_fetch_ptr in x_delete_selection_requests (bug#80863)
This code may be called from within the loop in process_special_events
which assumed kbd_fetch_ptr remains unchanged.  This caused a buffer
underflow which resulted in the entire kbd buffer being replayed.

* src/xterm.c (x_delete_selection_requests): Simply clear deleted
events rather than rotating the kbd buffer.
2026-04-24 19:11:16 +00:00
Vincent Belaïche
19d1834ce0 ; doc/translations/fr/misc/ses-fr.texi: Typo. 2026-04-24 13:38:22 +02:00
Vincent Belaïche
44a6a8b754 ; doc/translations/fr/misc/ses-fr.texi: Typo. 2026-04-24 12:39:49 +02:00
Martin Rudalics
f9f6f1210c ;; Clarify doc on 'dedicated' 'display-buffer' action alist entry
* doc/lispref/windows.texi (Buffer Display Action Alists):
Clarify that only new windows can be marked as dedicated via the
action alist entry.
2026-04-24 09:42:58 +02:00
Stefan Monnier
7ac1d0742e (work-buffer--release): Fix bug#80813
* lisp/emacs-lisp/subr-x.el (work-buffer--release): Make sure the
buffer is not left read-only.  Clarify potential limitations to
the cleanup performed, especially w.r.t indirect buffers.
Don't bother binding `deactivate-mark` since that variable is buffer-local
nowadays anyway.
2026-04-23 15:58:40 -04:00
Stefan Monnier
e8535ba110 (comint--fontify-input-fontify-region): Silence messages (bug#80870)
`syntax-propertize` currently doesn't support propertizing only
parts of a buffer.  Maybe we should improve it, maybe via
something like `font-lock-dont-widen` or the `syntax-ppss` support for
narrowing, but in the mean time, teach comint to avoid holes in
the propertization.

* lisp/comint.el (comint--dummy-fontify-syntax): New function.
(comint--fontify-input-fontify-region): Use it to silence the
new "Cannot syntax-propertize" message in `syntax.el`.
Also, refine args to reflect the fact that it's an advice.
2026-04-23 11:16:05 -04:00
Jonas Bernoulli
65bd3fe047
; * lisp/transient.el: Fix compiler warning.
`overriding-text-conversion-style' isn't defined on all platforms, in
which case this is a no-op; there's nothing that has to be suspended.

Re <id:86zf2uc2ve.fsf@gnu.org>.
2026-04-23 16:31:25 +02:00
Sean Whitton
0a04a4bc7a vc-hg-after-dir-status: Rewrite to handle current 'hg status' output
* lisp/vc/vc-hg.el (vc-hg-after-dir-status): Rewrite to handle
renames where the "R" line comes arbitrarily later in the
output.
* test/lisp/vc/vc-hg-tests.el
(vc-hg-test--after-dir-status-expect): New function.
(vc-hg-after-dir-status): New test.
2026-04-23 15:27:20 +01:00
Eli Zaretskii
baa5274445 ; * etc/NEWS: Fix last change (bug#70941). 2026-04-23 14:57:51 +03:00
Peter Oliver
5913101e40 ; * etc/NEWS: Announce "setrgbf" and "setrgbb" terminfo capabilities 2026-04-23 14:53:43 +03:00
Eli Zaretskii
71749c47d9 ; * etc/NEWS: Fix last added entry. (Bug#80451) 2026-04-23 11:36:09 +03:00
Lee Thompson
39202daedd Add language-environment and input methods for Syriac
* lisp/leim/quail/syriac.el: New file
* lisp/language/misc-lang.el: ("Syriac"): New language environment.
("Arabic"): Add comment explaining usage of `arabic-shape-gstring'
for Syriac as well as Arabic.
* etc/NEWS: Announce the new language environment and input methods.
* etc/HELLO: Add a Syriac greeting.
(Bug#80451)
2026-04-23 11:31:10 +03:00
Peter Oliver
fe1d9562f1 Document setrgbb, setrgbf, and Tc terminal capabilities
* doc/misc/efaq.texi (Colors on a TTY): Mention the unofficial
setrgbb, setrgbf, and Tc terminal capabilities, and give an
example custom terminfo defintion using them.  (Bug#70941)
2026-04-23 10:45:01 +03:00
Peter Oliver
74d411d600 Simplify Tc/COLORTERM=truecolor escape sequence
This should be more readable to most people, since C is
more widely familiar than the terminfo language.
* src/term.c (init_tty): Do the conversion from a single integer
24-bit color value to three 8-bit RGB values up-front.
(Bug#70941)
2026-04-23 10:32:50 +03:00
Tim Ruffing
8aa7f6a501 Support setrgbb/setrgbf for setting 24-bit color
* src/term.c (turn_on_face): Account for TF_rgb_separate.
(init_tty): Support setrgbf/setrrgbb and set TF_rgb_separate
accordingly.
* src/termchar.h: Update commentary.
(Bug#70941)
2026-04-23 10:29:00 +03:00
Peter Oliver
84ae97f865 Use expected escape sequence for terminfo Tc and COLORTERM=truecolor
When the non-standard terminfo capability Tc is present, or the
environment variable COLORTERM is set to truecolor, use a
hard-coded escape sequence that addresses all colors directly by
their RGB values.

Previously we used escape sequences cribbed from terminfo's
setaf/setab for direct color, that expect that we will only try to
use colors 000000 to 000007 for the first eight indexed colors.
This isn't something we currently handle.

* doc/misc/efaq.texi (Colors on a TTY): Fix off-by-one error in list
of indexed colors for terminfo RGB terminals.
* src/term.c (init_tty): Don’t use any indexed colors with terminfo
Tc capability or COLORTERM=truecolor environment variable (bug#70941).
2026-04-23 10:20:41 +03:00
Stefan Monnier
4e165cc2d0 (loaddefs--defining-macros): Delete var
Now that Transient-0.13.0 has been merged, we don't need to
treat its macros specially any more because they come with the
appropriate `autoload-macro` property.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs--defining-macros): Delete var.
(loaddefs-generate--make-autoload): Delete corresponding code.
2026-04-22 23:02:59 -04:00
Philip Kaludercic
986892fe30
; Adjust package tests for 789e98e54f
* test/lisp/emacs-lisp/package-tests.el (package-test-get-deps):
Replace test with an analogous test for 'package--dependencies'.
2026-04-22 20:46:33 +02:00
Jonas Bernoulli
45304541ec
Update to Transient v0.13.0-10-g5b2ff26f 2026-04-22 18:53:35 +02:00
Roi Martin
7f1e54c61a Test that ERT creates a list of executed tests from erts files
* test/lisp/emacs-lisp/ert-resources/erts-file-test-list-fail.erts:
* test/lisp/emacs-lisp/ert-resources/erts-file-test-list.erts: New erts
files.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-list-of-erts-file-tests):
New test.
2026-04-22 18:03:47 +02:00
Stefan Monnier
402a0b7075 (mail-citation-prefix-regexp): Fix excessive backtracking (bug#80808)
* lisp/mail/sendmail.el (mail-citation-prefix-regexp): Simplify regexp
and fix docstring to reflect reality since commit 0b8ee42164.
2026-04-22 08:39:48 -04:00
João Távora
cd1a372ccf Eglot: add eglot--server-buffer-name and use it consistently
* lisp/progmodes/eglot.el (eglot--server-buffer-name): New function.

(eglot--connect): Rename events and stderr buffers after serverInfo
arrives to include the server's self-reported name.

(eglot-show-workspace-configuration, eglot-describe-connection)
(eglot--define-hierarchy-command): Use eglot--server-buffer-name.

(eglot--propose-changes-as-diff): Add SERVER argument; use
eglot--server-buffer-name.

(eglot--apply-workspace-edit): Add SERVER argument; pass server to
eglot--propose-changes-as-diff.

(eglot-handle-request workspace/applyEdit, eglot-execute)
(eglot-rename): Pass server to eglot--apply-workspace-edit.
2026-04-22 09:08:36 +01:00
João Távora
ca816386e7 Eglot: add eglot--server-name helper
* lisp/progmodes/eglot.el (eglot--server-name): New function.
(eglot--list-connections-entries, eglot-describe-connection): Use it.
2026-04-22 09:08:36 +01:00
Eshel Yaron
2afa232816
; (string-edit-minor-mode): Fix mode line lighter. 2026-04-22 09:33:59 +02:00
Eli Zaretskii
6f15481be5 ; Fix files-tests on MS-Windows
* test/lisp/files-tests.el
(files-tests-file-name-non-special--temp-file-prefixes): Don't use
a file name with '*' on MS-Windows.
2026-04-22 08:48:49 +03:00
Michael Albinus
901d4fe32a Improve files-tests.el for quoted file names
* test/lisp/files-tests.el
(files-tests-file-name-non-special--temp-file-prefixes): New defconst.
(files-tests-file-name-non-special--subprocess)
(files-tests-file-name-non-special--buffers): Loop over it.
(files-tests--with-temp-non-special)
(files-tests--with-temp-non-special-and-file-name-handler): Simplify.
(files-tests-file-name-non-special-make-symbolic-link):
Pacify compiler warning.
2026-04-21 19:23:21 +02:00
Juri Linkov
330ccd3368 Rebind 'tab-bar-mouse-close-tab' from <down-mouse-2> to <mouse-2>
* lisp/tab-bar.el (tab-bar-map): Unbind <mouse-2> from 'ignore'.
Bind 'tab-bar-mouse-close-tab' to <mouse-2> instead of <down-mouse-2>
(bug#80858).
2026-04-21 19:30:03 +03:00
john muhl
c6ec2c6ce1 ; Cleanup defcustoms in 'lua-mode'
* lisp/progmodes/lua-mode.el (lua-always-show)
(lua-documentation-url): Add :version, remove :group.  (Bug#80840)
2026-04-21 16:36:41 +03:00
Eli Zaretskii
612960d4b3 Fix 'toggle-truncate-lines' when 'visual-line-mode' is ON
* lisp/simple.el (toggle-truncate-lines): Force 'truncate-lines'
non-nil, even if visual-line-mode needs to be turned off.
(Bug#80741)
2026-04-21 16:25:29 +03:00
Leo C. Stein
de09a022a4 Add missing Greek subscripts to TeX input method
* lisp/leim/quail/latin-ltx.el: Add a regex to match Greek
subscripts. Currently there are only five in unicode: beta, gamma,
rho, phi, and chi. They can now be input with the TeX input method
as, e.g., _\beta .  (Bug#80791)
2026-04-21 16:17:32 +03:00
Eli Zaretskii
ccb454f28c Fix unsafe use of SDATA in 'display_tty_menu_separator'
* src/xdisp.c (display_tty_menu_separator): Pass Lisp string to
display_string, not a pointer to its SDATA.  This is safer
GC-wise.
2026-04-21 15:49:07 +03:00
Eli Zaretskii
c1fbe7c408 ; Avoid warnings from 'makeinfo' in Calc manual
* doc/misc/calc.texi (Top, Interactive Tutorial): Fix warnings
emitted by 'makeinfo' due to node inconsistencies with menus.
(Bug#80735)
2026-04-21 15:23:15 +03:00
Roi Martin
62e3549f78 Show executed tests from erts files via the ERT results buffer
* lisp/emacs-lisp/ert.el: Add key binding.
(ert--erts-file-test-execution-observer): New variable.
(ert--signal-erts-file-test-execution): New function.
(ert-test-result): Add field.
(ert-run-test): Collect tests from erts files.
(ert-results-mode-menu): Add entry.
(ert--erts-file-test-name-button): New button type.
(ert--erts-file-test-name-button-action): New function.
(ert-results-pop-to-erts-file-tests-for-test-at-point): New function.
(ert-test--erts-test): Record execution of test from erts file.
* doc/misc/ert.texi (Running Tests Interactively): Update manual.
* etc/NEWS: Update NEWS.  (Bug#80806)
2026-04-21 12:30:48 +02:00
João Távora
28ead74772 Eglot: handle visited file name changes (typically C-x C-w)
When the user renames a buffer's file via set-visited-file-name,
notify the server with didClose (old URI) and didOpen (new URI).
The TextDocumentIdentifier cache still holds the old URI when
after-set-visited-file-name-hook fires, so didClose uses it
correctly; didOpen then clears and rebuilds it from the new name.

* lisp/progmodes/eglot.el (eglot--managed-mode): Hook and unhook
eglot--after-set-visited-file-name-hook.
(eglot--after-set-visited-file-name-hook): New function.
2026-04-21 11:03:50 +01:00
João Távora
baf7e6a44f Eglot: use Unicode box-drawing chars in hierarchy buffers
Use box-drawing characters for the tree guides in hierarchy
buffers when the display supports them.

* lisp/progmodes/eglot.el (eglot--hierarchy-2): Rework.
2026-04-21 11:03:49 +01:00
Philip Kaludercic
6a1c43fe62
; Add a comment to elaborate changes in 0051e2b7 2026-04-21 08:02:37 +02:00
Philip Kaludercic
789e98e54f
Extend utility of 'package-get-descriptor'
The general idea here is to make it easier to handle situations
where you might have a symbol designating a package name or a
'package-desc' object, but you really want the latter.

* lisp/emacs-lisp/package.el (package--get-deps): Remove
function superseded by 'package--dependencies'.
(package--builtin-alist, package--archive-contents): Add new
functions.
(package--removable-packages): Use 'package--dependencies'.
(package--dependencies): Check for circular dependencies.
(package-upgrade, package--upgradeable-packages)
(package--user-installed-p, package-reinstall, package-recompile)
(describe-package-1, package-desc-status, package--mapc)
(package-menu--find-upgrades): Use 'package-get-descriptor'.
(package-get-descriptor): Add optional arguments to allow for
different kinds of queries.

* lisp/emacs-lisp/package-vc.el
(package-vc-install-selected-packages)
(package-vc--generate-description-file)
(package-vc-install-dependencies, package-vc--read-package-desc)
(package-vc-install, package-vc-checkout): Use
'package-get-descriptor'.
2026-04-21 08:02:37 +02:00
João Távora
1b2a8de314 Eglot: unbreak diagnostics in symlinked projects
Now that 'eglot-uri-to-path' tries to return
"project-root-familiar" paths, unresolving the absolute path
name, it's important to update 'eglot--find-buffer-visiting' to
consider the two alternative ways to refer to a file.  IOW, this
was already a bug, but the latest changes to 'eglot-uri-to-path'
made it more evident.

* lisp/progmodes/eglot.el (eglot--find-buffer-visiting): Also
consider buffer-file-name.
2026-04-20 16:13:57 +01:00
Michael Heerdegen
ddef61cd4b ; Additional small tweaks of map.el methods
* lisp/emacs-lisp/map.el (map-into, map-do): Doc tweaks.
(Bug#80804)
2026-04-20 16:03:25 +03:00
Martin Rudalics
b7eb715a13 Fix control window setup in 'ediff-setup-windows-plain-compare' (Bug#80809)
* lisp/vc/ediff-wind.el (ediff-setup-windows-plain-compare): Do
not call 'display-buffer-in-direction' directly (Bug#80809).
2026-04-20 10:33:55 +02:00