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

8433 commits

Author SHA1 Message Date
Sean Whitton
c24e173c9c vc-add-working-tree: Finish by starting Dired
There won't be any uncommitted changes in the new working tree
yet, so vc-dir is unlikely to be useful.

* lisp/vc/vc.el (vc-add-working-tree): Finish by calling 'dired'
not 'vc-dir'.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--other-working-trees): Delete stubbing out 'vc-dir'.
2025-10-01 11:26:18 +01:00
Sean Whitton
8453fd59d4 vc-test--checkin-patch: Use atomic change groups
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--with-temp-change):
New macro.
(vc-test--checkin-patch): Use it.
2025-09-30 16:15:44 +01:00
Stephen Berman
ca704a67dc Fix debug specs in minibuffer-tests.el macros (bug#79499)
* test/lisp/minibuffer-tests.el (with-minibuffer-setup)
(completing-read-with-minibuffer-setup): Prevent instrumenting
functions that call these macros from erroring due to an invalid
debug specification in the 'declare' form.  Use 't' as the debug
spec since it is the most general and adequate here.
2025-09-30 11:05:22 +02:00
Sean Whitton
1d03eb590c vc-test--checkin-patch: Restore alternative revert code path
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch):
For the last stage of the test, restore alternative code path
for Git, though this time limited to when running the test on
MS-Windows.  Cf. subthread starting from
<https://lists.gnu.org/archive/html/emacs-devel/2025-09/msg00785.html>.
2025-09-27 21:31:38 +01:00
Sean Whitton
398b4f96ce vc-test--checkin-patch: Use {author} not {user}
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch):
Use Mercurial template '{author}' not '{user}' for
compatibility.
2025-09-26 15:10:13 +01:00
Michael Albinus
3536f1aa33 Adapt tramp-tests.el
* test/lisp/net/tramp-tests.el
(tramp-test26-interactive-file-name-completion): Adapt test.
2025-09-25 15:02:50 +02:00
Sean Whitton
8368fcb38c vc-git--checkin: Apply PATCH-STRING to working tree
* lisp/vc/vc-git.el
(vc-git--with-apply-temp-to-staging): Rename ...
(vc-git--with-apply-temp): ... to this.  New ARGS parameter.
All uses changes.
(vc-git--checkin): In POST function, apply PATCH-STRING to the
working tree with 'git apply --3way --ours'.
* lisp/vc/vc-hg.el (vc-hg--checkin): Document what the call to
'hg update' is for.
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch):
Delete completed FIXME and workaround.
2025-09-24 16:07:51 +01:00
Michael Albinus
c16b0d9af3 ; Instrument file-notify-test07-many-events
* test/lisp/filenotify-tests.el (file-notify--test-monitor):
Improve instrumentation.
2025-09-23 11:23:11 +02:00
Stephen Berman
77ca60b48d Navigate *Completions* buffer based on 'completions-format'
This patch makes 'next-completion' and 'previous-completion' work
in the vertical completions format analogously to how they work in
the default horizontal format (bug#78959).  It also fixes wrapping
in the vertical format and confines navigation (including
wrapping) in column-wise movement in the vertical format to the
current line, analogously to how navigation (including wrapping)
in line-wise movement in the horizontal format is confined to the
current column.

* doc/emacs/mini.texi (Completion): Fix several typos and improve
wording is several places.
(Completion Commands): Document navigation of the *Completions*
buffer in the vertical format.  Document the difference between
format-sensitive movement and strictly column-wise or line-wise
movement.  Document 'minibuffer-complete-and-exit' and update the
documentation of 'minibuffer-completion-auto-choose' and
'minibuffer-choose-completion'.  Document the use of a numeric
prefix argument with the navigation commands.
(Completion Options): Rearrange and improve documentation of
'completions-sort', 'completions-format' and
'completion-auto-wrap', updating the latter to document the new
behavior.

* lisp/minibuffer.el (minibuffer-visible-completions-map): Rebind
"<left>" to 'minibuffer-previous-column-completion' and "<right>"
to 'minibuffer-next-column-completion'.
(minibuffer-next-completion): Add check for whether completions
format is vertical to decide whether to call
'next-line-completion' and replace calling 'next-completion' by
'next-column-completion'.
(minibuffer-next-column-completion)
(minibuffer-previous-column-completion): New commands.

* lisp/simple.el (completion-list-mode-map): Rebind "<left>" to
'previous-column-completion' and "<right>" to 'next-column-completion'.
(last-completion): Add handling for vertical completions format.
(completion--move-to-candidate-end): Always move point to the
position immediately after the last character of the completion
candidate.  This unifies the behavior, simplifies the
implementation and facilitates implementing the improved
navigation of the *Completions* buffer.
(previous-column-completion, next-column-completion): New
commands, replacing the previous definitions of
'previous-completion' and 'next-completion' to reflect their
column-wise operation.  Confine navigation (including wrapping) in
vertical format to the current line.
(previous-line-completion, next-line-completion): Implement
line-wise navigation (including wrapping) through all completions
in vertical format, not just those in the current column as in
horiztonal format.  Update doc strings.
(next-completion, previous-completion): Redefine to call
'{next,previous}-line-completion' when completions format is
vertical and '{next,previous}-column-completion' otherwise.

* test/lisp/minibuffer-tests.el
(completions-format-navigation--tests): New function providing a
template to define tests of the navigation and wrapping behavior
with specified numbers of completion candidates.
(completions-format-navigation-test-{2,3,4,5,10,15,16}): New tests.
2025-09-22 16:04:42 +02:00
Sean Whitton
8310795bab VC checkin-patch: Support extracting commit metadata from patches
* lisp/vc/vc-git.el (vc-git--mailinfo): New function.
(vc-git-checkin-patch): Use it to extract authorship, date and
log message information from patches.
(vc-git--call): New INFILE argument.  All uses changed.
* lisp/vc/vc-hg.el (vc-hg--checkin): When COMMENT is nil, take
authorship, date and log message information from the patch.
* lisp/vc/vc.el (checkin-patch): Specify to use authorship, date
and comment information in PATCH-STRING (bug#79408).
(prepare-patch): Specify that patch should include authorship
identity, date and log message information for REV if supported.
(diff-bounds-of-hunk): Declare.
(vc-default-checkin-patch): Warn if it looks like we will ignore
patch authorship information.
* test/lisp/vc/vc-tests/vc-tests.el (vc-hg-command)
(vc-git--out-str): Declare.
(vc-test--checkin-patch): New function.
(vc-test-git08-checkin-patch, vc-test-hg08-checkin-patch): New
tests.
2025-09-21 21:59:02 +01:00
Michael Albinus
979ddc0601 Fix failed tests on emba
* test/lisp/autorevert-tests.el (auto-revert-test05-global-notify)
(auto-revert-test07-auto-revert-several-buffers): Adapt tests.

* test/src/comp-resources/comp-test-funcs.el (foo): Define error symbol.
2025-09-18 14:56:05 +02:00
Michael Albinus
3cb1cdfba7 ; Instrument file-notify-test07-many-events
* test/lisp/filenotify-tests.el (file-notify-test07-many-events):
Instrument for debugging on emba.
2025-09-16 09:04:05 +02:00
Dmitry Gutov
76f50fa55c ruby-syntax-propertize: Add exception for /=
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Create an exception for assign-division operator not to be
recognized as regexp start (bug#79454).

* test/lisp/progmodes/ruby-mode-resources/ruby.rb: Add example.
2025-09-16 02:17:13 +03:00
Michael Albinus
d6a7b0cd33 Tramp code cleanup
* lisp/net/tramp.el (tramp-use-absolute-autoload-file-names)
(tramp-skeleton-file-name-all-completions)
(tramp-parse-auth-sources, tramp-parse-file, tramp-parse-netrc):
* lisp/net/tramp-cache.el (tramp-parse-connection-properties):
* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names):
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Use `seq-uniq'.

* lisp/net/tramp.el (tramp-register-foreign-file-name-handler):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-directory-files):
Use `seq-union'.

* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test17-insert-directory):
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Use `seq-union'.
(tramp-test42-utf8): Use `seq-uniq' and `tramp-compat-seq-keep'.
2025-09-15 18:26:50 +02:00
Michael Albinus
72c19d0f39 Improve check for netrc tokens
* doc/misc/auth.texi (Help for users): Mention also "#" inside tokens.

* lisp/auth-source.el (auth-source-netrc-create): Better check for
token format.

* test/lisp/auth-source-tests.el (auth-source-backend-parse-json):
New test.
(auth-source-test-netrc-create-secret): Extend test.
2025-09-15 11:43:52 +02:00
Mattias Engdegård
cb17a8bbf3 Use linear arrays in ispell test to work with old bash
* test/lisp/textmodes/ispell-resources/fake-aspell-new.bash:
Avoid using associative arrays since they are not available
in old bash versions that come with some systems (bug#79177).
2025-09-14 12:40:09 +02:00
Mattias Engdegård
01e7d537b0 ; ispell-tests: use require instead of load 2025-09-14 11:31:53 +02:00
Mattias Engdegård
3300f2f40a ; * test/lisp/dom-tests.el: silence obsoletion warnings 2025-09-14 11:31:53 +02:00
Mattias Engdegård
c2a20f65d3 ; * test/lisp/net/tramp-tests.el: silence function-quoting warning 2025-09-14 11:31:53 +02:00
Eli Zaretskii
6f9a46f926 Fix 'ucs-normalize' tests following Unciode 17.0 import
* lisp/international/ucs-normalize.el
(ucs-normalize-composition-exclusions): Doc fix.

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1): Update to _really_
match Unicode 17.0.

* admin/notes/unicode: Update instructions.
2025-09-14 07:34:41 +03:00
Eli Zaretskii
fd5d35407a Fix Unicode-related tests
* test/lisp/international/mule-tests.el
(mule-cmds-tests--ucs-names-missing-names): Update no-name regions
of codepoints to Unicode 17.0.

* lisp/international/mule-cmds.el (ucs-names): Fix comments.

* admin/notes/unicode: Update instructions.
2025-09-13 17:52:30 +03:00
Andre A. Gomes
fe9b1fa014 Make comint understand SSH proxy password phrases
* lisp/comint.el (comint-password-prompt-regexp):
* test/lisp/comint-tests.el (comint-testsuite-password-strings):
Add SSH proxy password phrase.  (Bug#79424)
2025-09-13 09:16:25 +02:00
Michael Albinus
59c7ee29dc ; Fix last change
* test/lisp/textmodes/ispell-tests/ispell-aspell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-tests.el: Fix declare-function.
2025-09-12 16:49:08 +02:00
Michael Albinus
1b4e4fda5e Fix last change
* test/lisp/textmodes/ispell-tests/ispell-aspell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-hunspell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-international-ispell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-tests.el: Fix load argument.
2025-09-12 16:18:26 +02:00
Lockywolf
4846ec4871 Add tests to ispell.el interactive functions
* lisp/textmodes/ispell.el (ispell-accept-output): Fix variable init.

* test/lisp/textmodes/ispell-resources/fake-aspell-new.bash:
Update mock aspell to be able to serve all tests.

* test/lisp/textmodes/ispell-tests/ispell-aspell-tests.el:
(ispell/aspell/ispell-word/english/correct): Implement.
(ispell/aspell/ispell-word/english/incorrect): Implement.
(ispell/aspell/ispell-word/english/wrong-language): Implement.

* test/lisp/textmodes/ispell-tests/ispell-hunspell-tests.el
Fix byte compilation errors.

* test/lisp/textmodes/ispell-international-ispell-tests.el
Fix byte compilation errors.

* test/lisp/textmodes/ispell-tests/ispell-tests-common.el
(with-ispell-global-dictionary): Implement a macro to
set and restore ispell.el's global dictionary.

* test/lisp/textmodes/ispell-tests/ispell-tests.el:
(ispell/ispell-buffer-local-words/ispell-words-keyword): Fix CI run.
(ispell/ispell-accept-buffer-local-defs/simple): Fix skip condition.
(ispell/ispell--run-on-word/default): Fix skip condition.
(ispell/ispell-word/default/check-only/correct): Fix global variable.
(ispell/ispell-word/default/check-only/correct/add-init): Fix
global variable.
(ispell/ispell-word/default/check-only/incorrect): Fix skip condition.
(ispell/ispell-region/incorrect): Fix postcondition.
(ispell/ispell-call-process/simple): Fix emacs path.
(ispell/ispell-call-process/simple-writable): Fix emacs path.
(ispell/ispell-call-process-region/cat-empty): Fix emacs path.
(ispell/ispell-call-process-region/cat-random): Fix emacs path.
(ispell/ispell-kill-ispell): Implement.
(ispell/ispell/buffer): Implement.
(ispell/ispell/region): Implement.
(ispell/ispell-change-dictionary): Implement.
(ispell/ispell-comments-and-strings/correct): Implement.
(ispell/ispell-comments-and-strings/incorrect): Implement.
(ispell/ispell-comment-or-string-at-point): Implement.
(ispell/ispell-pdict-save): Implement.
(ispell/ispell-pdict-save/force): Implement.
(ispell/ispell-pdict-save/modified): Implement.
(ispell/ispell-pdict-save/unmodified): Implement.
(ispell/ispell-lookup-words/simple): Implement.
(ispell/ispell-complete-word/ispell-completion-at-point): Implement.
(ispell/ispell-complete-word-interior-frag/simple): Implement.
(ispell/ispell-minor-mode/simple): Implement.
(ispell/ispell-message/correct): Implement.
(ispell/ispell-message/incorrect): Implement.
2025-09-12 16:02:48 +02:00
Michael Albinus
26ad23addb Introduc auth-source-ignore-non-existing-file
* lisp/auth-source.el (auth-source-ignore-non-existing-file):
Rename it from `auth-source-ignore-empty-file'.
(auth-source-backends-parser-file): Use it.

* doc/misc/auth.texi (Help for users):
* etc/NEWS:
* test/lisp/auth-source-tests.el (auth-source-validate-backend)
(auth-source-test-netrc-create-secret):
Use `auth-source-ignore-non-existing-file'.
2025-09-12 12:29:30 +02:00
Michael Albinus
43f507f430 Minor edits in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test16-file-expand-wildcards)
(tramp-test26-interactive-file-name-completion):
Prefer #'string-lessp over 'string<.
(tramp--test-ange-ftp-p, tramp-test47-read-password)
(tramp-test47-read-otp-password): Use function read syntax.
2025-09-12 12:21:48 +02:00
Mattias Engdegård
464216ca73 ; even less test log spam from load 2025-09-12 10:41:43 +02:00
Eli Zaretskii
5579d32a41 Update to Unicode 17.0
* test/manual/BidiCharacterTest.txt:
* admin/unidata/BidiBrackets.txt:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/Blocks.txt:
* admin/unidata/IVD_Sequences.txt:
* admin/unidata/IdnaMappingTable.txt:
* admin/unidata/NormalizationTest.txt:
* admin/unidata/PropertyValueAliases.txt:
* admin/unidata/ScriptExtensions.txt:
* admin/unidata/Scripts.txt:
* admin/unidata/SpecialCasing.txt:
* admin/unidata/UnicodeData.txt:
* admin/unidata/confusables.txt:
* admin/unidata/emoji-data.txt:
* admin/unidata/emoji-sequences.txt:
* admin/unidata/emoji-test.txt:
* admin/unidata/emoji-variation-sequences.txt:
* admin/unidata/emoji-zwj-sequences.txt: Import from Unicode 17.0.

* etc/NEWS:
* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2):
* lisp/international/mule-cmds.el (ucs-names):
* lisp/international/fontset.el (script-representative-chars)
(otf-script-alist):
* lisp/international/characters.el:
* admin/unidata/blocks.awk: Update for Unicode 17.0.
2025-09-11 18:00:42 +03:00
Mattias Engdegård
d859ac4183 Make bytecomp-tests cease warn and error to stdout
They were caused by compilation errors going to 'display-warning'
which prints a duplicate of the message to stdout when running
noninteractively.

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--log-warning-for-byte-compile)
(bytecomp-tests--with-warnings): New.  Wrap around compilation calls in
this file.
2025-09-10 14:35:48 +02:00
Spencer Baugh
0e9cee2bf5 Ignore keymaps at point for positions outside the buffer
Correct a few edge cases where we used the keymaps at point when
looking up keymaps for an event position which is outside the
current buffer.  Namely:

- Clicking on a part of the mode line which is after the end of
  mode-line-format produces an event with non-nil posn-area but
  nil posn-string.

- Even if posn-string doesn't have a local keymap, we should
  still ignore the keymaps at point if posn-string is non-nil.

* src/keymap.c (Fcurrent_active_maps): Ignore keymaps at point
for more positions outside the buffer.  (bug#76620)
2025-09-09 18:02:24 -04:00
Michael Albinus
d1221a427f Ignore non-existing or empty files in auth-sources
* doc/misc/auth.texi: Replace @code{"..."} by @t{"..."}.
(Help for users): Describe property lists format.  Explain, that
empty files in auth-sources are ignored when
auth-source-ignore-empty-file is non-nil.
(Help for developers): Add auth-source-creation-defaults to vindex.

* etc/NEWS: Introduce auth-source-ignore-empty-file.
Presentational fixes and improvements.

* lisp/auth-source.el (auth-source-ignore-empty-file): New defcustom.
(auth-source-backends-parser-file): Use it.  (Bug#9113)

* test/lisp/auth-source-tests.el (auth-source-validate-backend):
Let-bind `auth-source-ignore-empty-file'.
(auth-source-test-searches): Set file suffix.
(auth-source-test-netrc-create-secret): Adapt test.
2025-09-09 23:20:56 +02:00
Lockywolf
710d371eb7 Add convenience path/to/component target to tests/Makefile.in
* test/Makefile.in (subdir_template): Add convenience targets.

* test/README: Mention this.
2025-09-09 10:09:43 +02:00
Lockywolf
adc9c43306 ispell.el: Add 56 tests (bug#79177)
* test/lisp/textmodes/ispell-tests/ispell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-aspell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-international-ispell-tests.el:
* test/lisp/textmodes/ispell-tests/ispell-hunspell-tests.el: New files.
* test/lisp/textmodes/ispell-resources/fake-aspell.bash: Add a mock
`aspell' for use in ispell.el test, with old version.
* test/lisp/textmodes/ispell-resources/fake-aspell-new.bash: Add a mock
`aspell' for use in ispell.el test, with recent version.
2025-09-07 15:01:43 +03:00
Eshel Yaron
60a22185b7
Support completion category inheritance
* lisp/minibuffer.el (define-completion-category): New function.
(completion-category-get): New function, implements completion
category property lookup with (multiple) inheritance.
(completion-metadata-get, completion--styles)
(completion--cycle-threshold): Use it.
(completion-category-defaults): Mention it in docstring.
Remove entry for 'project-buffer' category, and instead...
* lisp/progmodes/project.el: ...have 'project-buffer' inherit
from 'buffer'.
* test/lisp/minibuffer-tests.el
(completion-category-inheritance): New test.
* etc/NEWS: Announce support for category inheritance.
2025-09-03 21:01:43 +02:00
Michael Albinus
6ad8745833 Extend tramp-test26-interactive-file-name-completion
* lisp/net/tramp.el (tramp-get-completion-methods):
Use `tramp-compat-seq-keep'.

* test/lisp/net/tramp-tests.el (completions-max-height): Declare.
(tramp-test26-interactive-file-name-completion): Extend test.
2025-09-02 12:09:17 +02:00
Spencer Baugh
b953dc679c Revert "Avoid duplicating strings in pcm--merge-completions"
Revert "Avoid duplicating strings in pcm--merge-completions",
commit b511c38bba.  It broke
existing behavior, now covered by tests adding in this commit.

* lisp/minibuffer.el (completion-pcm--merge-completions):
* test/lisp/minibuffer-tests.el (completion-pcm-test-anydelim):
(completion-pcm-bug4219):
2025-09-01 17:12:42 -04:00
Sean Whitton
66ef930ebe Rename arg REMOTE-LOCATION -> UPSTREAM-LOCATION
* lisp/vc/vc-bzr.el (vc-bzr-log-incoming)
(vc-bzr-incoming-revision, vc-bzr-log-outgoing):
* lisp/vc/vc-git.el (vc-git-incoming-revision):
* lisp/vc/vc-hg.el (vc-hg-incoming-revision):
* lisp/vc/vc.el (vc-root-diff-incoming, vc-diff-incoming)
(vc-root-diff-outgoing, vc-diff-outgoing)
(vc-root-diff-outgoing-base, vc-diff-outgoing-base)
(vc-incoming-outgoing-internal, vc-remote-location-history)
(vc--incoming-revision, vc-log-incoming, vc-default-log-incoming)
(vc-log-outgoing, vc-default-log-outgoing): Rename arguments
REMOTE-LOCATION -> UPSTREAM-LOCATION.  Adjust strings.
(vc--maybe-read-remote-location): Rename ...
(vc--maybe-read-upstream-location): ... to this.
2025-09-01 09:41:40 +01:00
Spencer Baugh
b610f36d44 Document and test 'let-alist' support for indexing
* etc/NEWS: Announce 'let-alist' support for indexing.
* test/lisp/emacs-lisp/let-alist-tests.el (let-alist-numbers):
Add a test for 'let-alist's support for indexing.
* doc/lispref/lists.texi (Association Lists): Document indexing
with 'let-alist'.  (Bug#66509)
2025-08-30 13:59:18 +03:00
Steven Allen
4ab16d701e Eglot: escape literal % characters in URIs
Escape literal % characters in Eglot URIs

Otherwise, a literal % in a file-name will be interpreted (by the
language server) as if it were a part of a percent-encoded sequence.

See Bug#78984 for context on why `url-path-allowed-chars' cannot be
changed to escape literal % characters.

* lisp/progmodes/eglot.el (eglot--uri-path-allowed-chars): Escape %,
remove the redundant variable definition.
* test/lisp/progmodes/eglot-tests.el (eglot-test-path-to-uri-escape):
test it.
2025-08-30 11:19:19 +01:00
Jens Schmidt
fdc6bb2caf Add edebug-bounce-to-previous-value
Command edebug-bounce-to-previous-value uses the previous value
observed while single-stepping or evaluating an expression to
bounce point in the outside current buffer to the buffer
position corresponding to that value.

* lisp/emacs-lisp/edebug.el (edebug-previous-value): Add
variable.
(edebug-compute-previous-result, edebug-eval-expression): Update
it.
(edebug-bounce-to-previous-value): Add command.
(edebug-mode-map): Add keybinding for the new command, replacing
the binding of "P" to edebug-view-outside.
(edebug-mode-menus): Add menu entry for the new command.
* doc/lispref/edebug.texi (Edebug Views): Add documentation.
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
(edebug-test-code-bounce-point): Add test code.
* test/lisp/emacs-lisp/edebug-tests.el
(edebug-tests-bounce-outside-buffer)
(edebug-tests-bounce-outside-point)
(edebug-tests-bounce-outside-mark)
(edebug-tests-bounce-record-outside-environment)
(edebug-tests-should-have-bounced-to): Add infrastructure to
test bounces.
(edebug-tests-check-keymap): Update tests to new key bindings.
(edebug-tests-bounce-point)
(edebug-tests-bounce-to-previous-value)
(edebug-tests-bounce-to-previous-non-position): Add tests.
(edebug-tests-evaluation-of-current-buffer-bug-19611): Clean up
side effects.  (Bug#79288)
2025-08-30 12:30:21 +03:00
john muhl
34f3ac6c5b Fontify all comment delimiters in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (lua-ts--comment-font-lock):
Apply 'font-lock-comment-delimiter-face' to the entire span of
initial dashes.  In particular, this improves the appearance of
LuaCATS and EmmyLua style annotations which use "---".
* test/lisp/progmodes/lua-ts-mode-resources/font-lock.lua:
Add tests.  (Bug#79258)
2025-08-30 11:31:34 +03:00
Sean Devlin
aa60f16e66 Add user option to inhibit Calc startup message (bug#79143)
* doc/misc/calc.texi (Customizing Calc): Document the new option.
* etc/NEWS: Document the new option.
* lisp/calc/calc.el (calc-inhibit-startup-message): New option to
inhibit Calc’s startup message.
(calc): Respect the option in Calc’s startup code.
* test/lisp/calc/calc-tests.el (ert): Require ert-x for
'ert-with-message-capture'.
(calc-inhibit-startup-message): Test the new user option.
2025-08-30 10:22:06 +03:00
Michael Albinus
95232f556e `Fix read-directory-name' for Tramp files
* lisp/minibuffer.el (completion-file-name-table): Improve bypass
for directory checking.  (Bug#79236)

* lisp/net/tramp.el (tramp-user-regexp): Exclude "[" and "]".
(tramp-completion-make-tramp-file-name): Handle port for IPv6 hosts.
(tramp-completion-handle-file-directory-p)
(tramp-completion-handle-file-exists-p): Simplify.
(tramp-completion-handle-file-name-completion): Ignore PREDICATE.
(tramp-completion-dissect-file-name): Handle ports.
(tramp-parse-default-user-host): Suppress '(nil nil) result.
(tramp-parse-file): Delete duplicates.
(tramp-parse-shosts-group): Accept also IPv6 addresses.
(tramp-handle-file-directory-p): Return t for filenames
"/method:foo:".
(tramp-parse-auth-sources, tramp-parse-netrc):
* lisp/net/tramp-cache.el (tramp-parse-connection-properties):
* lisp/net/tramp-gvfs.el (tramp-gvfs-parse-device-names):
Use `tramp-compat-seq-keep'.

* test/lisp/net/tramp-tests.el (edebug-mode): Declare.
(tramp--test-message): Write also trace value.
(tramp-test26-file-name-completion):
(tramp-test26-interactive-file-name-completion): Extend tests.
2025-08-29 13:47:51 +02:00
Spencer Baugh
e46471ed07 Make RET choose the selected completion
Previously, one could select a completion via M-<up>/M-<down>,
but then RET would not actually select the chosen completion.
With the addition of completion-auto-deselect, this is not
actually necessary: we can reasonably assume that when a
completion is selected, the user wants to use that, since their
last action must have been to select it.  So, just choose the
selected completion on RET.  This lets us default
minibuffer-completion-auto-choose to nil.

For minibuffers with require-match completion, this can be done
by changing the existing command bound to RET.  For minibuffers
with nil require-match completion, RET was previously bound to
exit-minibuffer, and changing exit-minibuffer to have this logic
is risky.  We handle that case by adding a new
minibuffer-completion-exit which wraps exit-minibuffer and bind
RET to it.

* lisp/minibuffer.el (minibuffer-insert-completion-if-selected)
(minibuffer-completion-exit, completion--selected-candidate):
Add.
(minibuffer-complete-and-exit): Call
minibuffer-choose-completion. (bug#77253)
(minibuffer-local-completion-map): Bind RET to
minibuffer-completion-exit, overriding exit-minibuffer.
(completion-in-region-mode-map): Bind RET to
minibuffer-choose-completion when there's a selected candidate.
(minibuffer-completion-auto-choose): Default to nil.
(minibuffer-visible-completions--filter)
(minibuffer-visible-completions-map): Delete RET binding, no
longer necessary.
* lisp/simple.el (completion-setup-function): Update completion
help text to show more correct bindings.
* test/lisp/minibuffer-tests.el (completions-header-format-test)
(minibuffer-next-completion): Set
minibuffer-completion-auto-choose=t explicitly.
(with-minibuffer-setup, minibuffer-completion-RET-prefix)
(completion-in-region-next-completion): Add new tests.
* etc/NEWS: Announce.
2025-08-27 21:23:03 +03:00
Michael Albinus
29c35668d0 Extend info-xref-test-emacs-manuals, fix info reference
* doc/lispref/loading.texi (Autoload): Fix reference.

* test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals):
Print output buffer.
2025-08-27 11:24:12 +02:00
F. Jason Park
d98e1a8375 Remove scrolltobottom dependency from erc-fill module
This mostly reverts 9668b4f97c
"Make erc-fill-wrap depend on scrolltobottom".

* etc/ERC-NEWS: Mention removal of formal dependency.
* lisp/erc/erc-fill.el (erc-fill--wrap-scrolltobottom-exempt-p): Remove
unused variable.
(erc-fill--wrap-ensure-dependencies): Remove unused dependency check.
(erc-fill-wrap-mode): Remove scrolltobottom dependency from doc string.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--wrap-populate):
Remove unused binding from var list.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--make-bindings): Remove unused binding.
2025-08-25 21:17:48 -07:00
Po Lu
2852967233 Merge remote-tracking branch 'savannah/master' into master-android-1 2025-08-25 10:01:41 +08:00
john muhl
c5656af2ff ; Add tests for 'lua-mode'
* test/lisp/progmodes/lua-mode-resources/font-lock.lua:
* test/lisp/progmodes/lua-mode-resources/hide-show.lua:
* test/lisp/progmodes/lua-mode-resources/indent.erts:
* test/lisp/progmodes/lua-mode-resources/movement.erts:
* test/lisp/progmodes/lua-mode-resources/which-function.lua:
* test/lisp/progmodes/lua-mode-tests.el: New file.
2025-08-25 09:59:04 +08:00
Mattias Engdegård
308e3ab1db Disallow string data resizing (bug#79784)
Only allow string mutation that is certain not to require string data to
be resized and reallocated: writing bytes into a unibyte string, and
changing ASCII to ASCII in a multibyte string.

This ensures that mutation will never transform a unibyte string to
multibyte, that the size of a string in bytes never changes, and that
the byte offsets of characters remain the same.  Most importantly, it
removes a long-standing obstacle to reform of string representation and
allow for future performance improvements.

* src/data.c (Faset): Disallow resizing string mutation.
* src/fns.c (clear_string_char_byte_cache):
* src/alloc.c (resize_string_data):  Remove.
* test/src/data-tests.el (data-aset-string): New test.
* test/lisp/subr-tests.el (subr--subst-char-in-string):
Skip error cases.
* test/src/alloc-tests.el (aset-nbytes-change):
Remove test that is no longer relevant.
* doc/lispref/strings.texi (Modifying Strings):
* doc/lispref/sequences.texi (Array Functions):
* doc/lispref/text.texi (Substitution):  Update manual.
* etc/NEWS: Announce.
2025-08-24 10:28:27 +02:00