Commit graph

8843 commits

Author SHA1 Message Date
Eli Zaretskii 84c500552e Merge from origin/emacs-31
c0b872dd67 ; * admin/notes/jargon: Add FUD.
e8936794ad Fix navigating *Completions* with TAB in vertical format
9c9a26e60b Merge branch 'emacs-31' of git.savannah.gnu.org:/srv/git/...
3d9f0fa865 ; * admin/make-tarball.txt: Note about publishing NEWS (b...
bcfc4e7e19 tab-bar-tests-quit-restore-window: Mark unstable
a001a45a50 Revert "Delete test that hangs"
6800426743 admin/make-manuals: Include type hierarchy auxiliary files
a013cdd3e8 ; * admin/make-tarball.txt: Various improvements.
2026-08-29 07:17:49 -04:00
Sam James a746f6d7e7 uuid: fix test override of 'float-time'
The mock 'float-time' was defined to take no arguments, unlike the
real 'float-time', which manifested as a test failure in
'uuid-v7-generator-known-rnd-and-ts'.

* test/lisp/emacs-lisp/uuid-tests.el (uuid-v7-generator-known-rnd-and-ts):
Fix mock 'float-time' definition.  (Bug#81701)
2026-08-26 15:32:12 +03:00
Roi Martin e156410d30 Add button to diff failed erts-file test output in ERT
* doc/misc/ert.texi (Running Tests Interactively): Mention diff button.
* etc/NEWS: Add entry.
* lisp/emacs-lisp/ert.el (ert--erts-file-test-execution-observer): Add
docstring.
(ert--erts-file-test-description, ert--erts-file-test-mismatch): New
structures.
(ert--erts-file-test-diff-button): New button type.
(ert--erts-file-test-diff-button-action): New function.
(ert-results-pop-to-erts-file-tests-for-test-at-point): Mention diff
button in docstring.
(ert-test--erts-test): Use `ert--erts-file-test-description' and
`ert--erts-file-test-mismatch' structures.
* test/lisp/emacs-lisp/ert-resources/erts-fail-point.erts (Name): New
test file.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-list-of-erts-file-tests):
Use `ert--erts-file-test-description' structure.
(ert-test-erts-file-test-output-mismatch): New test.  (Bug#81685)
2026-08-26 14:17:41 +02:00
Stephen Berman e8936794ad Fix navigating *Completions* with TAB in vertical format
* lisp/simple.el (next-line-completion): Make using TAB to
navigate in vertical format cycle through the minibuffer (bug#81631).

* test/lisp/minibuffer-tests.el (completion-auto-select-test-bug81635):
Run tests for all values of 'completions-format'.
2026-08-25 09:52:44 +02:00
Sean Whitton 3b2dbae103 Merge from origin/emacs-31
bcfc4e7e19 tab-bar-tests-quit-restore-window: Mark unstable
2026-08-24 13:42:13 +01:00
Sean Whitton bcfc4e7e19 tab-bar-tests-quit-restore-window: Mark unstable
* test/lisp/tab-bar-tests.el
(tab-bar-tests-quit-restore-window): Mark unstable.
2026-08-24 13:41:29 +01:00
Sean Whitton a001a45a50 Revert "Delete test that hangs"
This reverts commit 76846eede3.

Do not merge to master.
2026-08-24 13:40:41 +01:00
Sean Whitton 6a8c1253dd Merge from origin/emacs-31
249e293f7a em-script-tests: don't load the site file
442674babb emacsclient-tests: don't load the site file
b4612c6f29 Fix navigating vertical completions with annotations (bug...
f60d4243e6 Fix 'describe-package' for the Emacs pseudo package
d3229f9f37 Avoid errors in text-only client frames of PGTK build
2026-08-24 11:29:00 +01:00
Sean Whitton 76846eede3 Delete test that hangs
* test/lisp/tab-bar-tests.el
(tab-bar-tests-quit-restore-window): Delete test that hangs, for
the Emacs 31.1 release.  Do not merge to master.
2026-08-24 10:05:22 +01:00
Ulrich Müller 249e293f7a em-script-tests: don't load the site file
* test/lisp/eshell/em-script-tests.el (em-script-test/batch-file)
(em-script-test/batch-file/shebang): Invoke Emacs with -Q to
suppress site file loading.  (Bug#81679)
2026-08-23 21:00:56 +02:00
Ulrich Müller 442674babb emacsclient-tests: don't load the site file
* test/lib-src/emacsclient-tests.el
(emacsclient-test-alternate-editor-allows-arguments)
(emacsclient-test-alternate-editor-allows-quotes): Invoke the
alternate editor with -Q to suppress site file loading.  (Bug#81676)
2026-08-23 21:00:56 +02:00
Divya Ranjan 6ae70bc02e Skip canvas tests if the image type is not available
* test/src/emacs-module-tests.el: skip canvas tests if the
image type is not available
2026-08-22 17:07:50 +02:00
Michael Albinus 03793610f7 Adapt filenotify test
* test/lisp/filenotify-tests.el
(file-notify-test10-move-file-to-another-watched-dir): Adapt test.
2026-08-22 12:24:26 +02:00
Eli Zaretskii 2b2ee936a6 Merge from origin/emacs-31
61700f9dd6 Fix TAB to wrap with completion-auto-select t
2026-08-22 05:09:50 -04:00
Eli Zaretskii 998547c55f Merge from origin/emacs-31
062dcd2aea Fix prev-adaptive-prefix anchor (bug#61314)
32025c709e ; * etc/NEWS: Fix typos and wording.
0914969e0e ; Update "Antinews" in ELisp manual
1988e330c1 ; Update "Antinews" in the Emacs user manual
1744376add ; * admin/authors.el (authors-aliases): Add Yifei Yao.
426dca6849 ; * test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restor...

# Conflicts:
#	etc/NEWS
2026-08-22 05:09:45 -04:00
Michael Albinus bd5cbf47da Backport: Restrict Tramp user name
* doc/misc/tramp.texi (File name syntax): The user name can also
be an environment variable.

* lisp/net/tramp.el (tramp-build-prefix-regexp):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-get-file-attributes, tramp-gvfs-file-name)
(tramp-gvfs-url-host, tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry)
(tramp-gvfs-mount-spec):
* lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names)
(tramp-rclone-remote-file-name):
* lisp/net/tramp-smb.el (tramp-smb-get-share, tramp-smb-get-localname):
Use string-anchored regexp, not line-anchored.

* lisp/net/tramp.el (tramp-prefix-regexp): Adapt docstring.
(tramp-user-regexp): Exclude shell meta characters.
(tramp-dissect-file-name, tramp-file-name-handler):
Expand environment variable.
(tramp-convert-file-attributes):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
Quote symbolic link target with remote file name syntax.

* test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax)
(tramp-test01-file-name-syntax-simplified)
(tramp-test01-file-name-syntax-separate)
(tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate)
(tramp-test21-file-links): Extend test.

(cherry picked from commit f3e7104d05)
2026-08-21 17:42:51 +02:00
Spencer Baugh 61700f9dd6 Fix TAB to wrap with completion-auto-select t
* lisp/minibuffer.el (completions--clear-selection): New
function.
(minibuffer-hide-completions): Call it.
* lisp/simple.el (next-column-completion): Call it (bug#81635).
* test/lisp/minibuffer-tests.el
(completion-auto-select-test-bug81635): New test.
2026-08-21 16:24:59 +01:00
Michael Albinus f3e7104d05 Restrict Tramp user name
* doc/misc/tramp.texi (File name syntax): The user name can also
be an environment variable.

* lisp/net/tramp.el (tramp-build-prefix-regexp):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-get-file-attributes, tramp-gvfs-file-name)
(tramp-gvfs-url-host, tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry)
(tramp-gvfs-mount-spec):
* lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names)
(tramp-rclone-remote-file-name):
* lisp/net/tramp-smb.el (tramp-smb-get-share, tramp-smb-get-localname):
Use string-anchored regexp, not line-anchored.

* lisp/net/tramp.el (tramp-prefix-regexp): Adapt docstring.
(tramp-user-regexp): Exclude shell meta characters.
(tramp-dissect-file-name, tramp-file-name-handler):
Expand environment variable.
(tramp-convert-file-attributes):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
Quote symbolic link target with remote file name syntax.

* test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax)
(tramp-test01-file-name-syntax-simplified)
(tramp-test01-file-name-syntax-separate)
(tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate)
(tramp-test21-file-links): Extend test.
2026-08-21 14:23:38 +02:00
Spencer Baugh 374a2a2b89 pcm-try-completion: Move point to the last non-empty wildcard
completion-pcm-try-completion always moved point to the last
wildcard in the string which could still be expanded to match a
completion.  However, if the desired completion has an empty
string at the site of that wildcard, there's nothing the user
could usefully type to continue completion there.  So, it's
better to move point to last wildcard where all the possible
completions have non-empty text, if there is such a wildcard.

* lisp/minibuffer.el (completion-pcm--string->pattern): Don't
replace 'any-delim with 'prefix when
completion-pcm-leading-wildcard is non-nil: too aggressive.
(completion-pcm--merge-completions): Push 'nonempty' when all
completions are nonempty at this wildcard (bug#81629).
(completion-pcm--merge-try): Move point to the last 'nonempty'.
* test/lisp/minibuffer-tests.el (completion-pcm-test-anydelim)
(completion-substring-test-5): Update for new behavior.
2026-08-21 12:23:16 +01:00
Michael Albinus 07925d7070 Improve handling of pending `renamed' event in filenotify.el
* lisp/filenotify.el (file-notify--rm-descriptor): Remove.
(file-notify--expand-file-name): Use `file-local-name'.
(file-notify--callback-inotify, file-notify--callback-kqueue)
(file-notify--callback-w32notify)
(file-notify--callback-gfilenotify, file-notify-callback): Map
also `stopped' event.
(file-notify--call-handler): Handle also `stopped' event.
(file-notify--handle-event): Improve handling of pending `renamed'
event.  (Bug#81531)
(file-notify-rm-watch): Integrate code of removed
`file-notify--rm-descriptor'.

* test/lisp/filenotify-tests.el (file-notify--test-tmpdir1): Declare.
(file-notify--test-event-test): Better check for `stopped' events.
(file-notify-test03-events, file-notify-test05-file-validity)
(file-notify-test06-dir-validity)
(file-notify-test07-many-events, file-notify-test08-backup)
(file-notify-test09-watched-file-in-watched-dir): Adapt tests.
(file-notify-test10-move-file-to-another-watched-dir): New test.
(file-notify-test11-sufficient-resources)
(file-notify-test12-symlinks): Rename tests.
2026-08-21 09:42:00 +02:00
Michael Albinus d5eab4b2d4 Improve Tramp backup handling
* doc/misc/tramp.texi (Auto-save File Lock and Backup): Adapt example.

* lisp/net/tramp.el (tramp-handle-find-backup-file-name):
Use connection-local value of `make-backup-files'.

* test/lisp/net/tramp-tests.el (tramp-test38-find-backup-file-name):
Extend test.
2026-08-20 16:18:57 +02:00
Jim Porter f856da36cd Allow evaluating Eshell forms using lexical binding
* lisp/eshell/esh-cmd.el (eshell-lexical-binding): New option.
(eshell--eval): New defsubst...
(eshell-do-eval, eshell-exec-lisp):
* lisp/eshell/esh-var.el (eshell-parse-variable-ref):
* lisp/eshell/em-banner.el (eshell-banner-initialize): ... use it.

* lisp/eshell/em-ls.el (eshell-ls-applicable): Evaluate form using
lexical binding.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test--binding-check): New
function.
(esh-cmd-test/lexical-binding, esh-cmd-test/dynamic-binding): New tests.

* etc/NEWS: Announce this change.
2026-08-19 18:13:45 -07:00
Philipp Stephani 56b411c002 Add a few more tests for 'make-empty-file'
* test/lisp/files-tests.el (files-tests--make-empty-file--no-parent)
(files-tests--make-empty-file--parent): New unit tests.
2026-08-19 17:02:30 +02:00
Philipp Stephani 284bc6a912 Fix a few bugs in 'make-empty-file'
Crucially, we need to pass 'excl' to 'write-region' so that the file is
opened in exclusive mode; this is the only way to avoid TOCTTOU errors.

Furthermore, the command errorneously created a parent directory even if
the PARENT argument is nil.

Add unit tests to cover these cases, including a TOCTTOU test.

* lisp/files.el (make-empty-file): Only create parent directories
when requested.  Open output file in exclusive mode.

* test/lisp/files-tests.el (files-tests--make-empty-file--exists)
(files-tests--make-empty-file--parent-missing)
(files-tests--make-empty-file--tocttou): New unit tests.
2026-08-19 16:50:28 +02:00
F. Jason Park 0300db0ae5 Remove choice from erc-dangerous-host-highlight-type
;; * etc/ERC-NEWS: Revise wording from recent mechanical change.

* lisp/erc/erc-match.el (erc-match--opt-pat-cache, erc-pals, erc-fools):
Update doc.
(erc-dangerous-host-highlight-type): Remove nonsensical
`nick-or-mention' value introduced for ERC 5.7 and Emacs 32 via
bug#73798.  It doesn't make sense to highlight mentions of a dangerous
host, only its associated nicknames, which ERC has no knowledge of.
(erc-match--opt-pat-get): Apply `sxhash-equal' to input in order to
protect keys from retroactive mutation.  Otherwise, a user applying
`setcar' to a cached `erc-fools' value could corrupt the cache.
(erc-match-mention-beg-rx-sexp, erc-match-mention-any-rx-sexp): New
variables to expose how ERC looks for "addressees" in a message body.
(erc-match--opt-pat-make-addr-beg): Defer to
`erc-match-mention-beg-rx-sexp' variable for regexp.
(erc-match--opt-pat-make-addr-end, erc-match--opt-pat-make-addr-any):
Rename former to latter and use `erc-match-mention-any-rx-sexp' for
regexp.
(erc-match--user-nuh-or-mention-p): Use updated function name.
(erc-match-highlight-by-part): Use `match-data' to detect the "last
thing searched" by the predicate.
* test/lisp/erc/erc-match-tests.el
(erc-match-message/fool/nick-or-mention): Remove test associated with
nonexistent value `nick-or-mention' for option
`erc-dangerous-host-highlight-type'.
(erc-match--opt-pat-cache): Use updated function name, sort character
alternatives in bracket expression, update format of expected output to
include hashes.

;; (erc-match-tests--hl-type-nick)
;; (erc-match-message/fool/nick)
;; (erc-match-message/dangerous-host/nick/legacy)
;; (erc-match-tests--hl-type-message)
;; (erc-match-message/dangerous-host/message)
;; (erc-match-message/dangerous-host/message/legacy)
;; (erc-match-tests--hl-type-all)
;; (erc-match-message/fool/all)
;; (erc-match-message/dangerous-host/all/legacy)
;; (erc-match-tests--hl-type-nick-or-keyword)
;; (erc-match-tests--hl-type-keyword): Use realistic value for
;; option `erc-dangerous-hosts'.
2026-08-18 19:47:02 -07:00
Jim Porter b9a311ecce Allow sending interactive input to Eshell workers
* lisp/eshell/esh-io.el (eshell-send-eof-to-target)
(eshell-output-region-to-target): New generic methods.

* lisp/eshell/esh-mode.el (eshell-send-input): Call
'eshell-output-region-to-target'.
(eshell-send-eof-to-process): Call 'eshell-send-eof-to-target'.

* lisp/eshell/esh-worker.el (eshell-worker-initialize): New function.

* test/lisp/eshell/esh-worker-tests.el
(esh-worker-test/map-lines/interactive)
(esh-worker-test/apply-lines/interactive): New tests.
2026-08-18 19:14:05 -07:00
Jim Porter 7de2c20571 Handle Lisp errors in Eshell workers
* lisp/eshell/esh-worker.el (eshell-worker-name): New generic function.
(eshell-worker--error): New defsubst.
(eshell-output-object-to-target, eshell-close-target): Wrap
'cl-call-next-method' in error handlers.

* test/lisp/eshell/esh-worker-tests.el
(esh-worker-test/pipe/error-handling)
(esh-worker-test/map-lines/error-handling)
(esh-worker-test/apply-lines/error-handling): New tests.
2026-08-18 19:14:05 -07:00
Jim Porter 0624161103 Add 'apply-lines' and 'map-lines' Eshell commands
* lisp/eshell/esh-worker.el (eshell-map-lines-worker)
(eshell-apply-lines-worker): New structs.
(eshell-map-lines-worker--apply): New generic function.
(eshell-output-object-to-target, eshell-close-target): New methods.
(eshell/map-lines, eshell/apply-lines): New functions.

* test/lisp/eshell/esh-worker-tests.el (eshell-test-line-number): New
defvar...
(eshell-test-number): ... use it in this new function.
(esh-worker-test/map-lines/eshell-one-line)
(esh-worker-test/map-lines/eshell-multiple-lines)
(esh-worker-test/map-lines/eshell-multiple-batches)
(esh-worker-test/map-lines/external-one-line)
(esh-worker-test/map-lines/external-multiple-lines)
(esh-worker-test/map-lines/numbers)
(esh-worker-test/map-lines/numeric-conversion)
(esh-worker-test/apply-lines/eshell-one-line)
(esh-worker-test/apply-lines/eshell-multiple-lines)
(esh-worker-test/apply-lines/external-one-line)
(esh-worker-test/apply-lines/external-multiple-lines)
(esh-worker-test/apply-lines/numbers)
(esh-worker-test/apply-lines/numeric-conversion): New tests.
2026-08-18 19:14:05 -07:00
Jim Porter 245bbdc0c5 Add basic support in Eshell for piping to Lisp commands
* lisp/eshell/esh-worker.el:
* test/lisp/eshell/esh-worker-tests.el: New files.

* lisp/eshell/esh-cmd.el (eshell-lisp-command): Call 'eshell-get-pipe'
when the command is a pipe target.

* lisp/eshell/em-basic.el (eshell/echo): Mark as producing literal
results.
2026-08-18 19:14:05 -07:00
Jim Porter ed2063ba72 Allow writing a lambda function as a command in Eshell
* lisp/eshell/esh-cmd.el (eshell-lisp-command): Don't try to call a
literal lambda.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/literal-lambda): New
test.
2026-08-18 19:14:05 -07:00
Philipp Stephani ea6e7a01f9 Fix bug when looping over intervals in another buffer (Bug#81652)
* lisp/emacs-lisp/cl-extra.el (cl--map-intervals): Add missing
BUFFER argument to 'set-marker' calls (Bug#81652).

* test/lisp/emacs-lisp/cl-macs-tests.el
(cl-macs-loop-being-intervals/current-buffer)
(cl-macs-loop-being-intervals/new-buffer): New regression tests.
2026-08-18 21:27:06 +02:00
Andrew Hyatt 8a8d9b5c6a Make electric-pair-mode respect field boundaries (bug#50236)
Among other potential benefits, this makes e-p-m work correctly in all
comint-based modes.

* lisp/elec-pair.el (electric-pair-field-search-size): New variable.
(electric-pair-post-self-insert-function): Tweak, call
electric--pair-psif-1 (electric--pair-psif-1): New helper from old
electric-pair-post-self-insert-function.

* etc/NEWS: Call out change.

* lisp/comint.el (electric-pair-field-search-size): Forward declare.
(comint-mode): Set electric-pair-field-search-size to 1000.

* test/lisp/electric-tests.el (preserve-balance)
(preserve-balance-not-across-fields): New tests.

Co-authored-by: João Távora <joaotavora@gmail.com>
2026-08-18 12:07:11 +01:00
Sean Whitton 3eba2d37ee ; Simplify last change. 2026-08-18 11:20:00 +01:00
Donjuanplatinum 5f2ab083f1 Test for bug#81504
* test/src/buffer-tests.el
(test-make-indirect-buffer-clone-hook): New test.
2026-08-18 11:19:48 +01:00
Juri Linkov 426dca6849 ; * test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window): Fix it. 2026-08-17 21:27:17 +03:00
Björn Lindqvist 7ef7433eb5 c-ts-mode: Improve block comment indentation
1) lines beginning with "*" are aligned to the first "*"
2) lines following the first or blank lines are indented three spaces
3) other lines are aligned to the previous line
* lisp/progmodes/c-ts-mode.el (c-ts-mode--simple-indent-rules): Improve
block comment indentation.  (Bug#81533)

* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Adjust test
data to new behavior.
2026-08-17 15:26:13 +03:00
Divya Ranjan d5f515e4a3 New image type canvas
Canvas images support efficient updating and refreshing.  An image
specifier with ':type canvas' creates a canvas image.  The canvas has an
associated writable pixel buffer.  After changing the ':data' vector or
writing to the pixel buffer a call to 'canvas-refresh' redraws the
canvas image.  See bug#80281.

Co-Authored-By: Divya Ranjan <divya@subvertising.org>
Co-Authored-By: Daniel Mendler <mail@daniel-mendler.de>

Canvas changes:

* doc/lispref/display.texi (Images): Add Canvas Images to menu.
(Canvas Images): New node documenting canvas image objects, the
`:data-width', `:data-height', `:data' and `:file' properties, and
`canvas-refresh'.
* doc/lispref/elisp.texi (Top): Reference new Canvas Images node.
* doc/lispref/internals.texi (Writing Dynamic Modules): Add Module
Canvas API to menu.
(Module Canvas API): New node documenting `canvas_data' module function.
* etc/NEWS: Announce the addition.
* lisp/image.el (create-image): Add `:id' to image specification of
canvas images.
* src/dispextern.h (struct image): Add `refresh', `original_width' and
`original_height' fields.
(redraw_image_glyphs, canvas_data): New prototypes.
* src/emacs-module.c (module_canvas_data): New function.
(initialize_environment): Register `canvas_data' module function.
* src/image.c (struct canvas): New struct for canvas.
(canvas_prepare_for_display, canvas_free_unused): New forward
declarations.
(prepare_image_for_display): Call `canvas_prepare_for_display' when the
canvas refresh counter has changed.  Set image `original_width' and
`original_height'.
(filter_image_spec): Exclude `:data' from the image cache key for canvas
images, so mutating the data vector in place does not create a new cache
entry.
(Fclear_image_cache): Call `canvas_free_unused'.
(image_set_transform): Use CAIRO_FILTER_GOOD instead of
CAIRO_FILTER_BEST for canvas images, for performance.  Do not set image
`original_width' and `original_height'.
(canvas_image_p, canvas_free_unused, canvas_apply_data, canvas_get)
(canvas_parse, canvas_load, canvas_prepare_for_display, canvas_data):
New functions implementing canvas creation, resizing, and reloading of
`:data' or `:file' content.
(Fcanvas_refresh): New defun `canvas-refresh', with an optional
RELOAD-DATA argument to reread `:data' or `:file'.
(initialize_image_type, syms_of_image): Register the `canvas' image type
and `canvas-refresh'.
* src/module-env-32.h (canvas_data): New prototype.
* src/nsimage.m (ns_image_reset): New function to recreate an NS pixmap
to update the canvas.
* src/nsterm.h: Add prototype for `ns_image_reset'.
* src/xdisp.c (redraw_image_glyphs_window)
(redraw_image_glyphs_window_tree, redraw_image_glyphs): New functions to
redraw only the glyphs referencing a given canvas image spec, falling
back to a full frame redraw if the frame is garbaged.
* test/src/emacs-module-resources/mod-test.c (mod-test-canvas-read)
(mod-test-canvas-write, mod-test-canvas-invalid): New helper functions.
* test/src/emacs-module-tests.el (test-canvas-gen-file)
(mod-test-canvas/valid, mod-test-canvas/invalid, mod-test-canvas/vector)
(mod-test-canvas/vector-reload, mod-test-canvas/unibyte)
(mod-test-canvas/file, mod-test-canvas/gc-stress): New tests.
2026-08-16 12:16:41 +03:00
Eli Zaretskii fb09079ced Merge from origin/emacs-31
f6e3b4232f ; Fix docs for browse-url-transform-alist.
71df1ea6d0 Fix Fns_block_system_sleep to respect activity_id lifetim...
769bd89281 Remove assertion in erc-speedbar--dframe-controlled
2dca4a8854 ; Fix recently-installed documentation changes
6f71867f27 ; Clarify issues with frames and windows in Elisp manual

# Conflicts:
#	etc/NEWS
2026-08-15 11:02:07 -04:00
Eli Zaretskii bd537c899d Merge from origin/emacs-31
da0565d9b5 Flymake: really restore advertised compatibility to Emacs 26
8f6e2cc66b ; * etc/EGLOT-NEWS: Briefly mention recent changes.
b86b9c195b Eglot: support commas in globs (bug#81425)
65efc35a91 Eglot: respect e-stay-out-of when turning off (bug#81593)
7d2988e7e4 Fix Custom keybindings in the documentation
1c69563a1c ; Fix last change in dframe.el
5f6ffef879 ; Improve and correct documentation of 'getenv'
83ec0fd8f3 Eglot: prevent showDocument disruption of sync requests (...
27ea7e6c1e * lisp/progmodes/sh-script.el (bash-ts-mode): Fix 'sexp-d...
73d959233e Fix setting windows' old_buffer in 'set-window-configurat...
8b32d77a07 Fix defcustom type of 'dframe-update-speed'
a56e964941 Speedbar: no more stale idle timers (bug#81561)

# Conflicts:
#	etc/NEWS
2026-08-15 11:00:49 -04:00
Harald Jörg 7861c30642 cperl-mode.el: Support Perl 5.44: named parameters in signatures
* lisp/progmodes/cperl-mode.el (cperl--signature-rx): Allow for a
colon before a variable name to declare a named parameter
(cperl--sloppy-signature-rx): dito
(cperl-init-faces): dito
(introduction): Delete an obsolete comment

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-signature-rx): Add a test case for a signature with
named parameters
(cperl-test-fontify-attrs-and-signatures): Verify correct
fontification of a named parameter

* test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl: Add
test code for named signatures

* etc/NEWS: Announce Perl 5.44 syntax support
2026-08-15 00:27:07 +02:00
F. Jason Park 769bd89281 Remove assertion in erc-speedbar--dframe-controlled
* lisp/erc/erc-speedbar.el (erc-speedbar--ensure): Remove assertion for
robustness even though it should still pass.
(erc-speedbar--get-timers): Remove unused function.
(erc-speedbar--dframe-controlled): Fix failing assertion related to
changes from bug#81561, namely the negating of the condition in
`dframe-set-timer' that checks whether `dframe-client-functions' is
nonempty.
* test/lisp/erc/erc-scenarios-status-sidebar.el
(erc-scenarios-status-sidebar--nickbar): Inline body of deleted function
`erc-speedbar--get-timers'.
2026-08-12 12:10:49 -07:00
João Távora b86b9c195b Eglot: support commas in globs (bug#81425)
* lisp/progmodes/eglot.el (eglot--glob-parse): Tweak.

* test/lisp/progmodes/eglot-tests.el (eglot-test-glob-test): Add
some comma-cases.
2026-08-12 00:18:43 +01:00
Rahul Martim Juliato 765411f0cd Preview the replacement text while it is typed (bug#81583)
* lisp/replace.el (query-replace-show-preview): New user option.
(query-replace-preview): New face.
(query-replace-eval-replacement-regexp): New constant, extracted
from...
(query-replace-compile-replacement): ...here.
(replace-preview-overlays): New variable.
(replace-preview-cleanup, replace-preview-update)
(replace-preview-setup): New functions.
(query-replace-read-to): New optional argument DELIMITED-FLAG.
(query-replace-read-args): Pass the delimited flag to
'query-replace-read-to'.
* lisp/isearch.el (isearch-query-replace): Pass the delimited
flag to 'query-replace-read-to'.
* test/lisp/replace-tests.el (replace-tests--preview): New
helper.
(replace-tests-preview-update, replace-tests-preview-cleanup)
(replace-tests-preview-disabled): New tests.
* doc/emacs/search.texi (Replace): Document the preview.
* etc/NEWS: Announce it.
2026-08-11 20:22:56 +03:00
Roi Martin fcee0b4ff1 Reimplement `outline-occur' using Xref and match Outline headings
Outline provides two search strategies to locate headings.  If
`outline-search-function' is defined, it is used to find the headings.
Otherwise, `outline-regexp' is used.  Reimplement `outline-occur' as
`outline-xref' using Xref and accepting a search function.  This
supports both search strategies and ensures that the headings detected
by `outline-xref' match the Outline ones.

* lisp/outline.el (outline-mode-prefix-map): Update binding.
(outline-mode-menu-bar-map): Update menu item.
(outline-occur-regexp): Remove variable.
(outline-occur): Remove function.
(outline-xref--fetch-headings, outline-xref--show-xrefs, outline-xref):
New functions (bug#81579).
* test/lisp/outline-tests.el (outline-tests--outline-occur)
(outline-tests--outline-occur-override)
(outline-tests--outline-occur-undefined-regexp): Remove tests.
(outline-tests--outline-xref-search-function)
(outline-tests--outline-xref-regexp)
(outline-tests--outline-xref-undefined): New tests.
2026-08-11 20:06:15 +03:00
Eli Zaretskii b157d8e96a Merge from origin/emacs-31
aec7a5c73f ; * lisp/window.el (quit-restore-window-no-switch): Fix c...
a15640e841 Warn about INFOPATH shadowing package manuals
ae9656b8b1 ; * etc/NEWS: Improve wording of a recently-added entry.
321f6a07e8 Handle transposing and rotating of dedicated windows (Bug...
7119808569 Remove overlays from package menu when performing transac...
254594306c ; Fix unbound variable warning
d5c3f053b0 ; In Elisp manual say that FRAME arg in 'frame-focus-stat...
29f292fa87 Avoid installing packages when using 'package-isolate'

# Conflicts:
#	etc/NEWS
2026-08-08 06:12:43 -04:00
Eli Zaretskii e88195732e Merge from origin/emacs-31
a027452c71 Fix progress-reporter-echo-area update-text
bc92224c5f VC-Git: Pass --no-optional-locks
ed1a2e8239 Fix text-property-search-backward skipping one character ...
2026-08-08 06:12:37 -04:00
David Ponce 945667d105 Fix image map test that could fail with certain DPI settings
* test/lisp/image-tests.el (image--compute-map-and-original-map):
Specify the dimension of the test image in pixels which is a
DPI-independent unit, contrary to pt.  (Bug#70093)
2026-08-08 11:11:30 +03: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
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 0ab4c2e4ff Merge from origin/emacs-31
e54ba84245 ; * etc/PROBLEMS (Build-time problems): Discuss bug#81211.
cc210dbf14 Fix JSX tag angle-bracket pairing in tsx-ts-mode
8b521b98ed ; * etc/NEWS: Fix level of last change.
b1687dbe02 * admin/notes/jargon: Add FUD.
287187f202 pcm-try-completion: collapse ** into *
db6beef260 Distinguish UTC vs. UTC+0:00 times in iCalendar library
1b500ce5a5 Fix documentation of ':set' function in 'defcustom'
a93e0ff7b1 ; AGENTS.md, CLAUDE.md: New files.

# Conflicts:
#	etc/NEWS
2026-08-05 11:40:20 +01:00