Commit graph

100535 commits

Author SHA1 Message Date
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
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
Sean Whitton
c244314974 Fix recurrence of bug#80803 after changes in bug#80967
* lisp/vc/vc-dir.el (vc-dir-resynch-file): Pass only truenames
to vc-dir-recompute-file-state.
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-git): Require.
(vc-test-vc-dir-on-symlink): New test.
2026-06-08 15:29:12 +01:00
William Theesfeld
31eaf18276 ; * lisp/replace.el (occur-1): Use seq-some.
Copyright-paperwork-exempt: yes
2026-06-08 11:12:32 +01:00
William Theesfeld
fff343c332 ; Fix typos in iCalendar macro and recurrence docstrings
* lisp/calendar/icalendar-macs.el (ical:with-node-value)
(ical:with-property, ical:with-param, ical:with-child-of):
"evalutes" -> "evaluates".
* lisp/calendar/icalendar-recur.el (icr:tz--get-updated-in):
"occurence" -> "occurrence".

Copyright-paperwork-exempt: yes
2026-06-08 10:57:29 +01:00
Michael Albinus
912c8e3691 Ensure Tramp backward compatibility
* lisp/net/tramp.el (tramp-local-environment-variable-p):
Use `tramp-compat-funcall'.
2026-06-08 08:45:40 +02:00
Juri Linkov
9e37c94079 Read a key sequence instead of a single key in 'map-y-or-n-p'
This is necessary to correctly read keys like 'M-~'
used by 'save-some-buffers' that is two keys 'ESC ~'
on a tty.

* doc/lispref/minibuf.texi (Multiple Queries):
Index 'y-or-n-p-use-read-key' for 'map-y-or-n-p'.
Mention using a key sequence instead of single keys.

* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
In the 'y-or-n-p-use-read-key' cond-branch,
use 'read-key-sequence-vector' instead of 'read-key'.
In the default cond-branch, use 'this-command-keys-vector'
instead of 'last-command-event'.  In both cond-branches
use 'key-description' instead of 'single-key-description'
(bug#81168).
Instead of '(eq def nil)' check if chars are either nil
or an empty vector in noninteractive mode (bug#67836).

* test/lisp/emacs-lisp/map-ynp-tests.el (test-map-ynp-kmacro):
Test separately nil/non-nil 'y-or-n-p-use-read-key'.
(test-map-ynp-keys): New test for complete coverage of
'map-y-or-n-p'.
2026-06-07 21:56:47 +03:00
Eli Zaretskii
f653fd9f10 Avoid recursive error in debug-early in batch mode
* lisp/emacs-lisp/debug-early.el (cl--generic-compiler): Defvar it.
(debug-early-backtrace): Bind it so as to avoid loading
byte-compiler; see the value of the variable in cl-generic.el.
Do not merge to master.  (Bug#80916)
2026-06-07 13:31:45 +03:00
Eli Zaretskii
df2508a8f6 Remove from CC Mode code that modifies 'major-mode-remap-defaults'
* lisp/progmodes/cc-mode.el: Remove code that adds to
'major-mode-remap-defaults', as enabling and disabling tree-sitter
based modes now goes through 'treesit-enabled-modes'.
2026-06-07 09:52:30 +03:00
Stefan Monnier
fa528b4e5c lisp/emacs-lisp/debug-early.el (debug-early--handler): Fix bug#80916 2026-06-07 00:20:40 -04:00
Eli Zaretskii
4d8fb1623c Merge from origin/emacs-31
a24b081602 ; Fix last change
e33e9f7e85 Document 'margin' face as base for margin display strings...
cff9c8bc00 Improve prompting for mail sending by by 'report-emacs-bug'

# Conflicts:
#	etc/NEWS
2026-06-06 06:19:09 -04:00
Augusto Stoffel
cff9c8bc00 Improve prompting for mail sending by by 'report-emacs-bug'
* lisp/mail/emacsbug.el (report-emacs-bug-hook): Don't ask about
mail sending options if 'message-server-alist' is set.  (Bug#81176)
2026-06-06 11:40:53 +03:00
Po Lu
7ffbf45886 Merge from savannah/emacs-31
916572f6e0 Fix the Android build
3801c09ae2 Don't resurrect invisible child frames when rebuilding pa...
e4350c538f Improve progress-reporter state to remove hard coded leng...
30df8657fb (tex-main-file): Add forgotten safety predicate (bug#81099)
35a82765bf Fix bug in latexenc when AUCTeX is loaded
e9d1367a32 paren.el: Fix part of bug#81035
fd1b5cd890 ; * test/lisp/files-tests.el (w32-downcase-file-names): D...
79391d3e19 ; * lisp/mouse.el (send-to--resolve-handler): Fix last ch...
eb1de3f585 ; Avoid rebuilding Emacs Lisp Intro when building release...
f26f2a832c ; Avoid byte-compilation warning in mouse.el
cf325876fa Adapt Tramp version
84556123eb ; * admin/make-tarball.txt: Update.
8f5b786cac Check buffer-local value in tramp-local-environment-varia...
2026-06-06 11:39:01 +08:00
Paul Eggert
2f69971714 mpc-last-seek-time and mpc--faster are no longer used
* lisp/mpc.el (mpc-last-seek-time, mpc--faster):
Add a FIXME; should they be removed?
2026-06-05 19:16:29 -07:00
Paul Eggert
4fd59d0eba Omit a ‘/’ from org-clock-resolve
* lisp/org/org-clock.el (org-clock-resolve): Replace (floor (/ X
60)) with (floor X 60).
2026-06-05 19:16:29 -07:00
Paul Eggert
5eee9e239b Simplify gnus-backend-trace time calc
* lisp/gnus/gnus-int.el (gnus-backend-trace):
Simplify, since (float-time (time-since nil)) returns 0.0.
2026-06-05 19:16:29 -07:00
Paul Eggert
56b93016fc Simplify epa-ks--display-keys time calc
* lisp/epa-ks.el (epa-ks--display-keys):
Simplify by using time-less-p.  This also avoids a rounding error.
2026-06-05 19:16:29 -07:00
Paul Eggert
2dc98b69e0 format-seconds takes time values, not just numbers
* lisp/calendar/time-date.el (format-seconds): Document that the arg
can be any time value, and need not be a number.
This has been true for some time, but has not been documented.
Avoid some (but not all) rounding errors internally, and add a
comment about the remaining rounding error.
* lisp/emacs-lisp/timer-list.el (list-timers):
* lisp/org/org-timer.el (org-timer-show-remaining-time):
* lisp/org/ox.el (org-export--stack-generate):
* lisp/time.el (emacs-uptime): Omit unnecessary conversion of time
value that can increase rounding error.
* test/lisp/calendar/time-date-tests.el (test-format-seconds):
Test that format-seconds works on time values that are not numbers.
2026-06-05 19:16:29 -07:00
Stéphane Marks
e4350c538f Improve progress-reporter state to remove hard coded length (bug#80988)
Remove hard-coded state range, now a monotonically increasing
integer.

* lisp/subr.el (progress-reporter-update-functions): Update
docstring.
(progress-reporter-echo-area): Use
'progress-reporter--pulse-characters' length.
(progress-reporter-do-update): Increase 'state' by 1 each pass.
*
lisp/system-taskbar.el (system-taskbar--progress-reporter-update):
Make steps independent of 'progress-reporter-echo-area' steps.
2026-06-05 12:55:08 -04:00
Arash Esbati
30df8657fb (tex-main-file): Add forgotten safety predicate (bug#81099)
That variable is commonly set file-locally.

* lisp/textmodes/tex-mode.el (tex-main-file): Add safety predicate.
2026-06-05 12:52:00 -04:00
Al Haji-Ali
35a82765bf Fix bug in latexenc when AUCTeX is loaded
* lisp/international/latexenc.el
(latexenc-find-file-coding-system): Set file name correctly when
`TeX-master' is a string.  (Bug#81099)
2026-06-05 12:44:25 -04:00