Commit graph

181921 commits

Author SHA1 Message Date
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
Roland Winkler
6de3bc0bf2 proced-format: Simplify last change
* lisp/proced.el (proced-current-process): Rename from
proced-format-current-process.
(proced-format): Use it.  Simplify.
2026-04-19 23:28:18 -05:00
Kyle Meyer
0d8ccbfe59 Update to Org 9.8.3 2026-04-19 23:10:39 -04:00
Yuan Fu
29751e4724
Make sure treesit-fill-reindent-defun handles nil defun (bug#80860)
* lisp/treesit.el (treesit-fill-reindent-defun): Display error
when there's no defun at point.
2026-04-19 20:01:25 -07:00
Yuan Fu
3d0597e9b2
* src/treesit.c (Ftreesit__linecol_at): Add treesit_check_position. 2026-04-19 19:50:12 -07:00
Yuan Fu
6894b65440
Fix tree-sitter variable name
* lisp/treesit.el:
(treesit-languages-require-line-column-tracking): This is what
treesit.c uses.
* src/treesit.c: Fix comment typo.
2026-04-19 19:50:12 -07:00
Michael Albinus
b0034dffcc Some minor Tramp changes
* lisp/net/tramp-sh.el (tramp-get-remote-arg-max): New defun.
(tramp-open-connection-setup-interactive-shell): Use it.

* lisp/net/tramp.el (tramp-multi-hop-p-hook): New defvar.
(tramp-multi-hop-p): Use it.
(tramp-handle-make-process): Set TERM environment.
2026-04-19 15:19:20 +02:00
Paul Eggert
38e704c1dc emacs server sending long-line simplification
Now that emacsclient can receive long lines without problems,
don’t bother splitting long lines when sending to it.
* lisp/server.el (server-msg-size): Now obsolete.
(server-reply-print): Send qtext without trying to break it
into pieces (Bug#80807#49).
2026-04-18 22:33:52 -07:00
Paul Eggert
1ae3a09032 Pacify clang 21.1.8 + gdk-pixbuf 2.44
* src/pgtkfns.c (xg_set_icon_from_xpm_data):
* src/xfns.c (xg_set_icon_from_xpm_data):
Also pacify clang when --enable-gcc-warnings is used.
2026-04-18 22:33:52 -07:00
Stefan Monnier
e6873462ce (js-jsx--detect-after-change): Fix test regression
Commit 6942d508f0 made js-mode-regexp-syntax-bug-25529 fail,
because it changes the moment and place in which
`syntax-propertize` gets called, uncovering a bug where
`js-jsx--detect-after-change` narrows the buffer, then calls
`re-search-forward` which calls `syntax-propertize`, so we end
up doing `syntax-propertize` while narrowed which can fail in
all kinds of ways.

* lisp/progmodes/js.el (js-jsx--detect-and-enable): Change optional arg
to BEG and END.
(js-jsx--detect-after-change): Use them to avoid narrowing.

* lisp/emacs-lisp/syntax.el (syntax-propertize): Emit a message
when called narrowed and the narrowing starts later than the
nearest already propertized position.
2026-04-19 00:01:22 -04:00
Philip Kaludercic
0ed0ff69e5
; Fix cl-loop related typo from 27434c0f 2026-04-18 14:49:06 +02:00
Eli Zaretskii
0fb341c4b4 Merge from origin/emacs-30
8f535370b9 * src/image.c (svg_load_image): Fix off-by-one mistake (b...
fe90f2d87e * test/infra/gitlab-ci.yml (default): User docker 28.5.2.

# Conflicts:
#	src/image.c
2026-04-18 08:43:50 -04:00
Philip Kaludercic
0051e2b707
Suppress queries when installing package from file
* lisp/emacs-lisp/package.el (package-install-file): Assume it
is OK to set the visited file name, since we are not actually
touching anything on disk, and prevent the modified flag from
preventing us to kill the temporary buffer.  The flag is set by
tar-mode.
2026-04-18 14:29:07 +02:00
Philip Kaludercic
27434c0f9d
Use git-diff(1) in 'package-review-diff-command' if available
* lisp/emacs-lisp/package.el (package--review-git-diff-command):
Add new constant to avoid duplicating the exact command as the
default value and in the type of the user option.
(package-review-diff-command): Use git-diff(1) if Git is
installed, and fall back to regular diff(1) otherwise.  The
previous default value has been moved to the user option, as a
suggested alternative.
(package-review): Support the ability to use symbols, that get
replaced and expanded into the list of switches.

(Bug#80684)

Co-Authored-By: Daniel Mendler <mail@daniel-mendler.de>
2026-04-18 14:29:07 +02:00
Philip Kaludercic
c4902924b6
; Add missing docstring for 'package-matches-selector-p'
* lisp/emacs-lisp/package.el (package-matches-selector-p): New
docstring based on 'package-review-policy'.
2026-04-18 14:29:07 +02:00
Eli Zaretskii
8f535370b9 * src/image.c (svg_load_image): Fix off-by-one mistake (bug#80851). 2026-04-18 10:35:05 +03:00
Yuan Fu
5e7518b838
; * src/treesit.c (compute_new_linecol_by_change): Fix comment. 2026-04-17 20:19:58 -07:00
Yuan Fu
1b8512d676
Fix c-ts-mode-set-style when STYLE is a function (bug#80777)
* lisp/progmodes/c-ts-mode.el (c-ts-mode-set-style): Prepend the
language symbol in front of the styles.
2026-04-17 18:25:28 -07:00
Rahguzar
af95583f7d proced-format: Use internal var for speed-up (bug#77775).
* lisp/proced.el (proced-format-current-process): New variable.
* lisp/proced.el (proced-format-pid, proced-format): Use it.
2026-04-17 18:06:17 -05:00
Rahguzar
cffc12c8cd proced-format: Use process-alist for standard attributes (bug#77775).
* lisp/proced.el (proced-format): Use process-alist for standard
attributes.
2026-04-17 18:03:58 -05:00
Sean Whitton
a236442581 vc-hg--checkin: Use vc-hg--active-bookmark-internal
* lisp/vc/vc-hg.el (vc-hg--active-bookmark-internal): Make it
work when default-directory is not the repository root.
(vc-hg--checkin): Use vc-hg--active-bookmark-internal instead of
vc-hg--working-branch.
2026-04-17 14:39:03 -04:00
Stephen Berman
abde2d1ed3 Restrict Dired handling of newlines in file names
* lisp/dired.el (dired--ls-accept-b-switch-p): New function.
(dired-internal-noselect): Use it in the condition on displaying
warning about filenames with newlines.
(dired--set-auto-toggle-b-switch): Use it to conditionalize
calling 'dired--toggle-b-switch'.
(dired-auto-toggle-b-switch, dired--toggle-b-switch): Improve doc
string.

* test/lisp/dired-tests.el (dired-test-filename-with-newline-1)
(dired-test-filename-with-newline-2): Skip unless Dired uses an
'ls' that supports the '-b' switch.

* etc/NEWS: Adjust accordingly the announcements of the Dired
warning and the new user option for file names with newlines.
2026-04-17 19:26:37 +02:00
Aaron L. Zeng
c92354d190 vc-hg--checkin: When committing a patch, advance active hg bookmark
* lisp/vc/vc-hg.el (vc-hg--checkin): When committing a patch,
advance any active hg bookmark (bug#80848).

Copyright-paperwork-exempt: yes
2026-04-17 12:31:14 -04:00
Michael Albinus
00b767089e Extend integration of external operations in Tramp
* doc/misc/tramp.texi (Extension packages): Use another format
char in example.
(New operations): Document different argument types.  Extend example.

* lisp/net/tramp.el: Use consequently `eq', `assq', `memq'.
(tramp-file-name-for-operation-external): Extend docstring.
(tramp-file-name-for-operation): Make more use of
`tramp-file-name-for-operation-external'.
(tramp-add-external-operation): New optional argument `arg-type'.

* test/lisp/net/tramp-tests.el (tramp--handle-test-operation):
Rename from `tramp--handler-for-test-operation'.
(tramp--handle-process-id)
(tramp--test-operation-file-name-for-operation): New defuns.
(tramp-test49-external-backend-function): Extend test.
2026-04-17 16:48:16 +02:00
Paul Eggert
eda9a819ce Append newline to server -error commands
Problem reported by Zhengyi Fu (bug#80844).
* lisp/server.el (server--process-filter-1, server-return-error)
(server-edit-abort): Append newline to -error commands, too.
Otherwise emacsclient has no reliable way to find the end of the
error command’s argument, except to wait for EOF which is
undesirable since the Emacs server keeps the socket open
for a while, waiting for emacsclient to exit.
2026-04-16 23:33:35 -07:00
Yuan Fu
35a8e7e068
Make sure range (1, 1) doesn't capture anything (bug#80798)
* src/treesit.c (Ftreesit_query_capture): Return Qnil if
querying (1, 1).
2026-04-16 23:23:25 -07:00
Yuan Fu
5ea181a75e
Accept marker as position in treesit.c functions (bug#80830)
* src/treesit.c (treesit_check_positive_integer): Remove.
(treesit_check_position):
(Ftreesit_node_first_child_for_pos):
(Ftreesit_node_descendant_for_range):
(Ftreesit_query_capture):
(Ftreesit__linecol_at): Use fix_position.

* test/src/treesit-tests.el:
(treesit-query-marker-position): Test.
2026-04-16 23:23:12 -07:00
João Távora
cbbe2b5f55 Eglot: add M-x eglot-describe-connection
Also add more bindings to M-x eglot-list-connections

* lisp/progmodes/eglot.el (eglot-list-connections-mode-map): Add
bindings for e, w, RET.
(eglot-events-buffer-of-listed-connection)
(eglot-show-workspace-configuration-of-listed-connection)
(eglot-describe-listed-connection): New commands.
(eglot-describe-connection): New command.

* doc/misc/eglot.texi: Document new keys and eglot-describe-connection.

* etc/EGLOT-NEWS: Announce.
2026-04-17 00:19:51 +01:00
Sean Whitton
f6bb77270f vc-file-tree-walk: Stop emitting messages
* lisp/vc/vc.el (vc-file-tree-walk, vc-file-tree-walk-internal):
Stop emitting messages about traversing directories.
2026-04-16 16:50:32 -04:00
Sean Whitton
2259c116ae vc-file-tree-walk-internal: Use vc-registered
* lisp/vc/vc.el (vc-file-tree-walk-internal): Use vc-registered
not vc-backend, for robustness.
2026-04-16 16:49:56 -04:00
Sean Whitton
c93a6bd5d8 ; Fix formatting. 2026-04-16 16:10:02 -04:00
Sean Whitton
75fd526980 ; Fix last change. 2026-04-16 16:08:36 -04:00
Sean Whitton
792fef0583 vc-rename-file: Fix skipping calling into the backend
* lisp/vc/vc.el (vc-rename-file): Replace broken attempted use
of vc-dir-status-files with walking OLD using vc-file-tree-walk.
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-directory):
Assert that the files are registered or not as appropriate.  New
test case in which there are only registered files.
2026-04-16 14:36:45 -04:00
João Távora
f146bfe3e7 Jsonrpc: simplify previous change
* lisp/jsonrpc.el (jsonrpc--save-excursion-maybe): Delete.
(jsonrpc--forwarding-buffer, jsonrpc--log-event): Use simple
save-excursion.
2026-04-16 18:46:39 +01:00
João Távora
ce06e8cdef Eglot: adjust previous change to eglot-uri-to-path
* lisp/progmodes/eglot.el (eglot-uri-to-path): Tweak.
2026-04-16 18:20:23 +01:00
Juri Linkov
d88e73d047 Update 'crm-complete-and-exit' from 'minibuffer-complete-and-exit'
* lisp/emacs-lisp/crm.el (crm-complete-and-exit):
Add new arg 'no-exit'.  Call 'minibuffer-choose-completion'
when 'completion--selected-candidate' returns non-nil (bug#80821).
2026-04-16 20:12:03 +03:00
Stefan Monnier
126eab79b0 src/syntax.c (update_syntax_table): Remove redundant assignment 2026-04-16 11:39:26 -04:00
Michael Albinus
1811ce52c2 ; * etc/NEWS: Presentational fixes and improvements. 2026-04-16 17:31:07 +02:00
Vincent Belaïche
3d822669ee Announce ert-play-keys in etc/NEWS. 2026-04-16 17:09:04 +02:00
Sean Whitton
ae822de38d ; newcomers-presets: FIXME. 2026-04-16 09:22:06 -04:00
Michael Albinus
ed98d9f81f ; * doc/misc/ert.texi: Fix typos. 2026-04-16 14:50:28 +02:00
Vincent Belaïche
5b6fc8ebfc ert-play-keys function
* lisp/emacs-lisp/ert-x.el (ert-play-keys): new defun.

* test/lisp/simple-tests.el (undo-test-kill-c-a-then-undo)
(undo-test-point-after-forward-kill): Use new function
`ert-play-keys' and `(ert-with-test-buffer (:selected t) ...)'
rather (with-temp-buffer (switch-to-buffer (current-buffer) ...)'.

* test/lisp/erc/erc-scenarios-spelling.el
(erc-scenarios-spelling--auto-correct): Use new function
`ert-play-keys' and `(ert-with-buffer-selected ...)' rather than
`execute-kbd-macro' and `(with-current-buffer
... (set-window-buffer nil (current-buffer) ...)'.

* doc/misc/ert.texi (Helper Functions): Document ert-play-keys,
and differences between ert-simulate-command, ert-simulate-keys
& ert-play-keys.

* test/lisp/emacs-lisp/ert-x-tests.el
(ert-x-tests-play-keys)
(ert-x-tests-simulate-command, ert-x-tests-simulate-keys): New
tests.
2026-04-16 13:30:42 +02:00
João Távora
1c4c9d759a Eglot: add shutdown/reconnect bindings to eglot-list-connections buffer
* lisp/progmodes/eglot.el (eglot-list-connections-mode-map): New
defvar.

* lisp/progmodes/eglot.el (eglot--list-connections-entries): New
function, extracted from eglot-list-connections.

* lisp/progmodes/eglot.el (eglot--list-connections-cmd): New macro.

* lisp/progmodes/eglot.el (eglot-shutdown-listed-connection)
(eglot-reconnect-listed-connection): New commands.

* lisp/progmodes/eglot.el (eglot-list-connections): Use
eglot--list-connections-entries.

* doc/misc/eglot.texi: Document eglot-list-connections and new keys.

* etc/EGLOT-NEWS: Announce.
2026-04-16 09:28:21 +01:00
João Távora
d7c9676ec8 Jsonrpc: don't suddenly jump point in events buffer
* lisp/jsonrpc.el (jsonrpc--save-excursion-maybe): New macro.

* lisp/jsonrpc.el (jsonrpc--log-event, jsonrpc--forwarding-buffer):
Use it.
2026-04-16 08:41:38 +01:00
João Távora
213b8e0b97 Eglot: un-canonicalize server URIs to project's root
Some LSP servers prefer to canonicalize all document URIs to
their "true name", chasing all fs symbolic links.  If the user
is visiting a project under a symlink, say ~/myprojects/foo
which points to /data/true/projects/foo.  When visiting a
~/myprojects/foo/f.c and trying to jump to a nearby file f.h via
LSP 'xref-find-definitions', the path should probably be
~/myproject/foo/f.h, not /data/true/projects/foo/f.h.

Even though Emacs can recognize that the two files are the same,
'buffer-file-name' is not.  This confuses tools like C-x C-f,
ibuffer, and ultimately the users themselves who probably
oblivious to the true place of the project.  After all they
started Eglot under a syminked file.

* lisp/progmodes/eglot.el (eglot-lsp-server): Add trueroot slot.
(eglot-uri-to-path): Rework to consider trueroot and project root.
2026-04-16 08:05:13 +01:00
Eli Zaretskii
abcd0d3c8d ; * lisp/isearch.el (isearch-occur): Doc fix. (Bug#80785) 2026-04-16 08:26:33 +03:00
Toby Dylan Hocking
eb4835e521 Make | optional for 'gnu' regexp in compilation-mode (bug#80681)
* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Make leading '|'
optional when there are leading spaces (bug#80681).
* etc/compilation.txt (GNU style): New error with two leading
spaces.
* test/lisp/progmodes/compile-tests.el
(compile-test-error-regexps): Increment expected
compilation-num-errors-found.
(compile-tests--test-regexps-data): New error test case for
'gnu' with two leading spaces.  Change expected match for
'cucumber' to match again 'gnu'.

Copyright-paperwork-exempt: yes
2026-04-15 18:11:00 -04:00
Sean Whitton
5045394694 vc-rename-file: Fix case of directory with only untracked files
* lisp/vc/vc.el (vc-rename-file): Don't call into the backend if
moving a directory containing only untracked files.
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-directory):
New test for this case.
2026-04-15 17:59:10 -04:00
Sean Whitton
324e5b4177 ; * test/lisp/vc/vc-tests/vc-tests.el: Disable new tests on RCS. 2026-04-15 13:53:58 -04:00