* 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'.
* 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.
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.
* 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.
* 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.
* 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.
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.
* 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.
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.
* 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.
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.
* 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)
* 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)
* src/buffer.c (Fmake_indirect_buffer): Replace
set_buffer_internal_1 with specpdl unwind in the clone path
(bug#81504).
Copyright-paperwork-exempt: yes
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).
* 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)
* 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.
* 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.
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.
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.
* 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)