Commit graph

100554 commits

Author SHA1 Message Date
Stefan Monnier
233b00a683 Don't load diff-mode so eagerly (bug#81222)
* .dir-locals.el (diff-add-log-use-relative-names): Move to `diff-mode`.

* lisp/vc/vc-git.el: Don't require `diff-mode`.
(vc-git-region-history-mode-map): Don't set the keymap parent yet.
(vc-git-region-history-font-lock): Declare `diff-font-lock-keywords` to
silence the compiler warning.
(vc-git-region-history-mode): Require `diff-mode` and set the keymap
parent here.
2026-06-13 13:22:49 -04:00
Matthew Batson
0bc48084fb ; Improve doc string of electric-indent internal
* lisp/electric.el (electric-indent--activate-indent-actions): Doc
string fix.
2026-06-13 10:20:51 -07:00
Paul Eggert
fa41113380 ; Further improve electric quote doc
This is mostly by adding brevity.
2026-06-13 10:20:51 -07:00
Matthew Batson
9208a1bdd2 ; Improve doc strings of electric.el user options
Change suggested by Richard Stallman in:
https://lists.gnu.org/r/emacs-devel/2026-06/msg00232.html

* lisp/electric.el (electric-indent-actions, electric-indent-chars)
(electric-indent-functions, electric-indent-inhibit)
(electric-layout-rules, electric-layout-allow-duplicate-newlines)
(electric-layout-allow-in-comment-or-string, electric-quote-comment)
(electric-quote-string, electric-quote-chars, electric-quote-paragraph)
(electric-quote-context-sensitive, electric-quote-replace-double)
(electric-quote-replace-consecutive, electric-quote-inhibit-functions)
(electric-quote-mode): Clarify in doc strings the effects, from the
user's point of view, of electric-indent-mode's, electric-layout-mode's,
and electric-quote-mode's user-facing options.
2026-06-13 10:20:51 -07:00
Matthew Batson
d22d2ea4c8 ; * lisp/electric.el (electric-indent-can-reindent-p): Fix typo. 2026-06-13 10:20:51 -07:00
Eli Zaretskii
4a86a530de Merge from origin/emacs-31
498eafb4f1 ; * lisp/help.el (temp-buffer-resize-mode): Doc fix (bug#...
19a7d4ce7c Fix behavior of 'temp-buffer-resize-mode' (Bug#81207)
927a7fff5e Restore public interfaces for accessing built-in package ...
ea3d78898a Allow uninstalling dependency with multiple installations
4a3d5b110e Fix memcpy size in 'merge_faces'
2026-06-13 06:16:54 -04:00
Eli Zaretskii
498eafb4f1 ; * lisp/help.el (temp-buffer-resize-mode): Doc fix (bug#81207). 2026-06-13 12:42:41 +03:00
Manuel Giraud
15e5f404f0 Optional display of overlay-arrow in margin (bug#81109)
* lisp/emacs-lisp/edebug.el (edebug-prepare-margin): New
function to set up left margin for Edebug.
(edebug--display-1): Use it.
* src/xdisp.c (display_line): Try to use left margin to display
overlay arrow and fallback to the text area otherwise.
* doc/lispref/display.texi (Overlay Arrow):
* doc/lispref/edebug.texi (Using Edebug):
* doc/emacs/building.texi (Debugger Operation): Document the
change.
* etc/NEWS: Announce the change.
2026-06-13 11:51:27 +03:00
Martin Rudalics
19a7d4ce7c Fix behavior of 'temp-buffer-resize-mode' (Bug#81207)
* lisp/help.el (temp-buffer-resize-mode): Fix doc-string - a
window can be resized now even if it has shown another buffer in
between (Bug#81207).
(resize-temp-buffer-window): Resize window if and only if its
buffer is the buffer it has shown initially (Bug#81207).
2026-06-12 09:44:01 +02:00
Dmitry Gutov
568a435af9 * lisp/progmodes/project.el (project-vc-dir): Add clarifying comment. 2026-06-12 06:28:10 +03:00
Dmitry Gutov
87133286d6 Revert "project-vc-dir: Use truenames"
This reverts commit 1d91d9b717.
2026-06-12 06:20:12 +03:00
Dmitry Gutov
d813a8bf98 Revert "* lisp/progmodes/project.el (project-vc-dir): Make interactive-only."
This reverts commit 4c12da0888.
2026-06-12 06:17:16 +03:00
Dmitry Gutov
6370b66a87 Revert "; * lisp/progmodes/project.el (project-vc-dir): Fix docstring."
This reverts commit d0653b46f6.

Given the examples in
https://lists.gnu.org/archive/html/emacs-devel/2026-06/msg00276.html
it's clear that there is no consensus on using canonical names here.
2026-06-12 06:13:42 +03:00
Xiyue Deng
927a7fff5e
Restore public interfaces for accessing built-in package info
These functions were removed in ab36f58922
during the reorganization of package.el as part of Bug#80079.

Also add a simple test for these functions to avoid future regressions.

See also discussion at
https://lists.gnu.org/archive/html/emacs-devel/2026-06/msg00149.html.

* lisp/emacs-lisp/package.el (package-versioned-builtin-packages,
package-builtin-package-version): Restore.
* lisp/emacs-lisp/package-activate.el: Remove lingering comments.
* test/lisp/emacs-lisp/package-tests.el
(package-test-builtin-package-info): Add.
2026-06-11 22:47:33 +02:00
Philip Kaludercic
ea3d78898a
Allow uninstalling dependency with multiple installations
* lisp/emacs-lisp/package.el (package--dependency-p): Add new
function to check if a package is a dependency.
(package-delete): Prompt user if it is OK to uninstall a package
that serves as a dependency, but where the package has multiple
installations.  This also means that we don't de-select a
selected dependency if there are multiple installations.

(Bug#81082)
2026-06-11 22:47:33 +02:00
Paul H. McClelland
78a10d17c6 Convert outline-search-function to defcustom
Make 'outline-search-function' a user option with named choices for
its predefined values, so users can configure it via Customize.
Preserves existing docstring and runtime semantics (bug#81053).

* lisp/outline.el (outline-search-function): Convert to defcustom.
* etc/NEWS: Announce it.
2026-06-11 20:47:40 +03:00
Paul Hsin-ti McClelland
194c28aaf2 Add outline-search-from-regexp generic helper
Add outline-search-from-regexp generic helper (bug#80887)

Minor modes and third-party packages that customize 'outline-regexp'
typically need an 'outline-search-function' implementation that
searches for 'outline-regexp' anchored at beginning of line.  Without
a generic helper, each such user reinvents the function locally.
Add it to outline.el.

This pattern has been in production use as a default value of
'outline-search-function' (set via 'setq-default') without issues.

* lisp/outline.el (outline-search-from-regexp): New function.
* etc/NEWS: Announce it.
2026-06-11 20:42:29 +03:00
Sean Whitton
5c85d3f59d Merge from origin/emacs-31
ffa25543a1 vc-hg-trunk-or-topic-p, vc-hg-topic-outgoing-base: Fix re...
fe45d875a4 ; Fix last Tramp change
2026-06-11 16:12:15 +01:00
Sean Whitton
f836632aee Merge from origin/emacs-31
f89ff62367 Extend Tramp external operations
4dea6ea36b markdown-ts-mode: fix duplicated menu entries (bug#81201)
9cad2da66e ; Fix last change.
cd84bd6a0c vc-dir-recompute-file-state: Change directory to DEF-DIR
47bdbc8d85 Restore "interactive" when describing functions
1a5d9a4be3 Inhibit follow-link via `mouse-1' on the tab-bar (bug#81036)
c94d58ddbf Fix the tab close button appearance when clicking (bug#76...
a21614d4d6 ; Skip one vc-dir test on MS-Windows
abddd2075a ; Fix last change to vc-dir-recompute-file-state.
89bda8736a Install images with info documentation (bug#81204)
466789b511 vc-dir-recompute-file-state: Return nil state for nonexis...
2026-06-11 16:12:15 +01:00
Sean Whitton
2c6a03b08c Fix fontification in short unintegrated changes logs (bug#81215)
Do not merge to master.

* lisp/vc/vc.el (vc--shortlog): New variable.
(vc-print-log-internal):
* lisp/vc/vc-git.el (vc-git-log-view-mode):
* lisp/vc/vc-hg.el (vc-hg-log-view-mode): Use it.
2026-06-11 16:11:04 +01:00
Sean Whitton
7b23e17eb8 * lisp/vc/vc.el (vc-log-remote-unintegrated): Set vc-log-view-type.
Do not merge to master.
2026-06-11 15:05:59 +01:00
Sean Whitton
cda9d9c733 Fix fontification in short unintegrated changes logs (bug#81215)
* lisp/vc/vc.el (vc-log-view-type): Replace with ...
(vc-log-view-types): ... this.  All uses changes.
(vc-log-remote-unintegrated): Newly pass a value for the log
view types.  This matters for Hg repositories.
(vc-print-log-internal): Ensure log view types always contains
either 'long' or 'short'.
(vc-root-log-incoming, vc-root-log-outgoing, vc-log-search):
* lisp/vc/vc-dir.el (vc-dir--count-outgoing): Pass both
log-incoming/log-outgoing/log-search and short/long for the log
view types.  This is necessary because these functions don't
call vc-print-log-internal.  This will need to be refactored
when implementing the new fileset-specific vc-log-incoming and
vc-log-outgoing.
2026-06-11 14:34:13 +01:00
Sean Whitton
ffa25543a1 vc-hg-trunk-or-topic-p, vc-hg-topic-outgoing-base: Fix ret vals
* lisp/vc/vc-hg.el (vc-hg-trunk-or-topic-p)
(vc-hg-topic-outgoing-base): Fix return values.
2026-06-11 14:23:28 +01:00
Stéphane Marks
c6c4888ced 'work-buffer--release' kill locals silently and reset the buffer (bug#81111)
This change helps ensure that work buffers are "clean" for reuse
by arbitrary callers.

* lisp/emacs-lisp/subr-x.el (work-buffer--release): Call
'kill-all-local-variables' with KILL-PERMANENT 'reset.
* src/buffer.c (Fkill_all_local_variables): If KILL-PERMANENT is
'permanent-local, kill all locals without prejudice.  If
KILL-PERMANENT is 'reset, also call 'reset_buffer'.
* test/lisp/emacs-lisp/subr-x-tests.el
(subr-x-with-work-buffer-locals-killed): New test.
* doc/lispref/variables.texi: Update 'kill-all-local-variables'
documentation.
* etc/NEWS: Announce the change to 'kill-all-local-variables'.
2026-06-11 10:34:44 +03:00
Eli Zaretskii
1c17d2a045 ; * lisp/cus-edit.el (setopt-local-type-mismatch): Another doc-string fix. 2026-06-11 09:29:48 +03:00
Eli Zaretskii
378c4a3d49 ; Fix last change
* etc/NEWS:
* lisp/cus-edit.el (setopt-local-type-mismatch): Improve wording
of documentation in last change.  (Bug#81120)
2026-06-11 09:28:15 +03:00
Stéphane Marks
725120ca3d Set user options in file/directory locals like 'setopt-local' (bug#81120)
This ensures defcustom ':set' functions are invoked.  The new
user option 'setopt-local-type-mismatch' can prompt users to
accept or discard type-mismatched values or to always accept or
discard such values.

* lisp/cus-edit.el (setopt-local-type-mismatch): New defcustom.
(setopt--set-local): Consult setopt-local-type-mismatch.
* lisp/files.el (hack-one-local-variable): Detect a custom
variable and call 'setopt--set-local'.
* etc/NEWS: Announce the change.
2026-06-11 09:17:52 +03:00
Stéphane Marks
133c79b6bc markdown-ts-mode: Sanitize work-buffer pool
This a workaround for the release branch due to the work-buffer
pool being insufficiently sanitized.
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts--run-command-in-code-block): Reset 'mark-active'.
Do not merge to master.  (Bug#81218)  (Bug#81111)
2026-06-11 09:08:40 +03:00
James Cherti
8decb653ff Fix outline-end-of-subtree at end of buffer
When a subtree is at the end of the buffer and followed by a
newline, flagging the subtree as invisible incorrectly swallows
the final newline.

* lisp/outline.el (outline-end-of-subtree): Check for eobp
to ensure the function steps back over the final newline when
the subtree ends at the end of the buffer (bug#80917).
2026-06-10 18:54:10 +03:00
James Cherti
e7e9c55ba7 Add outline-show-entry-and-parents to reveal entry hierarchy
* lisp/outline.el (outline-mode-prefix-map):
Rebind 'C-e' from 'outline-show-entry'
to 'outline-show-entry-and-parents'.
(outline-mode-menu-bar-map): Use 'outline-show-entry-and-parents'
instead of 'outline-show-entry'.
(outline-isearch-open-invisible): Use the new command instead of
the 'outline-show-entry' primitive.  This prevents unintended
side effects for packages relying on the base API and avoids the
'isolated item' effect.
(outline-show-entry-and-parents): New function to climb the tree,
reveal parent headings, and unfold the current entry (bug#79286).
2026-06-10 18:47:04 +03:00
Sean Whitton
971fa88a58 VC-Dir: Clear and populate async headers in vc-dir-resynch-file too
* lisp/vc/vc-dir.el (vc-dir--set-header): New function, factored out.
(vc-dir-resynch-file, vc-dir-refresh): Use it.
2026-06-10 15:26:36 +01:00
Michael Albinus
f89ff62367 Extend Tramp external operations
* doc/misc/tramp.texi (New operations): Extend.

* lisp/net/tramp.el (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): Support ARG-TYPE `tramp-file-name'.

* test/lisp/net/tramp-tests.el (tramp-test49-external-backend-function):
Extend test.
2026-06-10 15:45:31 +02:00
Rahul Martim Juliato
4dea6ea36b markdown-ts-mode: fix duplicated menu entries (bug#81201)
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts-code-block-in-context-mode-map)
(markdown-ts-in-table-mode-map): Remove redundant :parent.
2026-06-10 16:06:57 +03:00
Sean Whitton
9cad2da66e ; Fix last change. 2026-06-10 13:37:57 +01:00
Sean Whitton
cd84bd6a0c vc-dir-recompute-file-state: Change directory to DEF-DIR
* lisp/vc/vc-dir.el (vc-dir-recompute-file-state): Change
directory to DEF-DIR before calling into the backend.
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test-vc-dir-on-symlink): Test that the file has the right
state.
2026-06-10 13:36:52 +01:00
Pip Cet
47bdbc8d85 Restore "interactive" when describing functions
* lisp/help-fns.el (help-fns-function-description-header): Only
substitute "an" for "a", not for a longer BEG (bug#81203).
2026-06-10 10:32:40 +01:00
Sean Whitton
d0653b46f6 ; * lisp/progmodes/project.el (project-vc-dir): Fix docstring. 2026-06-10 10:04:49 +01:00
Sean Whitton
4c12da0888 * lisp/progmodes/project.el (project-vc-dir): Make interactive-only. 2026-06-10 10:00:13 +01:00
Tomas Nordin
02f22865f6 Partially revert changes from bug#6157 (bug#81170, bug#45226)
* lisp/emacs-lisp/lisp.el (narrow-to-defun): Partially revert
changes from bug#6157 (bug#81170, bug#45226)
2026-06-09 22:07:05 +03:00
Stéphane Marks
1a5d9a4be3 Inhibit follow-link via `mouse-1' on the tab-bar (bug#81036)
Prevent 'tab-bar' mouse clicks from being directed to the
current buffer, for example, in `dired-mode'.  This prevents the
side effect that the clicked tab is erroneously closed.

* lisp/mouse.el (mouse-on-link-p): Explicitly exempt clicks in
'tab-bar' if there is a 'follow-link' property.
2026-06-09 18:52:28 +03:00
Paul Eggert
669ca4df18 Default to quoting `like this' in Elisp strings
Problem reported by Matthew Batson in:
https://lists.gnu.org/r/emacs-devel/2026-06/msg00172.html
* lisp/emacs-lisp/lisp-mode.el (lisp-data-mode):
Don’t set electric-quote-string to t.
2026-06-09 08:46:13 -07:00
Sean Whitton
abddd2075a ; Fix last change to vc-dir-recompute-file-state. 2026-06-09 14:37:54 +01:00
Sean Whitton
466789b511 vc-dir-recompute-file-state: Return nil state for nonexistent file
* lisp/vc/vc-dir.el (vc-dir-recompute-file-state): Return nil
state for nonexistent file (bug#81191).
2026-06-09 12:09:14 +01:00
Sean Whitton
d7e7dd62ff Merge from origin/emacs-31
71ea4bbb6c vc-test-vc-dir-on-symlink: Use vc-test--with-author-identity
b8fa2243ea Fix M-RET in 'markdown-ts-in-table-mode-map'
c244314974 Fix recurrence of bug#80803 after changes in bug#80967
2026-06-09 11:33:26 +01:00
Sean Whitton
f343f20b94 Mark vc-dir-show-outgoing-count obsolete
* lisp/vc/vc-dir.el (vc-dir-show-outgoing-count): Mark obsolete.
(vc-dir-async-header-values): Use a list of cons.
(vc-dir-headers, vc-dir-refresh): Update for new
vc-dir-async-header-values structure.
* doc/emacs/maintaining.texi (VC Directory Buffer): Delete
mention of the variable.
* etc/NEWS: Announce the obsoletion.
2026-06-09 11:32:13 +01:00
Sean Whitton
a0dc061fa2 VC-Dir: Handle counting outgoing revisions asynchronously
* lisp/vc/vc-dir.el (log-view-message-re): Declare.
(vc-dir--count-outgoing): Rewrite to not block on populating the
outgoing log.
(vc-dir-async-header-values): New variable.
(vc-dir-headers): Just insert "Outgoing   : ", not its value.
(vc-dir-refresh): Insert overlays for async fields.
* lisp/vc/vc.el (vc--count-outgoing): Delete.
2026-06-08 19:17:47 +01:00
Stéphane Marks
b8fa2243ea Fix M-RET in 'markdown-ts-in-table-mode-map'
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts-in-table-mode-map): Map 'M-RET' to
'markdown-ts-table-insert-row-below' (bug#81196).
2026-06-08 15:40:21 +01:00
Sean Whitton
0fac164893 Merge from origin/emacs-31
fff343c332 ; Fix typos in iCalendar macro and recurrence docstrings
912c8e3691 Ensure Tramp backward compatibility
df9b97e516 ; update README for windows binaries
9e37c94079 Read a key sequence instead of a single key in 'map-y-or-...
2755f171fc ; Document new features and update NEWS
13842157d2 ; * etc/NEWS: Presentational fixes and improvements.

# Conflicts:
#	etc/NEWS
2026-06-08 15:36:26 +01:00
Sean Whitton
8636e39abb Merge from origin/emacs-31
df2508a8f6 Remove from CC Mode code that modifies 'major-mode-remap-...
3106dc7766 Assert we don't double-free timers (bug#81108)
90314895dd Don't cancel random timers in x_get_foreign_selection (bu...
5cd7785b0a Fix use-after-free in Ffuncall_with_delayed_message (bug#...
2026-06-08 15:36:23 +01:00
Sean Whitton
1d91d9b717 project-vc-dir: Use truenames
* lisp/progmodes/project.el (project-vc-dir): When called
interactively, call file-truename on the project root first.
* etc/NEWS: Document the change.
2026-06-08 15:35:42 +01:00