Commit graph

182568 commits

Author SHA1 Message Date
Martin Rudalics 321f6a07e8 Handle transposing and rotating of dedicated windows (Bug#81406)
* lisp/window-x.el (transpose-dedicated-windows): New option.
(window-layout-rotate-clockwise)
(window-layout-rotate-anticlockwise)
(window-layout-flip-leftright, window-layout-flip-topdown)
(window-layout-transpose, rotate-windows-back): Say that these
functions may signal an error when they encounter dedicated,
fixed-size or atomic windows.
(rotate-windows): Handle dedicated windows like the other
transpose functions.
(window--transpose): Handle 'transpose-dedicated-windows'.
* doc/lispref/windows.texi (Changing Window Layouts): Describe new
option 'transpose-dedicated-windows'.
* etc/NEWS: Announce new option 'transpose-dedicated-windows'.
2026-08-07 17:44:39 +02:00
Philip Kaludercic 7119808569
Remove overlays from package menu when performing transaction
* lisp/emacs-lisp/package.el (package-menu--perform-transaction):
Remove all overlays at the beginning of the function.  (Bug#81213)
2026-08-06 20:59:09 +02:00
Richard Lawrence 254594306c ; Fix unbound variable warning
* test/lisp/calendar/icalendar-parser-tests.el
(icalendar-parser-test-utc+0-is-not-utc): New test using
`expected-non-zoned'.
2026-08-06 12:47:06 +01:00
Martin Rudalics d5c3f053b0 ; In Elisp manual say that FRAME arg in 'frame-focus-state' is optional
* doc/lispref/frames.texi (Input Focus): Say that FRAME
argument of 'frame-focus-state' is optional.
2026-08-06 09:16:34 +02:00
Philip Kaludercic 29f292fa87
Avoid installing packages when using 'package-isolate'
* lisp/emacs-lisp/package.el (package-isolate): When translating
full package names into package descriptors, prefer the package
descriptors of already installed packages to those of remote
packages.
2026-08-05 23:08:58 +02:00
Eshel Yaron 8466eb4499
Mitigate arbitrary code execution vulnerability
This mitigates a vulnerability that allowed a specially
crafted file to trigger execution of attacker-controlled
arbitrary Emacs Lisp code immediately when the file is
visited in Emacs (before the file's malicious contents are
even displayed).  See demonstration in bug#80574.

* lisp/progmodes/cc-fonts.el (c-compose-keywords-list):
* lisp/vc/vc-hooks.el (vc-find-backend-function):
Nullify 'read-symbol-shorthands' around risky 'intern' calls.
Do not merge to master.
2026-08-05 19:58:32 +02:00
Stéphane Marks a027452c71 Fix progress-reporter-echo-area update-text
* lisp/subr.el (progress-reporter-echo-area): Format UPDATE-TEXT
as a string (bug#81514).
2026-08-05 15:17:48 +01:00
Sean Whitton bc92224c5f VC-Git: Pass --no-optional-locks
* lisp/vc/vc-git.el (vc-git--no-optional-locks): New function.
(vc-git-command, vc-git--call): Use it.
2026-08-05 14:33:34 +01:00
Sean Whitton ed1a2e8239 Fix text-property-search-backward skipping one character regions
* lisp/emacs-lisp/text-property-search.el
(text-property-search-backward)
(text-property--find-end-backward): Fix skipping one character
non-matching regions (bug#81539).
* test/lisp/emacs-lisp/text-property-search-tests.el
(text-property-setup): Make one of the propertized regions one
character long to test bug#81539.
(text-property-search-forward-bold-nil)
(text-property-search-forward-nil-nil)
(text-property-search-backward-bold-nil)
(text-property-search-backward-nil-nil)
(text-property-search-backward-prop-match-match-face-nil-nil)
(text-property-search-backward-prop-match-match-face-italic-t)
(text-property-search-backward-prop-match-match-face-italic-nil):
Update tests.
2026-08-05 12:28:55 +01:00
Sean Whitton e54ba84245 ; * etc/PROBLEMS (Build-time problems): Discuss bug#81211. 2026-08-05 11:25:22 +01:00
Binbin Ye cc210dbf14 Fix JSX tag angle-bracket pairing in tsx-ts-mode
* lisp/progmodes/typescript-ts-mode.el (tsx-ts--s-p-query):
Capture 'jsx_self_closing_element' as well.
(tsx-ts--syntax-propertize-captures): For JSX tag elements, give
only the leading '<' and trailing '>' matching-pair syntax and
leave the interior untouched; for 'jsx_text', neutralize
balanced pair characters to punctuation (bug#81460).
* test/lisp/progmodes/typescript-ts-mode-tests.el
(tsx-ts-mode-test-jsx-tag-syntax-propertize): New test.
2026-08-05 11:22:55 +01:00
Michael Albinus 8b521b98ed ; * etc/NEWS: Fix level of last change. 2026-08-04 15:31:11 +02:00
Michael Albinus b1687dbe02 * admin/notes/jargon: Add FUD. 2026-08-04 15:30:51 +02:00
Spencer Baugh 287187f202 pcm-try-completion: collapse ** into *
* lisp/minibuffer.el (completion-pcm--merge-completions): Only
include one star in the return value (bug#81394).
* test/lisp/minibuffer-tests.el (completion-pcm-test-7): Update
for new behavior.
2026-08-04 13:53:44 +01:00
Richard Lawrence db6beef260 Distinguish UTC vs. UTC+0:00 times in iCalendar library
This fixes a bug discussed on emacs-devel; see the thread at
https://https://lists.gnu.org/archive/html/emacs-devel/2026-07/msg00445.html

The issue was that the library did not distinguish between UTC time and
times that have an offset of 0 but are not in the UTC time zone,
e.g. standard times in Europe/London or Europe/Dublin.  This led to test
failures on systems in these time zones.  This fix represents true UTC
times by inserting the special value `t' in the zone slot of a decoded
time at parse time (which `encode-time' already handles correctly).
This distinguishes them from decoded times with an offset of 0 seconds.

* lisp/calendar/icalendar-ast.el (icalendar-make-component):
Ensure auto-generated DTSTAMP uses the new representation.
(icalendar-make-node-from-templates): Fix docstring.
* lisp/calendar/icalendar-parser.el (icalendar-read-time)
(icalendar-read-date-time): Read iCalendar UTC times to the new
representation.
(icalendar-print-time): Print the new representation.
(icalendar--decoded-time-p, icalendar--decoded-date-time-p)
(icalendar-date-time-is-utc-p): Check for the new
representation.
(icalendar-date-time): Docstring improvement.
(icalendar-requires-utc-validator): New validator function to
check that property values are in UTC.
(icalendar-completed, icalendar-created, icalendar-dtstamp): Use
it.
* lisp/calendar/icalendar-recur.el
(icalendar-recur-tz-decode-time): Decode to new representation;
explicitly support this.
* lisp/calendar/icalendar-utils.el (icalendar-date-time<)
(icalendar-date-time-simultaneous-p):
* lisp/calendar/diary-icalendar.el
(diary-icalendar-format-time-as-local): Work with the new
representation.
(diary-icalendar-convert-time-via-strategy)
(diary-icalendar-parse-entry): Ensure times decode to new
representation.
* test/lisp/calendar/icalendar-parser-tests.el
(icalendar-parser-test-bad-hyphenated-dates):
* test/lisp/calendar/icalendar-recur-tests.el
(icalendar-test-recur-find-secondly-interval)
(icalendar-test-recur-tz-observance-on): Update tests to use new
representation.
* test/lisp/calendar/icalendar-parser-tests.el
(icalendar-parse-test-utc+0-is-not-utc): New regression test.
* test/lisp/calendar/diary-icalendar-tests.el: Update 'to-utc test.
* test/lisp/calendar/diary-icalendar-resources/import-bug-24199.diary-all:
Update diary representation of UTC times in a recurrence rule.
2026-08-04 13:32:20 +01:00
Eli Zaretskii 1b500ce5a5 Fix documentation of ':set' function in 'defcustom'
* etc/NEWS: Document the change in signature of ':set'.
* lisp/custom.el (defcustom): Doc fix.  (Bug#81547)
2026-08-04 14:33:15 +03:00
Sean Whitton a93e0ff7b1 ; AGENTS.md, CLAUDE.md: New files. 2026-08-04 12:16:02 +01:00
Aaron L. Zeng afda8c2779 Fix vc-hg-diff arguments to diff vs empty tree
* lisp/vc/vc-hg.el (vc-hg-diff): Fix behavior according to
backend function specification (bug#81527).
* test/lisp/vc/vc-hg-tests.el (vc-hg-diff-revision-arguments):
New test.
2026-08-03 10:24:27 +01:00
João Távora d828a19fdc Eglot: fix use of progress reporters again (bug#81514)
There were still some cases of errors reported with the new stricter
progress reporters.

* lisp/progmodes/eglot.el (eglot--on-shutdown): Cleanup with
progress-reporter-done.
(eglot-handle-notification): Always pass percentage to
progress-reporter-update.
2026-08-02 20:15:09 +01:00
Philip Kaludercic 74ec15e768
; Fix 'package--save-selected-packages' edge case (Bug#81091)
* lisp/emacs-lisp/package.el (package--save-selected-packages-1):
Add new function to just save the current value of
'package-selected-packages'.
(package--save-selected-packages): Do not add the function
itself to 'after-init-hook' during init-time, to avoid
distinguishing between between function calls wheren the
function is invoked without any argument by the hook or with a
single nil argument.
2026-08-02 13:44:12 +02:00
Sean Whitton 983995b54c ; Delete obsolete comment.
The code to which it applied is long gone.
2026-08-01 19:57:35 +01:00
Eli Zaretskii 42e283fe9d ; 'use-cjk-char-width-table': Avoid byte-compiler warning. 2026-08-01 15:17:28 +03:00
Eli Zaretskii d31d3245ba Fix display of ambiguous-width CJK characters in GUI sessions
* lisp/international/characters.el (use-cjk-char-width-table): Fix
to work correctly in GUI sessions on Windows.  (Bug#81489)
2026-08-01 13:01:13 +03:00
João Távora cf98d9d725 Eglot: do more orthodox use of progress reporters (bug#81514)
The progress reporters on recent Emacs has backward incompatible
changes, but our use of them wasn't too correct either.

* lisp/progmodes/eglot.el (eglot-handle-notification): Call
progress-reporter-done.
2026-08-01 10:54:54 +01:00
Eli Zaretskii 0b8d2acdd2 ; * lisp/dired-aux.el (dired-create-destination-dirs): Doc fix (bug#81528). 2026-08-01 09:49:01 +03:00
Eli Zaretskii 660e2f9f6f ; * lisp/emacs-lisp/package.el (package-upgrade-all): Fix typo. 2026-08-01 09:00:35 +03:00
Philip Kaludercic 26e1c1792e
Summarize changes when upgrading packages
* lisp/emacs-lisp/package.el (package-upgrade-all): Print a
final message listing the completed and rejected package
upgrades, as the messages printed by 'package-install' get lost
in the Messages buffer.  (Bug#81112)
2026-07-31 22:26:34 +02:00
Philip Kaludercic ed4a3e251b
Prevent 'package-menu--mark-upgrades-1' from blocking
* lisp/emacs-lisp/package.el (package-menu--mark-upgrades-1):
If 'package-retention-policy' applies, still move forward a line
so that the loop can consider the next package.  (Bug#81373)
2026-07-31 22:16:35 +02:00
Sean Whitton a9fc13614e Export GIT_OPTIONAL_LOCKS=0 for "git status" invocations (bug#80903)
* lisp/vc/vc-git.el (vc-git--env-vars): New function.
(vc-git-command, vc-git--call): Use it (bug#80903).
2026-07-31 16:18:41 +01:00
Charles A. Roelli 8e70e6d687 * lisp/vc/vc.el (vc-delete-file): Don't backup backup files. 2026-07-31 11:41:22 +01:00
Donjuanplatinum c6e2bd3e3b Restore current buffer after clone-indirect-buffer-hook errors
* src/buffer.c (Fmake_indirect_buffer): Replace
set_buffer_internal_1 with specpdl unwind in the clone path
(bug#81504).

Copyright-paperwork-exempt: yes
2026-07-31 11:27:05 +01:00
Sean Whitton b21266e4cb Assign some calendar & icalendar files to packages
* lisp/calendar/diary-icalendar.el:
* lisp/calendar/icalendar-ast.el:
* lisp/calendar/icalendar-macs.el:
* lisp/calendar/icalendar-mode.el:
* lisp/calendar/icalendar-parser.el:
* lisp/calendar/icalendar-recur.el:
* lisp/calendar/icalendar-shortdoc.el:
* lisp/calendar/icalendar-utils.el: Assign to 'icalendar'
package.
* lisp/calendar/diary-lib.el: Assign to 'calendar' package.
2026-07-31 11:17:23 +01:00
Aaron L. Zeng b6332ac21b Do not asynchronously prompt to save buffers after vc-checkin
* lisp/vc/vc-dispatcher.el (vc-set-async-update): Bind
`non-essential' around background `vc-dir-refresh'.
2026-07-30 22:33:47 +01:00
Stephen Berman 4f36e9e885 File name with newline: require 'ls' --dired switch
File name with newline: require 'ls' --dired switch

Previously the handling of newlines in file names tested for the
-b switch, but on systems such as Solaris 'ls' takes -b but not
--dired and the latter is needed to set the correct bounds of file
names containing a newline.

* lisp/dired.el (dired--check-use-ls-dired): New function.
(dired-internal-noselect, dired-insert-directory)
(dired--set-auto-toggle-b-switch): Use it.
(dired--remove-b-switch): Delete.

* test/lisp/dired-tests.el (dired-test-filename-with-newline-1)
(dired-test-filename-with-newline-2): Use the new function to skip
tests when 'ls' does not support the --dired switch (bug#81481).
2026-07-30 23:13:29 +02:00
Eli Zaretskii cba18a7f9c Fix starting local processes in the MS-Windows build
* src/w32proc.c (sys_spawnve): Use default value of
'exec-suffixes', as we are starting a local process.
2026-07-30 18:42:08 +03:00
Eli Zaretskii 99a9307235 Avoid errors in 'dabbrev-expand'
* lisp/dabbrev.el (dabbrev-expand): Fix use of
'dabbrev--last-buffer-found': it could be a killed buffer.
(Bug#81452)

(cherry picked from commit 0e8fbd63e9)
2026-07-30 14:32:09 +03:00
Michael Albinus 7b0f33cb74 Backport: Use default exec-suffixes when needed (bug#81280, bug#81517)
* lisp/files.el (executable-find): Use (default-value 'exec-suffixes).

* src/callproc.c (Qexec_suffixes): Declare.
(call_process):
* src/process.c (Fmake_process): Use Fdefault_value (Qexec_suffixes).

* test/lisp/files-x-tests.el (files-x-test--variables6):
New defconst.
(files-x-test-connection-local-special-variables): New test.

(cherry picked from commit dcdd76f89e)
2026-07-30 13:02:44 +02:00
Eli Zaretskii ad60eb855d ; Improve documentation of "shadow cursor"
* etc/NEWS:
* doc/emacs/files.texi (Diff Mode):
* lisp/vc/diff-mode.el (diff-refine): Improve the documentation of
the "shadow cursor" shown by Diff mode.
2026-07-30 08:14:26 +03:00
Richard Lawrence c6d6033360 Fix attendee lookup in gnus-icalendar
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event--find-attendee): Restore previous behavior
for matching attendees to user variables (bug#81408).
2026-07-29 12:12:10 +01:00
Sean Whitton 5b5cc17832 vc-working-revision: Don't bind default-directory to a relative name
* lisp/vc/vc-hooks.el (vc-working-revision): Don't bind
default-directory to a relative file name.
2026-07-29 11:04:29 +01:00
Stephen Berman ab88a0be86 Fix Dired problem with nonexistent directory (bug#81509)
* lisp/dired.el (dired, dired-other-window, dired-other-frame)
(dired-other-tab): If the directory that the Dired command tries
to visit does not exist, ensure the buffer that was current when
the command was invoked remains the current buffer.
2026-07-28 18:31:44 +02:00
Sean Whitton 158a039135 ; * admin/MAINTAINERS: Mark F. Jason Park as co-maintaining ERC. 2026-07-28 13:44:59 +01:00
Yuan Fu 1da79a162d ; * src/treesit.c (treesit_cursor_helper_1): Further explanation. 2026-07-28 15:13:55 +03:00
Eli Zaretskii 037076824f ; * src/treesit.c (treesit_cursor_helper_1): Fix last change. 2026-07-27 22:14:23 +03:00
Michael Albinus 5e3f68c669 Fix emacs-eglot test on emba
* test/infra/Dockerfile.emba (emacs-eglot): Do not install
typescript via npm.
2026-07-27 18:31:30 +02:00
Sean Whitton 97e24e12d5 Fix C-x v w a/A on the repository root
With regard to vc--fileset-by-state, all the cond* clauses after
the '(atom next)' clause were essentially dead code.

With regard to vc-dir-status-files, when operating on the
repository root we would pass "./" to vc-dir-status-files, which
isn't a sensible value for 'default-directory'.

* lisp/vc/vc.el (vc-dir-status-files): Call expand-file-name on
DIRECTORY before using it.
(vc--fileset-by-state): Fix the control flow.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--apply-to-other-working-tree): Pass the repository root
as the fileset instead of the five file names in order to test
vc--fileset-by-state's control flow.
2026-07-27 13:52:52 +01:00
Stefan Monnier b65f8ef93d (sh-font-lock-paren): Fix bug#81192
Since commit 4e1fe56e31 turned several new chars into punctuations,
they're not skipped by (skip-syntax-backward "w_") any more,
so we need to skip them more explicitly instead when trying to
skip a case pattern.

* lisp/progmodes/sh-script.el (sh-font-lock-paren): Skip more
punctuation chars.
* test/lisp/progmodes/sh-script-resources/sh-indents.erts
(sh-indents-case-pattern-bug#81192): New test.
2026-07-26 15:36:19 -04:00
Eli Zaretskii b5119ab920 ; * etc/PROBLEMS: Document problems with pasting on Windows TTY (bug#81495). 2026-07-26 14:04:09 +03:00
Eli Zaretskii 6bd90deb26 ; Fix fallout from 'image-dired-display-image-mode' changes in 2021
* lisp/image/image-dired.el (image-dired-display-this): Make the
optional argument be ignored, and don't pass it to
'image-dired-display-image'.  Doc fix.  (Bug#81491)
2026-07-26 12:24:48 +03:00
Eli Zaretskii 39cb1e483f ; * lisp/bookmark.el (bookmark-alist): Doc fix (bug#81461). 2026-07-25 11:11:59 +03:00