1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00
Commit graph

8401 commits

Author SHA1 Message Date
Juri Linkov
33d813c63b Fix query-replace-regexp for using '^' with calculated replacement '\,'
* lisp/replace.el (replace--push-stack): Add new args
'next-replacement' and 'match-again' and push them to the stack.
(perform-replace): Restore the previous already calculated values
of 'next-replacement' and 'match-again' from the stack for the
'backup' ('^') key (bug#79811).

* test/lisp/replace-tests.el (query-replace-tests): Add tests.
2025-11-24 20:14:15 +02:00
Stephen Gildea
1f2a161f93 ; * lisp/time-stamp.el: Reformat some doc strings. 2025-11-23 18:32:41 -08:00
Reuben Thomas
e1f851e840 Fix ispell’s handling of comment-end when adding local words
* lisp/textmodes/ispell.el (ispell-add-per-file-word-list): Deal
with `comment-end' in a way that works for comments that don’t
nest.

We proceed as follows: when `comment-end' is non-empty, we only
ever insert one start and one end comment, the first time we add
a local word.  This works with both C-style (which don’t nest)
and Rust-style comments (which do).

If we’re using line comments (i.e. comments that only have a
`comment-start'), then continue to insert one on each line.

* test/lisp/textmodes/ispell-tests/ispell-tests.el
(ispell/ispell-add-per-file-word-list/nxml): Adjust test.

Bug#79871
2025-11-22 13:15:45 +02:00
Sean Whitton
896449d65a ; * test/lisp/vc/vc-tests/vc-test-misc.el: Fix compiler warnings. 2025-11-20 20:39:37 +00:00
Elías Gabriel Pérez
bfa0cb81dd hideshow: Fix regressions. (Bug#79857)
* lisp/progmodes/hideshow.el (hs-block-positions): Exit the
function if 'hs-forward-sexp' fails.
(hs-hide-level-recursive): Fix infloop.
* test/lisp/progmodes/hideshow-tests.el (hideshow-hide-level-1):
(hideshow-hide-level-2): Update tests.
2025-11-19 09:20:00 +02:00
Eli Zaretskii
858d54d51d ; Fix cleanup in buffer-tests
* test/src/buffer-tests.el (test-restore-buffer-modified-p)
(test-buffer-chars-modified-ticks): Don't leave unsaved and
modified file buffers after the tests.
2025-11-16 11:08:11 +02:00
João Távora
7a3b8c6df5 Eglot: add two semtok tests
The tests are pretty basic, I don't expect them to catch
anything else than giant bugs.

* test/lisp/progmodes/eglot-tests.el (eglot-test-semtok-basic)
(eglot-test-semtok-refontify): New tests.
(eglot--semtok-faces, eglot--semtok-wait): New helpers.
2025-11-13 22:18:46 +00:00
Sean Whitton
4358838a3b vc-do-command: Support discarding standard error
* lisp/vc/vc-dispatcher.el (vc-do-command): Support discarding
standard error.
* lisp/vc/vc-hg.el (vc-hg-dir-status-files): Discard standard
error of 'hg status' to avoid parsing mistakes.
(vc-hg-command): Update docstring given new meaning of first
argument to vc-do-command.
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-test-do-command-1)
(vc-test-do-command-2, vc-test-do-command-3)
(vc-test-do-command-4, vc-test-do-command-5)
(vc-test-do-command-6, vc-test-do-command-7): New tests.
2025-11-10 18:08:39 +00:00
João Távora
1772a4e468 ; Eglot: unbreak "lsp-abiding-column" test for newer clangd
Newer/newest clangd support more encodings and actually
negotiate with us, so test shouldn't assume UTF-16..

* test/lisp/progmodes/eglot-tests.el
(eglot-tests--lsp-abiding-column-1): Tweak.
2025-11-10 12:28:14 +00:00
Steven Allen
5d11ee9f54 Lookup cached basic-auth credentials with the correct key
Credentials cached in 'url-basic-auth-storage' are keyed by
"server:port", but were being looked up by just "server" in
'url-basic-auth'.
* lisp/url/url-auth.el (url-basic-auth): Lookup cached basic auth
credentials by "server:port".  (Bug#79486)

* test/lisp/url/url-auth-tests.el (url-auth-test-auth-retrieve-cache):
Check the digest auth test-cases cache retrieval test cases against the
basic auth logic.
2025-11-08 19:21:10 +02:00
Eli Zaretskii
64fea996f3 Adapt vc-test-misc to MS-Windows
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-test-exec-after-1)
(vc-test-exec-after-2, vc-test-exec-after-3)
(vc-test-exec-after-4, vc-test-exec-after-5): Fix shell commands
for MS-Windows: use "&" instead of ";" and don't use fractional
times for 'sleep', as some Windows ports of 'sleep' don't support
that.
2025-11-08 14:02:44 +02:00
Sean Whitton
7557dcbabf New tests for vc-exec-after
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test--exec-after-wait): New macro.
(vc-test-exec-after-1, vc-test-exec-after-2)
(vc-test-exec-after-3, vc-test-exec-after-4)
(vc-test-exec-after-5): New tests.
2025-11-07 15:40:25 +00:00
Mattias Engdegård
0c694624c3 * test/src/comp-tests.el (setcarcdr): Don't mutate literals. 2025-11-06 16:22:13 +01:00
Juri Linkov
2f6e5d2eda * test/lisp/emacs-lisp/map-ynp-tests.el: Use 'eval-expression-debug-on-error'.
(test-map-ynp-kmacro): Bind 'eval-expression-debug-on-error' to nil
instead of silencing 'backtrace-print'.
2025-11-05 09:15:05 +02:00
Juri Linkov
2bec93b5f4 * test/lisp/emacs-lisp/map-ynp-tests.el: Silence backtrace.
(test-map-ynp-kmacro): Ignore 'backtrace-print' that prints
unrequested backtrace (bug#67836).
2025-11-04 19:23:55 +02:00
Mattias Engdegård
d123ac1400 Don't assume that literal constants are eq-unique in tests
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-test-ldiff):
* test/lisp/emacs-lisp/seq-tests.el (test-seq-union):
These tests relied on literal constants being unique in the sense of
'eq', and would fail if they stop being that (already the case for
strings).
2025-11-03 10:14:55 +01:00
F. Jason Park
f591d1c027 ; Skip erc-keep-place-indicator test on Emacs 27
* test/lisp/erc/erc-scenarios-base-reuse-buffers.el
(erc-scenarios-common--base-reuse-buffers-channel-buffers): Extend some
timeouts.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow): Prefer `ert-skip' here
instead of an :unstable tag because ERC's tests can run locally on some
systems with "SELECTOR=t".
2025-11-02 20:25:27 -08:00
Yuan Fu
b01435306a
Change tree-sitter query predicate names (bug#79687)
Latest tree-sitter library throws a syntax error if the
predicate names in a query don't end with question mark.  So we
made the following change:

:equal changed to :eq?
:match changed to :match?
:pred changed to :pred?

Old names are transparently converted to new names when
expanding patterns.

:match predicate can now take the regexp and the node in any
order: it'll figure out which is which automatically. This way
it works with current Emacs convention (regexp first), as well
as tree-sitter's match convention (regexp second).

* doc/lispref/parsing.texi (Pattern Matching): Update manuel to
use new predicate names.
* src/treesit.c:
(Ftreesit_pattern_expand):
(Ftreesit_query_expand):
(treesit_predicate_match):
(treesit_eval_predicates):
(syms_of_treesit): Use new predicate names.
* test/src/treesit-tests.el (treesit-query-api): Update test.
2025-11-02 17:11:55 -08:00
Spencer Baugh
fbb7eb5686 * test/lisp/emacs-lisp/map-ynp-tests.el: New file (bug#67836). 2025-11-01 20:40:20 +02:00
Juri Linkov
2447188a69 'map-y-or-n-p' now uses the minibuffer to read a char (bug#79664)
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Use the 'read-key'
branch only when the variable 'y-or-n-p-use-read-key' is non-nil.
Add a new cond-branch to read from the minibuffer.
Add a special case when def is nil in a kmacro in batch mode (bug#67836).

* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
Let-bind 'y-or-n-p-use-read-key' to t.
2025-11-01 20:27:45 +02:00
Juri Linkov
ab4a616b0b 'read-multiple-choice' now uses the minibuffer to read a char (bug#79664)
* doc/lispref/commands.texi (Reading One Event): Mention
'read-char-choice-use-read-key'.

* lisp/emacs-lisp/rmc.el (rmc--show-help): Show non-selected
resized Help window at bottom.  Inhibit useless message.
Remove unnecessary call to 'pop-to-buffer'.
(read-multiple-choice): Call 'read-multiple-choice--from-minibuffer'
when 'read-char-choice-use-read-key' is nil.
(read-multiple-choice--from-minibuffer): New function.

* test/lisp/emacs-lisp/rmc-tests.el (test-rmc--with-minibuffer-setup):
New macro.
(test-read-multiple-choice, test-read-multiple-choice-help):
Test both values of 'read-char-choice-use-read-key'.
2025-11-01 20:21:09 +02:00
David Ponce
13ec843352 cl-extra.el: Use the new API to speed up dispatch on derived types
* lisp/emacs-lisp/cl-extra.el (cl--types-of-memo): Delete var.
(cl--derived-type-specializers-memo): New var.
(cl-types-of): Delete function.
(cl--derived-type-specializers): New function.
(cl--derived-type-dispatch-list): Delete var.
(cl--derived-type-generalizer): Use the `:need-specializers` API instead.
(cl--derived-type-generalizers): Don't fill
`cl--derived-type-dispatch-list` any more.

* lisp/emacs-lisp/cl-preloaded.el (cl--derived-type-list): Delete var.
(cl--define-derived-type): Don't add type to `cl--derived-type-list`.

* test/lisp/emacs-lisp/cl-extra-tests.el (cl-types-test): Adjust.
2025-10-31 13:49:14 -04:00
Spencer Baugh
97d2a659e8 Optimize PCM regex to not contain adjacent wildcards
When multiple wildcards occur in a PCM pattern,
completion-pcm--pattern->regex previously would generate one
instance of [^z-a]* for each of those wildcards, even if the
wildcards were adjacent and could therefore be matched by a
single [^z-a]*.  This can make regex matching performance much
worse.  For example, with a minibuffer containing "*/" with
point at the start, completion-pcm-all-completions would take
several seconds to match in project-find-file in the Emacs repo.

Now, we run completion-pcm--pattern->segments on the pattern
first, which adds additional structure to the pattern, including
consolidating adjacent regexes into a single sublist.  Then
completion-pcm--segments->regex generates a single regex
wildcard for each of those pattern wildcards.  As a consequence,
we need to update the callers of completion-pcm--pattern->regex
which pass non-nil GROUP.  This provides a substantial
performance improvement in various edge cases.

* lisp/minibuffer.el (completion-pcm--pattern->segments)
(completion-pcm--segments->regex): Add.  (bug#79693)
(completion-pcm--pattern->regex)
(completion-pcm--merge-completions): Call pattern->segments and
segments->regex.
(completion-pcm--pattern-point-idx): Delete.
(completion-pcm--segments-point-idx): Add.
(completion-pcm--hilit-commonality): Call
completion-pcm--segments-point-idx to find the submatch
containing point.
* test/lisp/minibuffer-tests.el (completion-pcm-test-5): Add
more tests of highlighting the first difference.
(completion-pcm-test-pattern->regex): Add tests showing the
regex form of PCM patterns.
2025-10-30 19:24:51 +02:00
Eshel Yaron
330aa07f00
; elisp-scope.el: Improve face specification handling.
Replace the use of 'elisp-scope-face(-1)' for analyzing face
specifications with 'elisp-scope-1' calls with an
appropriate OUTSPEC argument.  This allows us to analyze
face specifications even when they are not passed directly
to relevant functions, but rather appear in a tail position
of a form that evaluates to a face specification.

* lisp/emacs-lisp/elisp-scope.el
(elisp-scope--match-spec-to-arg): Add new 'face' spec.
Use it instead of...
(elisp-scope-face, elisp-scope-face-1): ...these functions.
Remove them, no longer used.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test.
2025-10-29 17:20:03 +01:00
Eshel Yaron
b9aa420bc4
; elisp-scope.el: Simplify 'custom-declare-face' analyzer. 2025-10-29 16:32:14 +01:00
Michael Albinus
8c7b4391a5 Adapt `tramp-test49-external-backend-function'
* test/lisp/net/tramp-tests.el (tramp-test49-external-backend-function):
Extend test.
2025-10-29 09:19:58 +01:00
F. Jason Park
44cdb65cf3 Fix regression involving erc-channel-user accessors
* etc/ERC-NEWS: New section for ERC 5.6.2 and new entry mentioning
slight change in `erc-channel-user' accessor behavior.
* lisp/erc/erc-common.el (erc-channel-user): Change type for status slot
to natnum from integer.
* lisp/erc/erc.el (erc-channel-user-signal-if-status-unknown): New
variable.
(erc--define-channel-user-status-compat-getter): Only use fallback in
Non-ERC buffers because "obviously" a status flag is unusable if the
server doesn't advertise it or, rather, advertises nonsupport via its
absence.  This regression was introduced in ERC 5.6.
(erc-channel-begin-receiving-names): Sharp-quote function name.
(erc--get-prefix-flag): Mention in doc that a return value of nil can
also mean the status flag is not supported by the server.
* test/lisp/erc/erc-tests.el (erc--parsed-prefix): Show that it returns
nil in a non-ERC buffer.
(erc-tests--make-combinations)
(erc-tests--with-channel-user-status-accessors): New functions.
(erc-channel-user/status-accessors/solo/default)
(erc-channel-user/status-accessors/solo/ov)
(erc-channel-user/status-accessors/multi/default)
(erc-channel-user/status-accessors/multi/ov): New tests.
(Bug#67220)
2025-10-27 19:29:44 -07:00
Eli Zaretskii
23d8633579 Avoid face inheritance cycles
* src/xfaces.c (face_inheritance_cycle): New function.
(Finternal_set_lisp_face_attribute): Signal an error if the
':inherit' attribute of a face is modified in a way that will
cause it to inherit from itself.  (Bug#79672)

* test/src/xfaces-tests.el (xfaces-test-circular-inheritance): New
test.

* etc/NEWS: Announce the incompatible change.
2025-10-27 15:54:10 +02:00
Stephen Gildea
953d1db6ba time-stamp-format-* tests: reduce repetitiveness
* test/lisp/time-stamp-tests.el (time-stamp-test): New macro.
Use it to coalesce the repetitive lines of the various
time-stamp-format-* tests, reducing the line count of the
time-stamp-string formatting tests by 30%.
2025-10-22 21:18:38 -07:00
F. Jason Park
7aef4db23d ; Prefer EMACS_EMBA_CI for selecting ERC tests
* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow):
* test/lisp/erc/erc-stamp-tests.el (erc-echo-timestamp):
* test/lisp/erc/erc-tests.el (erc--channel-modes): Use "EMACS_EMBA_CI"
for EMBA-specific test selection instead of "CI", which is a Gitlab
"predefined" variable absent from .job-template's Docker subprocess.
2025-10-22 19:20:27 -07:00
F. Jason Park
61f4d97a0b ; Remove unwanted noise from ERC test output
Omit newlines and other stray chars, such as "^G", from log output when
running tests for ERC non-interactively.

* test/lisp/erc/erc-match-tests.el (erc-add-entry-to-list, erc-pals)
(erc-fools, erc-keywords, erc-dangerous-hosts): Make `inhibit-message'
non-nil when `noninteractive'.
* test/lisp/erc/erc-sasl-tests.el (erc-sasl--read-password--basic): Make
`inhibit-message' non-nil when `noninteractive'.
* test/lisp/erc/erc-scenarios-base-buffer-display.el
(erc-scenarios-base-buffer-display--interactive-default): Make
`inhibit-message' non-nil when `noninteractive'.
* test/lisp/erc/erc-scenarios-services-misc.el
(erc-scenarios-services-prompt): Make `inhibit-message' non-nil when
`noninteractive'.
* test/lisp/erc/erc-services-tests.el (erc-nickserv-get-password): Make
`inhibit-message' non-nil when `noninteractive'.
* test/lisp/erc/erc-stamp-tests.el (erc-timestamp-intangible--left):
Make `inhibit-message' non-nil when `noninteractive'.
* test/lisp/erc/erc-tests.el (erc-cmd-UNIGNORE, erc-hide-prompt)
(erc--check-prompt-input-for-excess-lines, erc-select-read-args, erc-tls)
(erc--interactive, erc-server-select): Make `inhibit-message' non-nil
when `noninteractive'.
(erc--modify-local-map): Inhibit call to `ding' because it inserts an 07
char, which shows up in the test result logs.
2025-10-21 18:21:46 -07:00
Stefan Monnier
38c32ed3ea (easy-mmode--less-selective-first): Enable test
*  test/lisp/emacs-lisp/easy-mmode-tests.el
(easy-mmode--less-selective-first): Enable test since it now succeeds.
2025-10-21 15:37:38 -04:00
Eshel Yaron
9f35d1653f
; elisp-scope.el: Fix error during widget args analysis
* lisp/emacs-lisp/elisp-scope.el (elisp-scope--match-spec-to-arg):
Simplify and fix handling of empty list.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test.
2025-10-21 16:18:24 +02:00
Eshel Yaron
bb54174c21
; Fix semantic highlighting in presence of shorthands
So far, 'scope-elisp-analyze-form' would disable
'read-symbol-shorthands' while reading a source form in
order to obtain the "original" length of symbols and pass
that length to the callback called for each analyzed symbol.
However, 'scope-elisp-analyze-form' could report an
incorrect length when a symbol was written with redundant
escaping (e.g. 'f\oo').  Moreover, disabling
'read-symbol-shorthands' breaks macro-expansion during
analysis, because macros may expect "expanded" symbols,
without shorthands.

In this commit we address these issues by leaving
'scope-elisp-analyze-form' enabled (so we get expended
symbols for macro-expansion) and recovering the original
length lazily in the callback, if needed, by going to the
beginning of the symbol and searching forward for its end.

* lisp/emacs-lisp/elisp-scope.el (elisp-scope--report):
Replace LEN argument with SYM, the analyzed symbol itself.
Adapt all callers.
(elisp-scope-analyze-form): Cease let-binding
'read-symbol-shorthands' to nil while reading.  Wrap
analysis in 'save-excursion' when reading from current
buffer.  Update docstring.
* lisp/progmodes/elisp-mode.el (elisp-local-references)
(elisp-fontify-symbol): Obtain symbol length from buffer.

* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test that incorporates 'read-symbol-shorthands'.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-test-font-lock):
Set up 'read-symbol-shorthands' in test file.
2025-10-21 16:12:11 +02:00
Mattias Engdegård
eed2fce541 Disable one tab-bar-test case on macOS
The test works when run interactively and in batch mode started from
a terminal, but not from M-x compile.

* test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restore-window):
Disable on macOS when TERM=dumb.
2025-10-21 13:19:07 +02:00
Mattias Engdegård
e443811bd7 ; * test/lisp/vc/vc-tests/vc-tests.el: use write-region, again 2025-10-20 16:25:55 +02:00
Sean Whitton
095956a745 vc-test--with-temp-change: Use write-region
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--with-temp-change):
Use write-region (bug#79657).
2025-10-20 15:16:05 +01:00
Michael Albinus
fb48f6016e Revert "* test/lisp/net/tramp-resources/foo.tar.gz: Remove."
This reverts commit e5cd797988.
2025-10-20 14:58:38 +02:00
Michael Albinus
e5cd797988 * test/lisp/net/tramp-resources/foo.tar.gz: Remove. 2025-10-20 14:43:04 +02:00
Michael Albinus
c024b9c661 Tramp cleanup
* doc/misc/tramp.texi (Configuration): Extend example.

* lisp/net/tramp.el (tramp-skeleton-write-region):
* lisp/net/tramp-cache.el (tramp-flush-file-upper-properties):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Use `when-let*'	consequently.

* lisp/net/tramp-cmds.el (tramp-file-name-with-method):
Add :initialize and :set functions.
(tramp-set-file-name-with-method): New defun.
(with-tramp-file-name-with-method): Filter out enabled methods.

* lisp/net/tramp-compat.el: Add TODO.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test-cascaded-file-archive): Use "foo.zip".

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case-p):
Extend check.
(tramp-test48-session-timeout): Adapt test.

* test/lisp/net/tramp-archive-resources/foo.zip: Renamed from outer.zip.
2025-10-20 14:42:12 +02:00
Mattias Engdegård
d1b3eb7eec Add any and all (bug#79611)
* lisp/subr.el (all, any): New.
* test/lisp/subr-tests.el (subr-all, subr-any): New tests.
* doc/lispref/lists.texi (List Elements): Document.
* etc/NEWS: Announce.
2025-10-20 11:39:16 +02:00
Mattias Engdegård
cfe3c1c840 Add drop-while and take-while (bug#79611)
* lisp/subr.el (internal--effect-free-fun-arg-p)
(drop-while, take-while): New.
* test/lisp/subr-tests.el (subr-drop-while, subr-take-while): New tests.
* doc/lispref/lists.texi (List Elements): Document.
* etc/NEWS: Announce.
2025-10-20 11:38:42 +02:00
Sean Whitton
b0012cb8e1 vc-rename-file: Make it work regardless of default-directory
* lisp/vc/vc.el (vc-rename-file): Make it work regardless of
default-directory; now the only influence of default-directory
should be resolving OLD and NEW if they are relative file names.
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--rename-file): Test
the influence of default-directory on vc-rename-file.
2025-10-19 15:39:22 +01:00
Mattias Engdegård
8ed5b4378a ; ispell-tests-common.el: tidy file-matching regexp 2025-10-19 14:09:22 +02:00
Lockywolf
2ae535c90b Fix ispell-tests on emacs CI
* test/lisp/textmodes/ispell-resources/fake-aspell-new.bash
Error with a broken dictionary.

* test/lisp/textmodes/ispell-tests/ispell-tests-common.el
(ispell-tests--constants/nonexistent-dictionary): Add.
(ispell-tests--some-valid-dictionary): Give fallback dictionary.

* test/lisp/textmodes/ispell-tests/ispell-tests.el
(ispell/ispell-accept-buffer-local-defs/received-file): Use
proper broken dictionary.
2025-10-19 12:14:58 +02:00
Stefan Monnier
4ec24ce2a1 (eval-and-compile): Preserve the surrounding lexical context
Implement a better fix for bug#79634.

* lisp/emacs-lisp/byte-run.el (eval-and-compile):
* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment)
<eval-and-compile>: Preserve the surrounding lexical context (the part
available during macroexpansion, i.e. which vars are dynbound).

* lisp/emacs-lisp/rx.el (<pcase> rx): Remove workaround.

* test/lisp/emacs-lisp/macroexp-tests.el
(macroexp--dynbound-eval-and-compile): New test.
2025-10-18 17:45:07 -04:00
Helmut Eller
48357dc612 Add a test for puthash
It's actually for a bug on the feature/igc branch.

* test/src/fns-tests.el (ft-puthash-weak): New test
(ft--puthash-weak): New helper.
2025-10-18 20:22:17 +02:00
Lockywolf
1f3d417736 Fix detecting a working hunspell on systems without a dictionary
Fixes bug#79477 and bug#79514

* test/lisp/textmodes/ispell-tests/ispell-hunspell-tests.el
(ispell-tests-hunspell--hunspell-working): Implement checker.
(ispell/hunspell/ispell-word/russian/check-only): Add skip-check.
(ispell/hunspell/ispell-word/english/check-only): Add skip-check.
(ispell/hunspell/ispell-word/language-switch/check-only): Add
skip-check.
(ispell/hunspell/ispell-word/russian/check-only/wrong-language): Add
skip-check.
(ispell/hunspell/ispell-word/multilang): Add skip-check.
* test/lisp/textmodes/ispell-tests/ispell-tests-common.el
(fake-aspell-path): Improve checking that an engine works.
(ispell-tests--letopt): Make restoring variables more robust,
rename to a local name.  Add debug spec.
(ispell-tests--with-ispell-global-dictionary): Rename to a local name
Add debug spec.
(ispell-tests--some-valid-dictionary): Add a selector for a safe
dictionary.
(ispell/ispell-accept-buffer-local-defs/received-file): Add.
(ispell-tests--constants/english/correct-list): Add.
(ispell-tests--constants/english/correct-one): Add.
(ispell-tests--constants/english/wrong): Add.
(ispell-tests--constants/russian/correct): Add.
(ispell-tests--constants/russian/wrong): Add.
(ispell-tests--constants/completion): Add.
* test/lisp/textmodes/ispell-tests/ispell-tests.el
(ispell/ispell-buffer-local-words/ispell-buffer-session-localwords):
reverse letopt and with-ispell-dictionary.
(ispell/ispell-buffer-local-words/ispell-words-keyword):
reverse letopt and with-ispell-dictionary.
(ispell/ispell-complete-word-interior-frag/simple):
reverse letopt and with-ispell-dictionary.
(ispell/ispell-complete-word/ispell-completion-at-point):
reverse letopt and with-ispell-dictionary.
(ispell/ispell-init-process/works-with-home):
reverse letopt and with-ispell-dictionary.
(ispell/ispell-kill-ispell):
reverse letopt and with-ispell-dictionary.
* test/lisp/textmodes/ispell-resources/fake-aspell-new.bash:
Add comments on unused function.  Replace echo with printf.
2025-10-18 13:59:07 +03:00
Spencer Baugh
bea16dfe69 Respect keymaps in buffer text for clicks on displayed strings
When clicking on a string displayed by a display property, also
look at the text properties of the underlying buffer text for
keymaps, not just the displayed string.  The displayed string
takes precedence over the buffer text, but it doesn't replace
it.

Also, we should use the buffer's local map even for clicks on
the mode line.  (Otherwise, what's the point of the <mode-line>
event?)

* src/keymap.c (Fcurrent_active_maps): Consider displayed
string, then buffer text, then fall back to local
map.  (Bug#79505)

* test/src/keymap-tests.el
(keymap-test-keymaps-for-non-buffer-positions): Add more tests.
2025-10-18 12:48:41 +03:00
Helmut Eller
3e78f6487d Add some tests for weak hashtables
Also add ft- as shorthand for fns-tests-.

* test/src/fns-tests.el (ft-hash-table-weakness, ft-weak-key-removal)
(ft-weak-value-removal, ft-weak-and-removal, ft-weak-or-removal): New
tests.
(ft--test-weak-removal, ft--gc, ft--check-entries, ft--check-entry)
(ft--hash-table-entries, ft--populate-hashtable, ft--component-num)
(ft--parse-component, ft--dead-component, ft--format-component)
(ft--init-rng, ft--nentries): New helpers.
2025-10-17 10:06:16 +02:00