1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-24 05:22:04 -08:00
Commit graph

8473 commits

Author SHA1 Message Date
Stefan Monnier
9dcf0bc428 Fix recent test suite regression (bug#80177)
* lisp/emacs-lisp/cl-generic.el (cl--generic-make-function):
Preserve advertised-calling-convention info.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-quote-optimization):
Require `byte-opt` to fix the test when the compiler is not loaded yet.

* lisp/progmodes/elisp-mode.el: Fix some >80column problems.
(elisp--xref-format-extra)
(elisp--xref-format): Make them constant, now that we don't have
the purespace.  Also, use %S since some of the elements
don't necessarily have names and even if they do, we'd want to
escape any funny characters in them to avoid ambiguities.
(elisp--xref-find-definitions): Fix uses of
`elisp--xref-format-extra` accordingly.
Improve heuristic to distinguish proper `cl-defgeneric` from
implicit ones.
(elisp-eldoc-docstring-length-limit)
(elisp-eldoc-funcall-with-docstring-length): Remove redundant `:group`.
* lisp/cedet/mode-local.el (xref-mode-local-overload): Pass the
override symbol rather than its name through `elisp--xref-format-extra`.
* test/lisp/progmodes/elisp-mode-tests.el (find-defs-constructor):
Adjust test to new text.
2026-01-11 18:26:53 -05:00
F. Jason Park
f740d033ae ; Don't use cl-letf with generic function in ERC test
* test/lisp/erc/erc-tests.el (erc--update-channel-modes): Use advice
instead.  See 058bac45 "cl-generic.el: Avoid an O(N^2)
behavior".  (Bug#80175)
* test/lisp/erc/resources/erc-d/erc-d-tests.el
(erc-d-tests--start-server): Increase timeout to hopefully address
anomalous EMBA failure.  Unrelated to cited bug.
2026-01-11 05:25:03 -08:00
F. Jason Park
c84aea1c1b Use seq-doseq for iterating over strings in ERC
* lisp/erc/erc-common.el (erc--doarray): Remove unused function.
* lisp/erc/erc.el (erc--channel-mode-types, erc--process-channel-modes)
(erc--parse-user-modes): Replace `erc--doarray' with `seq-doseq'.
* test/lisp/erc/erc-tests.el (erc--doarray): Remove test.
2026-01-11 05:25:03 -08:00
João Távora
67dd97a4f7 Eglot: solve misc Elisp compatibility problems on Emacs 26.3
* lisp/progmodes/eglot.el (eglot--semtok-request)
(eglot--semtok-after-send-changes): Unbreak for 26.3.

* test/lisp/progmodes/eglot-tests.el (eglot--tests-connect): Use
  split-string.
  (eglot-test-rust-completion-exit-function): Use skip-unless.
2026-01-11 13:15:27 +00:00
João Távora
a59fafde75 Eglot: don't use text-property-search-forward unavailable on 26.3
* lisp/progmodes/eglot.el (eglot--format-markup)
(eglot--semtok-font-lock-2): Rewrite.

* test/lisp/progmodes/eglot-tests.el (eglot--semtok-wait): Rewrite.
2026-01-11 13:15:27 +00:00
Michael Albinus
1bc8e61df4 Don't use "make -j" when running tests
* test/infra/gitlab-ci.yml (.job-template):
* test/README: Don't use "make -j".
2026-01-11 10:21:12 +01:00
João Távora
68de337f26 Eglot: improve diagnostics tests
* test/lisp/progmodes/eglot-tests.el
(eglot-test-basic-diagnostics): Robustify.
(eglot-test-basic-pull-diagnostics)
(eglot-test-basic-stream-diagnostics): New tests.
2026-01-11 03:42:01 +00:00
João Távora
189e39c52a Eglot: improve automated test machinery
* test/lisp/progmodes/eglot-tests.el
(eglot--wait-for): Fix thinkos and improve.
(eglot--tests-connect): Take TIMEOUT and SERVER kwargs.
(eglot-test-eclipse-connect)
(eglot-test-slow-sync-connection-wait)
(eglot-test-slow-sync-connection-intime): Update
eglot--tests-connect call.
2026-01-11 03:42:01 +00:00
Michael Albinus
d9cc684d10 * test/README: Specify, how to invoke "make". (Bug#80112) 2026-01-09 09:09:04 +01:00
Stefan Monnier
b5b7504c73 (package-test-install-single): Fix test failure
* test/lisp/emacs-lisp/package-tests.el (package-test-install-single):
We signal an error only for interactive calls now.
2026-01-07 10:58:27 -05:00
Stephen Gildea
ba6e702bff time-stamp-helper-string-used: New test
* test/lisp/time-stamp-tests.el (time-stamp-helper-string-used):
New test.
2026-01-05 15:23:01 -08:00
Manuel Giraud
06d3d97e74 ; Fix simple logic in OpenBSD's random test
* test/src/fns-tests.el (fns-tests-random): Do not test on OpenBSD
since either equal or not equal is a valid result here.  (Bug#80125)
2026-01-04 11:25:50 +02:00
Eli Zaretskii
4f2a8d81f8 ; * test/manual/etags/README: Update the procedure for CTAGS.good_update. 2026-01-03 11:30:45 +02:00
Eli Zaretskii
e5a6b2e262 ; Update CTAGS.good_update in etags tests for copyright year change. 2026-01-03 11:26:56 +02:00
Mattias Engdegård
791024dc8c Make string-trim faster
* lisp/subr.el (string-trim): Avoid intermediate substring allocation.
* test/lisp/subr-tests.el (subr-string-trim-left):
(subr-string-trim-right): Move here from subr-x-tests.el.
(subr-string-trim): New test.
2026-01-02 19:09:54 +01:00
João Távora
c6483b4c89 ; Eglot: unbreak tests after semtok face rename
* test/lisp/progmodes/eglot-tests.el (eglot-test-semtok-basic)
(eglot-test-semtok-refontify): Fix tests.
2026-01-02 09:25:36 +00:00
Sean Whitton
094e5f0928 ; Update ETAGS/CTAGS tests for copyright year change.
CTAGS.good_update not yet updated.
2026-01-01 13:23:21 +00:00
Sean Whitton
c31f6adc31 ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
Philip Kaludercic
4771cd2e58
; Fix test resulting from 5744519e
* lisp/emacs-lisp/package.el (package-install): Delete dead code
resulting from previous change.
* test/lisp/emacs-lisp/package-tests.el
(package-test-install-single): Adjust code to expect
'user-error'
2026-01-01 13:47:41 +01:00
Dmitry Gutov
6c832af157 Allow project-vc-ignores to be applied in more cases
Discussed in
https://lists.gnu.org/archive/html/emacs-devel/2025-12/msg00903.html.

* lisp/progmodes/project.el (project-files) <vc>: Look up the
value of 'project-vc-ignores' inside DIR rather than project root.
This allows this variable to be applied in external dirs as well.
(project-ignores) <vc>: Do likewise.
(project--value-in-dir): Ensure that DIR has a trailing slash.
The caller might pass the value without slash if produced
differently.

* test/lisp/progmodes/project-tests.el
(project-vc-ignores-in-external-directory): New test.
(project-vc-supports-files-in-subdirectory): Update the test,
considering the subtle change in behavior: the directory DIR
directly includes a .dir-locals.el which sets project-vc-ignores,
which wasn't previously applied because it wasn't set in the root.
2026-01-01 04:13:30 +02:00
Liu Hui
1fb98f2002 Fix the date in the calendar mode line (bug#80069)
* lisp/calendar/calendar.el (calendar-redraw)
(calendar-other-month): Make sure that the mode line is updated
after cursor motion in case 'date' is used in
'calendar-mode-line-format'.
(calendar-set-date-style): Delete call to
calendar-update-mode-line because it is called in calendar-draw.
(calendar-generate-window): Delete calls to
calendar-update-mode-line and calendar-cursor-to-visible-date.
It's better for the caller to do it.
(calendar-basic-setup): Update cursor position and mode line.
* lisp/calendar/cal-move.el (calendar-goto-today): Delete
calendar-update-mode-line because calendar-move-hook is called
last.  This is consistent with other cal-move commands.
* test/lisp/calendar/calendar-tests.el
(calendar-test-date-in-mode-line): New test.
2025-12-29 11:36:07 +00:00
Mattias Engdegård
8f9c0c1843 Don't use the term 'null' for empty strings
Zero-length strings are just 'empty'; 'null' can be confusing in several
ways.

* lisp/subr.el (split-string, string-lines):
* doc/lispref/strings.texi (Creating Strings):
Change argument names from 'omit-nulls' to 'omit-empty'.
2025-12-28 12:37:37 +01:00
Mattias Engdegård
2592690abe Various split-string improvements
* lisp/subr.el (split-string):
Fix quadratic behaviour in (split-string "xx..." ":" nil " +").
General code reorganisation for speed and reduced allocation.
Fix a regexp bug; eg, (split-string "A;B" "," nil ";\\|:")

* test/lisp/subr-tests.el (subr-test-split-string):
More extensive test coverage.
2025-12-28 12:37:37 +01:00
Paul Eggert
481ad70d5c December 2025 spelling fixes
Some of the fixes are to continue to use American
rather than British spelling.
* doc/misc/modus-themes.org (my-modus-themes-engraved-faces):
Fix misspelled ‘:foreground’s.
* etc/themes/modus-themes.el (modus-themes-faces):
Fix misspelled ‘modus-themes-bold’.
* lisp/emacs-lisp/rx.el (rx--normalize-char-pattern):
Rename from rx--normalise-char-pattern.
(rx--optimize-or-args):	Rename from rx--optimise-or-args.
* lisp/frame.el (frame--special-parameters):
Fix misspelled "right-divider-width".
* lisp/net/tramp.el (tramp-fingerprint-prompt-regexp):
Use American spelling “centered”, to match current libfprintf.
* lisp/org/org-fold-core.el (org-fold-core--optimize-for-huge-buffers):
Rename from org-fold-core--optimise-for-huge-buffers.
(org-fold-core-update-optimization):
Rename from org-fold-core-update-optimisation,
leaving an alias behind.
(org-fold-core-remove-optimization):
Rename from org-fold-core-remove-optimisation,
leaving an alias behind.
* lisp/org/org.el (org-advertized-archive-subtree):
This alias is now obsolete.
* lisp/play/zone.el (zone-ignored-buffers):
Fix misspelling of ‘zone--buffer-encrypted-p’.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode-faces):
Fix misspelling of ‘csharp’ group.
* lisp/vc/vc.el (vc-clonable-backends-custom-type):
Rename from vc-cloneable-backends-custom-type,
leaving an alias behind.
* test/lisp/emacs-lisp/bytecomp-tests.el:
(bytecomp-tests--warn-arity-non-compiled-callee):
Rename from bytecomp-tests--warn-arity-noncompiled-callee.
(bytecomp-test-defface-spec): Reword a deliberate misspelling
of “default” that is so common I don’t want it to pollute the
spelling dictionary.
* test/lisp/emacs-lisp/package-vc-tests.el:
(package-vc-tests-preserve-artifacts):
Rename from package-vc-tests-preserve-artifacts.
* test/lisp/eshell/em-prompt-tests.el:
(em-prompt-test/forward-backward-paragraph-1):
Reword a deliberate misspelling of “goodbye” that is so common I
don’t want it to pollute the spelling dictionary.
2025-12-26 10:22:12 -08:00
Michael Albinus
5b461a4930 Fix problem in tramp-adb
* lisp/net/tramp-adb.el (tramp-adb-do-ls): New function.
(tramp-adb-handle-file-attributes)
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-file-name-all-completions): Use it.  (Bug#80054)
2025-12-26 11:28:12 +01:00
Stephen Gildea
c60ebac646 time-stamp-custom-pattern test: Minor optimization
* test/lisp/time-stamp-tests.el (time-stamp-custom-pattern): Refactor,
lifting the setup of the test buffer out of the loop.
2025-12-22 08:25:58 -08:00
Mattias Engdegård
10dc5824b4 ; * test/lisp/emacs-lisp/vtable-tests.el: avoid arity warning 2025-12-22 12:22:16 +01:00
Mattias Engdegård
10fdf48635 Repair package-tests failure
* test/lisp/emacs-lisp/package-tests.el (package-test-install-single):
"already installed" is now an error; adapt test.
2025-12-22 12:11:37 +01:00
Jacob S. Gordon
cff022f0c3 Add binary format specifications '%b' and '%B'
These produce the binary representation of a number.
'%#b' and '%#B' prefix with '0b' and '0B', respectively.
(bug#79990)
* etc/NEWS: Announce change.
* doc/lispref/strings.texi (Formatting Strings): Describe new format
specs and add to comment on reconstructing the value with 'read'.
* src/editfns.c (format): Update doc string.
(styled_format): Add support for '%b' and '%B'.  To remain
portable, avoid use of 'sprintf' by converting by hand.
* test/src/editfns-tests.el (format-binary-zero, format-binary-floats)
(format-binary-nonzero-integers): Add tests.
(read-large-integer): Add binary test cases.
Co-authored-by: Paul Eggert <eggert@cs.ucla.edu>
2025-12-22 00:15:09 -08:00
Eli Zaretskii
33fab945d3 Fix VIQR decoding and encoding
* lisp/language/viet-util.el (viqr-regexp): Include escaped
punctuation characters, to handle escaped punctuation correctly.
(viqr-punctuation-regexp): New defconst.
(viet-encode-viqr-region): Backslash-escape punctuation characters
matching 'viqr-punctuation-regexp' before encoding Vietnamese
characters with diacritics.  (Bug#80039)

* test/lisp/language/viet-util-tests.el (viet-util-test-viqr): New
file with tests for VIQR encoding and decoding.
2025-12-21 12:52:17 +02:00
Eli Zaretskii
28a3e3d983 ; Fix a typo in a project.el test (bug#79809)
* test/lisp/progmodes/project-tests.el
(project-vc-supports-project-in-different-dir): Fix typo in version.
2025-12-21 07:37:41 +02:00
Dmitry Gutov
66069812be project-vc-supports-project-in-different-dir: Tune the expectation for 'find'
* test/lisp/progmodes/project-tests.el
(project-vc-supports-project-in-different-dir):
Account for difference in behavior when failing over to 'find'
(comments in bug#79809).
2025-12-21 04:05:06 +02:00
Jens Schmidt
0aabe62b64 Improve handling of non-ASCII characters in 'transpose-regions'
* src/editfns.c (Ftranspose_regions): Separate code related to character
semantics from that related to byte semantics and in that way leverage
optimizations for regions of equal length with respect to both
semantics.  Move and update comments dating back to the initial
implementation.
* test/src/editfns-tests.el (editfns-tests--transpose-regions-tests)
(editfns-tests--transpose-regions-markups)
(editfns-tests--transpose-regions): New test and accompanying variables.
2025-12-20 13:23:29 -05:00
Elías Gabriel Pérez
e93a9a9057 hideshow: Support nested comment block in 'hs-hide-level-recursive'
bug#80009

* doc/emacs/programs.texi (Hideshow): Update documentation.
* lisp/progmodes/hideshow.el (hs-hide-level-recursive): Rework.
(hs-get-first-block-on-line): Minor changes.
(hs--add-indicators, hs-hide-comments-when-hiding-all)
(hs-minor-mode-menu, hs-hide-level, hs-cycle): Update code.
* test/lisp/progmodes/hideshow-tests.el
(hideshow-hide-levels-with-comments-1): New test.
2025-12-20 20:09:41 +02:00
Stéphane Marks
c989d096f1 Add vtable buffer slot (bug#79982)
This solves for background vtable mutations, i.e., updates
initiated from buffers other than the vtable buffer, and for
buffer-adjusted string-pixel-width computations.

* lisp/emacs-lisp/vtable.el (vtable): New '-buffer' slot.
(vtable-buffer, vtable-set-buffer): New function.
(vtable-update-object, vtable-remove-object)
(vtable-insert-object): Wrap operation with the vtable buffer.
(vtable--insert): Split from old 'vtable-insert'.
(vtable-insert): Insert table and record the buffer.
(vtable--insert-line, vtable--insert-header-line): Use
'vtable-buffer' for pixel-width computation.
(vtable--limit-string, vtable--char-width): Pass buffer to
'string-pixel-width'.
(vtable-revert): New optional table argument.
(vtable--alter-column-width, vtable-revert-command)
(vtable-sort-by-current-column): Call 'vtable-revert' with the
table.

* test/lisp/emacs-lisp/vtable-tests.el
(vtable-tests--make-no-header-2-object-table): New helper
function.
(test-vstable-compute-columns): Correct typo in test name.  Use
new helper function.
(test-vtable-unique-buffer)
(test-vtable-non-current-buffer-insert-object)
(test-vtable-non-current-buffer-remove-object)
(test-vtable-non-current-buffer-update-object)
(test-vtable--limit-string-with-face-remapped-buffer): New test.
2025-12-20 18:23:25 +02:00
F. Jason Park
22719d64e9 ; Tweak failing autojoin display-context test for ERC
* test/lisp/erc/erc-scenarios-join-display-context.el
(erc-scenarios-join-display-context--errors): Attempt to indirectly fix
a reoccurring failure on EMBA.  Instead of asserting the membership of
`erc-join--requested-channels', have the client attempt to manually join
an autojoined channel previously denied by an error response.  But this
time assert that the display context for the now successfully joined
channel doesn't indicate it originated from the autojoin module.
* test/lisp/erc/resources/base/gapless-connect/barnet.eld: Increase
timeout.
* test/lisp/erc/resources/join/buffer-display/mode-context.eld: Update
accordingly.
2025-12-17 17:36:42 -08:00
Michael Albinus
57f66bfa6c ; Fix last change in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Adapt tests.
2025-12-17 07:36:49 +01:00
Michael Albinus
645a6ba081 Document and test process filters in tramp-smb.el
* doc/misc/tramp.texi (Remote processes): Provide more details in
"Running remote processes on MS Windows hosts".

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Adapt tests.
2025-12-16 18:33:56 +01:00
Przemysław Kryger
62ce890c9f Mark less important package-vc-tests as expensive
* test/lisp/emacs-lisp/package-vc-tests.el
(package-vc-test-deftest): Add support for `:tags' keyword.
(upgrade, upgrade-all, upgrade-all-after-require, rebuild)
(prepare-patch, log-incoming, pkg-spec-info-manual): Mark as
`:expensive-test'.
2025-12-16 17:38:53 +01:00
Przemysław Kryger
60c8f3e8ad Fix package-vc-tests failing when no install-info is available
* test/lisp/emacs-lisp/package-vc-tests.el
(pkg-spec-make-shell-command): Rename from
`pkg-spec-doc-make-shell-command'.  Remove assertions related to
info manual installation.
(pkg-spec-info-manual): Add tests for info manual installation.
2025-12-16 17:38:23 +01:00
Michael Albinus
1b31023dab Finish process error buffer support in tramp-smb.el
* doc/misc/tramp.texi (Remote processes): Provide more details in
"Running remote processes on MS Windows hosts".

* lisp/net/tramp-smb.el (tramp-smb-handle-make-process):
Suppress lock files.

* test/lisp/net/tramp-tests.el (auto-revert-notify-watch-descriptor)
(auto-revert-remote-files, auto-revert-use-notify): Declare.  Set
proper values.
(tramp-test30-make-process): Adapt test.
2025-12-15 15:20:29 +01:00
Michael Albinus
dbdae1b9a2 Implement process error buffer in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-make-process):
Handle error buffer.

* test/lisp/net/tramp-tests.el (tramp-test30-make-process): Adapt test.
2025-12-14 16:55:38 +01:00
Dmitry Gutov
48a4444977 Relax the condition on the values of DIRS in project-files
* lisp/progmodes/project.el (project-files):
Use 'file-in-directory-p' to dispatch to 'project--vc-list-files'
when listing subdirectory files too (bug#79809).
2025-12-14 02:26:36 +02:00
Michael Albinus
7089c1fd69 Implement process STDERR file in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-handle-make-process)
(tramp-smb-handle-process-file): Handle STDERR file.
(tramp-smb-call-winexe): Regroup sent commands.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file)
(tramp-test30-make-process): Adapt tests.
2025-12-13 17:58:03 +01:00
Mattias Engdegård
251c070dfd Warn about uses of the 'any' atom in rx
'any' is a holdover from the ancient 'sregex' package where it meant
'not-newline', but is easily mistaken for 'anychar'.

* lisp/emacs-lisp/rx.el (rx--translate-symbol): Warn about 'any'.
* test/lisp/emacs-lisp/rx-tests.el (rx-atoms): Suppress warning here.
* etc/NEWS: Explain.
2025-12-12 13:55:29 +01:00
Mattias Engdegård
8a58ce0abd Don't use rx 'any' to mean 'not-newline'
* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1):
* lisp/pcmpl-rpm.el (pcomplete/dnf):
* test/lisp/emacs-lisp/package-vc-tests.el (log-incoming):
Use 'anychar' instead of 'any', since that's probably what was meant.
2025-12-12 13:03:45 +01:00
Elías Gabriel Pérez
ef73f5c254 ; * lisp/progmodes/hideshow.el (hs-cycle): Fix regression. (Bug#79983)
* test/lisp/progmodes/hideshow-tests.el
(hideshow-cycle-with-delimiters)
(hideshow-cycle-without-delimiters)
(hideshow-check-unbalanced-parens): Add new tests.
2025-12-12 09:23:53 +02:00
Philip Kaludercic
665792f697
Handle remaining usages of 'package-vc-install-from-checkout'
* doc/emacs/package.texi (Fetching Package Sources): Remove
mention of `package-vc-install-from-checkout'.
* doc/misc/use-package.texi (Install package): Remove mention of
:vc in combination with :load-path.
* lisp/use-package/use-package-core.el (use-package-vc-install):
Suppress compile-time warning and generate warning during
evaluation instead.
* test/lisp/emacs-lisp/package-vc-tests.el
(package-vc-tests-checkout-from-elpa-install-from-checkout)
(package-vc-tests-checkout-with-git-install-from-checkout):
Suppress obsoletion warning.
2025-12-11 08:32:27 +01:00
Stephen Gildea
b969905a47 ; time-stamp: Prefer 'string-match-p' over 'string-match'
* lisp/time-stamp.el (time-stamp, time-stamp--system-name):
Use 'string-match-p' instead of 'string-match'.
(time-stamp--count-newlines): New function to implement the algorithm.
(time-stamp--system-name-1): New function, a testing seam.
* test/lisp/time-stamp-tests.el (with-time-stamp-system-name):  Use the
new testing seam to expand test coverage.
2025-12-10 13:00:31 -08:00
Przemysław Kryger
244dc6f15e Update email and rename packages and buffers in package-vc-tests
* test/lisp/emacs-lisp/package-vc-tests.el
(package-vc-tests-packages): Rename test packages to avoid
suffix being treated as a version number by
`package--description-file'.
(package-vc-tests-add): Ensure suffix capitalisation remains as
original when calling `replace-regexp-in-string'.
(package-vc-tests-create-repository): Fix typo in temporary
email and use a reserved TLD.
(package-vc-tests-environment-tear-down): Rename preserved
buffers to avoid conflicts between tests.
2025-12-09 16:10:20 +01:00