Commit graph

183417 commits

Author SHA1 Message Date
Sean Whitton cfc72c30b5 prepare-user-lisp: Don't skip symlinks to directories
* lisp/startup.el (prepare-user-lisp): Don't skip symlinks to
directories (bug#81810).
2026-09-09 09:47:54 +01:00
Spencer Baugh 8268065404 Check for killed buffer when leaving minibuffer (Bug#81828)
* src/minibuf.c (read_minibuf): Check if the old current buffer
was killed before trying to restore it when leaving the minibuffer.
2026-09-09 10:04:32 +02:00
Jared Finder bfdc20a1c4 New support for Ghostty terminal emulator
* lisp/faces.el (term-file-aliases): Alias xterm-ghostty to
ghostty.
* lisp/term/ghostty.el: New file.
2026-09-08 15:46:13 +01:00
Eli Zaretskii 63d2a70a42 ; * doc/emacs/maintaining.texi (Looking Up Identifiers): Minor addition. 2026-09-08 16:00:51 +03:00
Sean Whitton ed6366876c vc-dir--count-outgoing: Check overlay still exists
* lisp/vc/vc-dir.el (vc-dir--count-outgoing): Check overlay
still exists.
2026-09-08 11:16:20 +01:00
Aaron L. Zeng 0791a547c0 Prevent vc-set-async-update error in process sentinel
* lisp/vc/vc-dir.el (vc-dir-refresh): New OK-IF-ALREADY-RUNNING
argument.
(vc-dir): Use it so that we do not error if already refreshing
(bug#81798).
* lisp/vc/vc-dispatcher.el (vc-set-async-update): Use it such
that if VC-Dir is already refreshing, we restart the refresh.
2026-09-08 10:25:24 +01:00
Paul Eggert 45ee1b7266 Fix bug with canvas_apply_data and bignum data
* src/image.c (canvas_apply_data):
Don’t assume uint32_t fits into fixnum (Bug#81816).
2026-09-07 22:32:34 -07:00
Dmitry Gutov 7a1ba0b645 xref-make-etags-location: Add docstring
* lisp/progmodes/etags.el (xref-make-etags-location):
Add docstring.
2026-09-08 06:17:46 +03:00
Dmitry Gutov 38a6fd7cea ; Correct the binding in NEWS entry 2026-09-08 05:39:50 +03:00
Roi Martin e33b54d938 Rename outline-xref' command to outline-find-headings'
* etc/NEWS: Update entry.
* lisp/outline.el (outline-mode-prefix-map, outline-mode-menu-bar-map):
Use `outline-find-headings'.
(outline-find-headings--fetch-xrefs): Rename from
`outline-xref--fetch-headings'.
(outline-find-headings--show-xrefs): Rename from
`outline-xref--show-xrefs'.
(outline-find-headings): Rename from `outline-xref'.
* test/lisp/outline-tests.el
(outline-tests--outline-find-headings-search-function): Rename from
`outline-tests--outline-xref-search-function'.
(outline-tests--outline-find-headings-regexp): Rename from
`outline-tests--outline-xref-regexp'.
(outline-tests--outline-find-headings-undefined): Rename from
`outline-tests--outline-xref-undefined'.  (Bug#81592)
2026-09-08 05:36:42 +03:00
Stéphane Marks ae474d3864 c-ts-mode-indent-style support for setopt-local (bug#81151)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-style-setter):
Add BUFFER-LOCAL argument.  If setting globally, do not override
buffer locals.
(c-ts-mode--simple-indent-rules): Remove 'style' arg, use
`'-ts-mode-indent-style' instead.  Handle the case where
this style is a function.  Set 'treesit-simple-indent-rules'.
(c-ts-mode-set-style, c-ts-mode, c++-ts-mode): Adjust accordingly.
2026-09-07 18:07:50 -04:00
Paul Eggert 89100e9c71 Port emacs-module-tests to Solaris 10
* test/src/emacs-module-tests.el (mod-test-sum-test)
(module-function-object):
Also allow a function name "_DYNAMIC" (Bug#81471).
2026-09-07 14:12:35 -07:00
Stefan Monnier 6c54097767 test/lisp/simple-tests.el (simple-tests--undo): Avoid continuing undo
Make sure the first 'undo' is not treated as the continuation of
some previous undo.
2026-09-07 14:12:58 -04:00
Sean Whitton 619a395916 VC-Dir: Fix error on `n' before "./" has appeared
If you typed `n' before "./" had appeared, Emacs signalled a
wrong-type-argument error.  Now it signals a better one.

* lisp/vc/vc-dir.el (vc-dir--before-dotname-p): Return nil if
the "./" entry hasn't appeared yet.
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test-vc-dir-next/previous): Simulate the problem case.

* lisp/emacs-lisp/ewoc.el (ewoc-goto-next): Signal a user-error
instead of a plain error.  This makes sense for all the current
call sites.  (This is secondary to the bug fix above: this code
was never reached, previously.)
2026-09-07 14:14:01 +01:00
João Távora 0ed3fa830d Eglot: simplify and consolidade xref integration
Recently, xref gained the xref-find-by-kind API, and Eglot gained
support for that.  This commit restructures Eglot's side: any
non-definition LSP reference-like (generic references, declaration,
implementation, and typeDefinition) can now be requested for any
arbitrary symbol, even if point is not on that symbol (of course as long
as the server supports the 'workspace/symbol' method).

This historically hairy code is made somewhat simpler and should agree
with users' expectations of commands like C-u M-?.

However, there is still a wrinkle: some servers (clangd, ty, but not
rust-analyzer) need the document where the canonical definition site
lives to have been explicitly 'didOpen'ed by the client.  And we need
the canonical definition site to request references for an arbitrary
symbol, because LSP itself barely knows about "symbols", i.e. they are
not first-class entities.  LSP only knows document locations.

The previous approach by Dmitry Gutov's did the heroics: it visited the
URI transiently, just to place point on the definition and then request
the special kind of reference.  This worked, but (1) is only needed if
the URI isn't already visited (2) is somewhat hacky and risks things
like surpsising confirmation prompts and user hooks.

Perhaps this wrinkle can be addressed later with a lighter weight
version of a 'didOpen'-sending helper.  For now, we take the simpler
approach: craft the request directly from the information we got from
'workspace/symbol', even if that info points to unmanaged LSP documents.
If the server complains, so be it.  Users should at least be able to
read the message and visit the file themselves.

For reference, Clangd's behavior is seen a server bug, according to
https://discourse.llvm.org/t/clangd-explicit-and-implicit-doc-open/205/2
and https://github.com/microsoft/language-server-protocol/issues/861.

* lisp/progmodes/eglot.el (eglot--lsp-xrefs-for-id): New function.
(eglot--lsp-xrefs-for-method, eglot--lsp-xref-helper): Delete,
folding into eglot--lsp-xrefs-for-id.
(eglot--lsp-xref-refs): Delete variable.
(xref-backend-identifier-at-point): Return symbol at point.
(xref-backend-definitions, xref-backend-references)
(xref-backend-xrefs-by-kind): Use new helper.
(xref-backend-xref-kinds): Rewrite.
(eglot--deffinder): New helper
(eglot-find-declaration, eglot-find-implementation)
(eglot-find-typeDefinition): Rewrite using eglot--deffinder.
2026-09-07 12:36:37 +01:00
Eli Zaretskii f1288078ff ; Avoid compilation warning on MS-Windows
* src/image.c (image_bitmap_pixmap): Add back the required
type-cast.
2026-09-07 13:55:20 +03:00
Paul Eggert d418272f31 Port diff-mode-tests to POSIX diff
Do not assume that diff has the -a option, as POSIX does not
require it.  Problem found on Solaris 10 (bug#81480).
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock)
(diff-mode-test-font-lock-syntax-one-line)
(diff-mode-test-git-patch)
(diff-mode-test-git-patch/before-first-hunk)
(diff-mode-test-git-patch/signature):
Skip unless "diff -a" works.
2026-09-07 01:57:17 -07:00
Paul Eggert 962b0d07cd Update from Gnulib by running admin/merge-gnulib 2026-09-06 16:02:06 -07:00
Paul Eggert d56b7e6a7e Port grep-compute-defaults to Solaris grep
grep.el assumes support for grep -E, which is universal among
Emacs platforms except for Solaris /usr/bin/grep.  So, on Solaris
substitute a grep that supports -E, if available in one of the
standard Solaris locations.  In the usual case where one is
available, this fixes Bug#81483.
* lisp/progmodes/grep.el (grep-compute-defaults):
On Solaris, prefer /usr/sfw/bin/grep or /usr/xpg4/bin/grep to
plain grep if plain grep lacks support for -E.
2026-09-06 14:12:12 -07:00
Paul Eggert 0076b8df57 Port nsm-check-local-subnet-ipv4 test to Solaris 10
* test/lisp/net/nsm-tests.el (nsm-check-local-subnet-ipv4):
Don’t test the nsm-trust-local-network case when
network-interface-list reports no network interfaces.
On Solaris 10, network-interface-list always returns nil because
Solaris 10 lacks getifaddrs, and it’s not worth our trouble to
port network-interface-list to the hacky way this obsolescent OS
reports network interfaces (bug#81473).
2026-09-06 10:39:33 -07:00
Paul Eggert 8cfcc3cb00 Port tab-bar-tests to Solaris
* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window):
Test tty-type "linux" only on gnu/linux, as it may not exist
on other platforms, e.g., Solaris (bug#81477).
2026-09-06 10:19:10 -07:00
Dmitry Gutov 7904066fb7 ; Fix a typo 2026-09-06 15:45:04 +03:00
Eli Zaretskii 6e9fd53cca ; Fix last change in latexenc.el
* lisp/international/latexenc.el
(latexenc-find-file-coding-system): Fix last change.
2026-09-06 13:28:59 +03:00
Eli Zaretskii a947231851 Port gcc-tests to Solaris 10’s GCC 3.4.3
Problem reported by Paul Eggert (Bug#81484).
* test/lisp/cedet/semantic/bovine/gcc-tests.el (semantic-gcc-test):
Do not assume GCC is version 4 or later.
(semantic-gcc-test/1, semantic-gcc-test/6): Update GCC version number.
* test/src/regex-emacs-tests.el (regex-tests-generic-line):
Read the test file in utf-8-unix.
2026-09-05 14:46:22 -07:00
Jim Porter 6b53a6f9e4 Use completion boundaries in 'pcomplete-long-option-completion-table'
This indicates that the current completion field is complete when the
string is, e.g. "--option=".  The option value is a subsequent field and
is handled by other parts of Pcomplete (bug#81792).

* lisp/pcomplete.el (pcomplete-long-option-completion-table): Set
boundary for completed options that take values.

* test/lisp/pcomplete-tests.el (pcomplete-shell-completion): Convert to
macro and accept BODY arguments.
(pcomplete-test-long-options/with-value/multiple)
(pcomplete-test-long-options/without-value/multiple): New tests.
2026-09-05 13:37:51 -07:00
Stefan Monnier 194587e0ef lisp-mode.el: Fix lack of handling of shorthands in font-lock
* lisp/emacs-lisp/lisp-mode.el (lisp--el-match-keyword)
(lisp-string-in-doc-position-p): Obey shorthands (bug#80574).
2026-09-05 14:38:22 -04:00
Sean Whitton 1d836d5c59 ; * lisp/startup.el (prepare-user-lisp): Fix last change. 2026-09-05 13:34:22 +01:00
Sean Whitton bdf6d6c1b1 Autoload cookies for some commands in admin/*.el
These files are not included in Emacs distributions so this will
only affect those who, e.g., symlink these into ~/.emacs.d/user-lisp/.

* admin/admin.el:
* admin/authors.el: Autoload all commands.
* admin/gitmerge.el (gitmerge): Autoload.
2026-09-05 13:05:12 +01:00
Sean Whitton 7013cc3f13 prepare-user-lisp: Ignore dangling symlinks
* lisp/startup.el (prepare-user-lisp): Ignore dangling symlinks.
Restructure to reduce number of system calls made for everything
except dangling symlinks.
2026-09-05 12:58:53 +01:00
Eli Zaretskii 38e69f8b27 ; Update ldefs-boot.el. 2026-09-05 07:07:38 -04:00
Eli Zaretskii 251827829d Merge from origin/emacs-31
cf1d8f9bc9 ; Improve documentation of deletion of composed characters
2890334e70 Improve Tramp manual
56f3336189 'speedbar-window' now run 'speedbar-before-delete-hook' (...
62b891880c ; * lisp/simple.el (next-error-follow-minor-mode): Copyedit.
49c6767723 ; newcomers-presets: Mention using copy-theme-options.
c709b66dcb flymake-show-buffer-diagnostics: Fix interactive form
2026-09-05 07:04:40 -04:00
Eli Zaretskii 62c9725bae Fix mojibake in visiting LaTeX files
* lisp/international/latexenc.el
(latexenc-find-file-coding-system): Decode the main file's name,
since at this point the buffer is still unibyte and undecoded.
(Bug#81606)
2026-09-05 13:41:08 +03:00
Eli Zaretskii cf1d8f9bc9 ; Improve documentation of deletion of composed characters
* doc/emacs/basic.texi (Erasing): Document
'composition-break-at-point' (bug#81790).
2026-09-05 13:21:55 +03:00
Michael Albinus 2890334e70 Improve Tramp manual
* doc/misc/tramp.texi (Multi-hops, File name syntax): Use "localname".
(Home directories): Discuss missing remote home directory.  (Bug#81799)
2026-09-05 12:16:45 +02:00
Stephen Berman cd6bbb7ac2 Prevent Dired marking in hidden subdirs (bug#81612)
* lisp/dired.el (dired-mark-files-in-region, dired-mark): Don't
mark or flag for deletion if entry is in hidden (sub)dir.
2026-09-05 11:39:13 +02:00
Vincenzo Pupillo 56f3336189 'speedbar-window' now run 'speedbar-before-delete-hook' (bug#81708).
* lisp/speedbar.el (speedbar-window-mode): Fix documentation.  Run
the 'speedbar-before-delete-hook'.
2026-09-05 11:44:20 +03:00
Andreas Schwab 2e5e9d48fb gnus-icalendar: use DURATION to calculate end-time of the event
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-ical):
Use DURATION to calculate end-time if DTEND is absent.
2026-09-04 22:10:44 +02:00
Sean Whitton 62b891880c ; * lisp/simple.el (next-error-follow-minor-mode): Copyedit. 2026-09-04 17:12:45 +01:00
Andreas Schwab d73c7a442b gnus-icalendar: handle absent DTEND in event
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-ical):
Handle absent DTEND.
2026-09-04 18:11:27 +02:00
Michael Albinus 5ebed5219d Adapt eglot tests on emba
* test/infra/Dockerfile.emba (emacs-eglot): Install rust-src.

* test/infra/gitlab-ci.yml (test-eglot): Extend EMACS_EXTRAOPT.

* test/lisp/progmodes/eglot-tests.el
(eglot-test-rust-completion-exit-function): Don't skip on emba.
2026-09-04 17:50:44 +02:00
Sean Whitton a834ad2ede newcomers-presets: Set some more user options
* etc/themes/newcomers-presets-theme.el (newcomers-presets): Set
set-mark-command-repeat-pop, kill-do-not-save-duplicates,
help-window-select and window-combination-resize.
2026-09-04 16:39:34 +01:00
Juri Linkov 3278d1b0ce * lisp/vc/log-view.el (log-view-file): Add dark background (bug#81740). 2026-09-04 18:36:45 +03:00
Sean Whitton 49c6767723 ; newcomers-presets: Mention using copy-theme-options. 2026-09-04 16:11:26 +01:00
Protesilaos 5d0939c7a1 Use dedicated face for log-view-mode marked entries
* lisp/vc/log-view.el (log-view-marked): New face.
(log-view--mark-entry): Use it (bug#81740).
2026-09-04 14:40:01 +01:00
Sean Whitton c709b66dcb flymake-show-buffer-diagnostics: Fix interactive form
* lisp/progmodes/flymake.el (flymake-show-buffer-diagnostics):
Return just one diagnostic when last-command-event was not a
mouse event (bug#81786).
2026-09-04 14:26:20 +01:00
Sean Whitton 2d5657b9dc Fix closing *Completions* on sole completion of file name
* lisp/minibuffer.el (minibuffer-completion-help): Remove the
completion base from the minibuffer contents before comparing to
a sole completion (bug#81641).
2026-09-04 13:48:41 +01:00
Eli Zaretskii ec581f0da3 ; * doc/lispref/text.texi (Undo): Fix last change. 2026-09-04 14:15:59 +03:00
Helmut Eller 4281de8bcd Document the new undo-list entry kind
* src/buffer.c (buffer-undo-list): Update the docstring.
* doc/lispref/text.texi (buffer-undo-list): Describe the new entry kind.
2026-09-04 09:38:02 +02:00
Helmut Eller cc0f94f357 Less generic error message
* lisp/subr.el (undo--wrap-and-run-primitive-undo): Use "Unexpected
change of region length" instead of "Not yet implemented".
2026-09-04 09:38:01 +02:00
Helmut Eller 1d07d02a75 Improve undo-in-region support for combine-change-calls
* lisp/subr.el (combine-change-calls-1): Use the new 'apply entry
variant for the buffer-undo-list.
(undo--wrap-and-run-primitive-undo): Adjust the undo entries if the
region has moved.
* test/src/undo-tests.el (undo-test-combine-change-calls-4): New test.
2026-09-04 09:38:01 +02:00