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.
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)
* 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'.
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
* 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)
* 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)
* 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.
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.
* 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.
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.
;; * 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'.
* 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.
* 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.
* 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.
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>
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.
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.
* 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
* 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'.
* 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.
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.
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
* 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)
* 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.
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