1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-02 10:11:05 -08:00
Commit graph

8457 commits

Author SHA1 Message Date
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
Przemysław Kryger
5731343ffe Update email in vc-tests and vc-git-tests
* test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo): Use
example.com, domain following RFC 2606.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--with-author-identity): Use example.com, domain
following RFC 2606.
2025-12-09 16:09:18 +01:00
Przemysław Kryger
777622682f Fix package-vc-tests
* lisp/emacs-lisp/package-vc.el (package-vc--make): Use same
format for buffer as `package-vc--build-documentation'.
* test/lisp/emacs-lisp/package-vc-tests.el
(message-auto-save-directory): Silence byte compiler.
(package-vc-with-tests-environment): Initialize package archives
after setting a temporary `package-user-dir'.  Set up
`package-gnupghome-dir'.  Remove `default-directory' binding.
(package-vc-tests-environment-tear-down): Fix argument order in
`package-vc-tests-log-buffer-name' call.
(package-vc-tests-with-installed): Rename from
`package-vc-with-installed-tests'.
(package-vc-test-deftest): Use
`package-vc-tests-with-installed'.
(prepare-patch): Bind `message-auto-save-directory' to
`package-vc-tests-dir'.
* test/lisp/package-vc-tests.el: Rename to
test/lisp/emacs-lisp/package-vc-tests.el
* test/lisp/package-vc-resources/Makefile.in: Rename to
test/lisp/emacs-lisp/package-vc-resources/Makefile.in
* test/lisp/package-vc-resources/test-package-SUFFIX-inc.texi.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-inc.texi.in
* test/lisp/package-vc-resources/test-package-SUFFIX-lib-v0.1.el.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-lib-v0.1.el.in
* test/lisp/package-vc-resources/test-package-SUFFIX-lib-v0.2.el.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-lib-v0.2.el.in
* test/lisp/package-vc-resources/test-package-SUFFIX-v0.1.el.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-v0.1.el.in
* test/lisp/package-vc-resources/test-package-SUFFIX-v0.2.el.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX-v0.2.el.in
* test/lisp/package-vc-resources/test-package-SUFFIX.texi.in:
Rename to
test/lisp/emacs-lisp/package-vc-resources/test-package-SUFFIX.texi.in
2025-12-08 18:48:09 +01:00
Elías Gabriel Pérez
a582f2bb57 hideshow: Deep cleaning. (Bug#79934)
This is just a refactoring change, simplifying most of the code
and commentaries and removing/deprecating redundant code.

* etc/NEWS: Announce changes.
* lisp/progmodes/hideshow.el (hs-hide-hook, hs-show-hook): Use
'defcustom' instead of 'defvar'.
(hs-block-end-regexp, hs-forward-sexp-function)
(hs-adjust-block-beginning-function)
(hs-adjust-block-end-function, hs-find-block-beginning-function)
(hs-find-next-block-function)
(hs-looking-at-block-start-predicate)
(hs-inside-comment-predicate): Update docstring.
(hs-discard-overlays): Simplify.
(hs-life-goes-on): Update docstring.
(hs-hideable-region-p): Revert previous changes.
(hs-overlay-at): Simplify.
(hs-make-overlay): Fix performance.
(hs-block-positions): Rework.
(hs--add-indicators): Fix performance.
(hs-isearch-show-temporary): Simplify.
(hs-looking-at-block-start-p): Rename ...
(hs-looking-at-block-start-p--default): ... to this.
(hs-forward-sexp, hs-hide-comment-region): Mark as obsolete.
(hs-hide-block-at-point): Rework.
(hs-get-first-block): Rename ...
(hs-get-first-block-on-line): ... to this.
(hs-inside-comment-p--default): Rework.
(hs-find-block-beginning): Rename ...
(hs-find-block-beg-fn--default): ... to this.
(hs-find-next-block): Rename ...
(hs-find-next-block-fn--default): ... to this.
(hs-hide-level-recursive): Rework.
(hs-find-block-beginning-match): Remove function.
(hs-already-hidden-p): Simplify.
(hs-c-like-adjust-block-beginning): Mark as obsolete.
(hs-hide-all, hs-show-all, hs-hide-block, hs-show-block)
(hs-hide-level, hs-hide-initial-comment-block, hs-cycle):
Simplify.
* test/lisp/progmodes/hideshow-tests.el (hideshow-hide-level-1)
(hideshow-hide-level-2):
* test/lisp/progmodes/python-tests.el
(python-hideshow-hide-levels-3, python-hideshow-hide-levels-4):
* test/lisp/progmodes/hideshow-tests.el (hideshow-hide-level-1)
(hideshow-hide-level-2):
* test/lisp/progmodes/python-tests.el
(python-hideshow-hide-levels-3, python-hideshow-hide-levels-4):
Update tests.
2025-12-08 09:20:29 +02:00
Przemysław Kryger
3b0dcb0b1b
Add tests for package-vc
* test/lisp/package-vc-tests.el
(package-vc-tests-preserve-artefacts): When non nil then
preserve temporary test files and buffers.
(package-vc-tests-dir, package-vc-tests-packages)
(package-vc-tests-repository): Silence byte compiler.
(package-vc-tests-packages): Define packages to test.
(package-vc-tests-add): Copy a an in file template, update
SUFFIX in it and add it to index.
(package-vc-tests-create-repository): Create a package git
repository with a test package's source.
(package-vc-tests-package-desc): Retrieve a `package-desc' for
tested package.
(package-vc-tests-package-spec): Retrieve a pkg-spec for tested
package.
(package-vc-tests-package-lisp-dir): Determine a lisp directory
for a package.
(package-vc-tests-package-main-file): Calculate expected
location of package's main file.
(package-vc-tests-load-history-marker): Create a load history
marker.
(package-vc-tests-load-history-pattern): Create a regexp pattern
to search in `load-history'.
(package-vc-tests-load-history-position): Calculate a position
in `load-history'.
(package-vc-tests-load-history-interesting-entries): Return
`load-history' entries related to the current
`package-vc-tests-dir'.
(package-vc-tests-explain-load-history-position): Return ERT
explanation for load history position failures.
(package-vc-tests-log-buffer-name): Return name of a log buffer
used to build package or its documentation.
(package-vc-tests-log-buffer-exists): Return non-nil when a log
buffer used to build package or its documentation exists.
(package-vc-tests-explain-log-buffer): Print contents of log
buffer used to build package or its documentation and return ERT
explanation for the failure.
(package-vc-tests-elc-files): Check that there are elc files and
that there is no compiled autoloads file amongst them.
(package-vc-tests-assert-delete-elc): Assert that .elc files are
present for a package.
(package-vc-tests-assert-package-alist): Assert that
`package-alist' contains a `package-desc' for package, and that
the `package-desc' has correct slot `version' and slot
`dir'.:(package-vc-tests-reset-head^): Reset head of checkout of
tested packages to HEAD^.
(package-vc-tests-packages-head): Return current checkout
revision.
(package-vc-tests-make-spec): Make a new test spec for a test
package.
(with-package-vc-tests-environment): Setup test environment.
(package-vc-tests-environment-tear-down): Tear down test
environment.
(with-package-vc-tests-installed): Withing a test environment,
install package, evaluate test body, and then tear down the test
environment.
(package-vc-tests-install-from-elpa)
(package-vc-tests-install-from-spec): Install a test package.
(package-vc-tests-checkout-from-elpa-install-from-checkout)
(package-vc-tests-checkout-with-git-install-from-checkout):
Checkout and install a test package.
(package-vc-tests-package-vc-async-wait): Wait for an
asynchronous VC command to finish.
(package-vc-tests-deftest): Define series tests for each package
in `package-vc-tests-under-test'.
(install-post-conditions): Tests that after installing a test
package the `load-history' entries, package's main file, commit,
elc files, and `package-alist' entry are correct.
(require): Test that after calling `require' the `load-history'
entries are correct.
(upgrade, upgrade-all): Test that after calling
`package-vc-upgrade'/`package-vc-upgrade-all' the `load-history'
entries, package's elc files, commit, and `package-alist' entry
are correct.
(upgrade-after-require, upgrade-all-after-require): Test that
after calling `require' followed by
`package-vc-upgrade'/`package-vc-upgrade-all' the `load-history'
entries, commit, package's elc files, and `package-alist' entry
are correct.
(rebuild): Test that after calling `package-vc-rebuild' on an
old version of a package, the package's old function, old macro,
elc files, and `package-alist' entry are correct.
(rebuild-after-require): Test that after calling `require'
followed by `package-vc-rebuild' on an old version of a package,
the package's old function, old macro, elc files, and
`package-alist' entry are correct.
(prepare-patch): Test that after calling
`package-vc-prepare-patch' the message buffer is correct.
(log-incoming): Test that after calling
`package-vc-log-incoming' the log buffer is correct.
(pkg-spec-doc-make-shell-command): Test that :doc, :make, and
:shell-command slots in a pkg spec execute.
* test/lisp/package-vc-resources/test-package-SUFFIX-v0.1.el.in:
* test/lisp/package-vc-resources/test-package-SUFFIX-lib-v0.1.el.in:
Code template of version 0.1 of a test package.
* test/lisp/package-vc-resources/test-package-SUFFIX-v0.2.el.in:
* test/lisp/package-vc-resources/test-package-SUFFIX-lib-v0.2.el.in:
Code template of code of version 0.2 of a test package.
* test/lisp/package-vc-resources/test-package-SUFFIX-inc.texi.in:
* test/lisp/package-vc-resources/test-package-SUFFIX.texi.in:
Documentation template of a test package.
* test/lisp/package-vc-resources/Makefile.in: Makefile template of
a test package.

Co-developed-by: Philip Kaludercic <philipk@posteo.net>

(Bug#79188)
2025-12-07 22:27:13 +01:00
Jens Schmidt
8a0217ebbc
Use a consistent package description
Ensure that the long description of a package is the same regardless of
originating package archive and package installation state.

* lisp/emacs-lisp/package.el: Add documentation on additional files that
Emacs creates during package installation.
(package-desc): Update incomplete description of slot `kind'.
(package-install-from-archive): Download '*-readme.txt' from the archive
and save it as 'README-elpa' to avoid the issues described in bug#79411.
* test/lisp/emacs-lisp/package-resources/multi-file-readme.txt:
* test/lisp/emacs-lisp/package-resources/simple-single-readme.txt:
Update readmes to mark them as "server readmes" and distinguish them
from what the packages themselves provide in their documentation.
* test/lisp/emacs-lisp/package-tests.el (package-test-install-singlefile)
(package-test-describe-installed-with-ws-only-readme): Add tests.
(package-test-install-multifile): Test more files for presence.
(package-test-describe-package)
(package-test-describe-installed-multi-file-package)
(package-test-describe-non-installed-package)
(package-test-describe-non-installed-multi-file-package): Test for
server readme being used as long description. (Bug#79411)
2025-12-07 22:24:09 +01:00
Jens Schmidt
3a2a3a618e
; Fix a test-relevant typo
* test/lisp/emacs-lisp/package-tests.el (package-test-install-file): Fix
a test-relevant typo.  (Bug#79411)
2025-12-07 22:24:09 +01:00
Jens Schmidt
b71e8f6e86
Brush up macro with-package-test and related tests
* test/lisp/emacs-lisp/package-tests.el (with-package-test): Remove
unused keyword :update-news and its implementation.  Add documentation
for remaining keywords, since in particular :basedir was being overused.
Eliminate code redundancy by reimplementing keyword :upload-base in
terms of equivalent macro `ert-with-temp-directory' macro.  Implement
other minor improvements.
(package-test-install-file, package-test-bug58367, package-test-bug65475)
(package-test-install-file-EOLs, package-test-install-multifile): Remove
superfluous :basedir keyword from `with-package-test' calls to not give
future developers bad example.
(package-test-install-multifile): Move file tests out of
`with-temp-buffer', as they are independent of current buffer.  (Bug#79411)
2025-12-07 22:24:09 +01:00
Sean Whitton
459ecb3d26 ; vc-test-exec-after-3: Delete unused FAILS local value. 2025-12-07 15:04:34 +00:00
Sean Whitton
0391b3f94e Check for successful exit when parsing output with vc-exec-after
When using vc-exec-after to parse program output, check that the
program didn't die to a signal or exit with an error exit code
before attempting the parse.  Continue to use plain
vc-run-delayed where we aren't parsing output, because in these
cases it doesn't matter to CODE if the output is incomplete.

* lisp/vc/vc-dispatcher.el (vc-exec-after): <process-status>:
Treat PROC dying to a signal the same as PROC exiting non-zero.

(vc-exec-after): <accept-process-output>: Restore making a
nonblocking call, for the case of vc-exec-after called from a
process sentinel.  diff-hl *does* require this.

(vc-exec-after): <OKSTATUS>: New parameter, replacing SUCCESS,
which never worked as documented.
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-test-exec-after-3):
Test it.

(vc-run-delayed-success): New macro.
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage):
* lisp/vc/vc-hg.el (vc-hg-dir-status-files):
* lisp/vc/vc.el (vc-pull-and-push): Use it.

* lisp/obsolete/vc-arch.el (vc-exec-after):
* lisp/obsolete/vc-mtn.el (vc-exec-after):
* lisp/vc/vc-bzr.el (vc-exec-after):
* lisp/vc/vc-cvs.el (vc-exec-after):
* lisp/vc/vc-git.el (vc-exec-after):
* lisp/vc/vc-hg.el (vc-exec-after):
* lisp/vc/vc-svn.el (vc-exec-after): Update declarations.
2025-12-07 15:00:13 +00:00
Michael Albinus
b1882857ee Rework remote process support for Tramp's "smb" method
* doc/misc/tramp.texi (Remote processes): Rewrite subsection
"Running remote processes on MS Windows hosts".

* etc/NEWS: Mention remote process support for Tramp's "smb" method.
Presentational fixes and improvements.

* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Use `tramp-smb-handle-make-process', `tramp-smb-handle-shell-command'
and `tramp-handle-start-file-process'.
(tramp-smb-matching-line): New defvar.
(tramp-smb-handle-make-process, tramp-smb-handle-shell-command)
(tramp-smb-shell-prompt): New defuns.
(tramp-smb-handle-process-file): Rewrite.
(tramp-smb-handle-start-file-process): Remove.
(tramp-smb-get-localname, tramp-smb-shell-quote-localname):
New optional argument SHARE.
(tramp-smb-send-command): Remove echoed command string.
(tramp-smb-maybe-open-connection): Initialize variables.
(tramp-smb-wait-for-output): Wait more robust.
(tramp-smb-call-winexe): Check for share.  Goto current directory.
(tramp-smb-connection-local-powershell-variables): New defconst.
Set it as connection local variables.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file)
(tramp-test29-start-file-process, tramp-test30-make-process)
(tramp-test32-shell-command, tramp--test-async-shell-command)
(tramp--test-supports-processes-p): Adapt for "smb" method.
(tramp-test34-explicit-shell-file-name)
(tramp-test45-asynchronous-requests): Skip for "smb" method.
(tramp--test-check-files): Skip shell test for some special
characters in the "smb" case.
(tramp-test52-unload): Disable further tests.
2025-12-06 13:26:52 +01:00
Roi Martin
598a3604d4 Simplify fill-tests.el and add tests
Simplify fill-tests.el by grouping similar tests in the same
erts file.  Move the test code into the erts files, so it is
closer to the test cases, which provides context.  Add basic
test cases for common filling operations and for the scenarios
described in Bug#79575.

* test/lisp/textmodes/fill-tests.el (fill-test-end-period)
(fill-test-haskell): Rename from `test-fill-end-period' and
`test-fill-haskell' to follow the same naming convention of
the other tests.
(fill-test-fill-region-as-paragraph-default)
(fill-test-fill-region-as-paragraph-semlf)
(fill-test-fill-region-as-paragraph, fill-test-fill-region)
(fill-test-fill-paragraph, fill-test-fill-paragraph-semlf):
Group tests and move test code into erts files.
(fill-test-fill-paragraph-semlf-emacs-lisp-mode)
(fill-test-fill-paragraph-semlf-c-mode)
(fill-test-fill-paragraph-semlf-org-mode)
(fill-test-fill-paragraph-semlf-markdown-mode): Rename from
`fill-test-semlf-emacs-lisp-mode', `fill-test-semlf-c-mode',
`fill-test-semlf-org-mode' and
`fill-test-semlf-markdown-mode'.  Move test code into erts
files.
(fill-test-semlf, fill-test-semlf-fill-region)
(fill-test-semlf-justify)
(fill-test-semlf-sentence-end-double-space)
(fill-test-semlf-fill-column)
(fill-test-semlf-punctuation-marks, fill-test-semlf-twice)
(fill-test-semlf-fill-prefix, fill-test-semlf-indented-block)
(fill-test-semlf-revert): Delete tests since they are now
grouped with other tests.

* test/lisp/textmodes/fill-resources/fill-paragraph.erts:
* test/lisp/textmodes/fill-resources/fill-paragraph-semlf.erts:
* test/lisp/textmodes/fill-resources/fill-region-as-paragraph.erts:
* test/lisp/textmodes/fill-resources/fill-region-as-paragraph-default.erts:
* test/lisp/textmodes/fill-resources/fill-region-as-paragraph-semlf.erts:
Add test cases for the function specified in the file name,
including tests for the scenarios described in the bug report.
* test/lisp/textmodes/fill-resources/fill-region.erts: Add
test case for custom `fill-region-as-paragraph-function',
include test code in the test specification.
* test/lisp/textmodes/fill-resources/fill-paragraph-semlf-c-mode.erts:
* test/lisp/textmodes/fill-resources/
fill-paragraph-semlf-emacs-lisp-mode.erts:
* test/lisp/textmodes/fill-resources/fill-paragraph-semlf-markdown-mode.erts:
* test/lisp/textmodes/fill-resources/fill-paragraph-semlf-org-mode.erts:
Rename from semlf-*-mode.erts, prefix test names with the
tested function and include test code in the test
specification.
* test/lisp/textmodes/fill-resources/semlf-fill-column.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-prefix.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-region.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-region-as-paragraph.erts:
* test/lisp/textmodes/fill-resources/semlf-indented-block.erts:
* test/lisp/textmodes/fill-resources/semlf-justify.erts:
* test/lisp/textmodes/fill-resources/semlf-punctuation-marks.erts:
* test/lisp/textmodes/fill-resources/semlf-revert.erts:
* test/lisp/textmodes/fill-resources/semlf-sentence-end-double-space.erts:
* test/lisp/textmodes/fill-resources/semlf-twice.erts:
* test/lisp/textmodes/fill-resources/semlf.erts: Delete
files.  (Bug#79575)
2025-12-06 14:04:32 +02:00
Mattias Engdegård
5e7a71d0f4 Don't emit print-circle refs for empty string and vector
The empty vector and string(s) are immutable, contain no references and
always read as the same objects.

* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Turn macro into...
(print_circle_candidate_p): ...a function, and exclude [] and "".
* test/src/print-tests.el (print-circle): Add test case.
2025-12-04 17:52:14 +01:00
Stephen Gildea
7f04e046fb ; time-stamp: factor out two small, internal utilities
* lisp/time-stamp.el (time-stamp--message, time-stamp--system-name):
New utility functions.
(time-stamp, time-stamp-once, time-stamp-string-preprocess):
Call the new functions.
2025-12-03 23:44:45 -08:00
Stephen Gildea
77a57041d0 time-stamp: Add test of multi-line start regexp
* test/lisp/time-stamp-tests.el: (time-stamp-custom-start-multiline):
New test, inspired by Amin Bandali.
2025-11-30 12:36:12 -08:00
Mattias Engdegård
ef903e0f5a * test/src/data-tests.el (data-tests-ash-lsh): Test for bug#79876. 2025-11-29 19:41:16 +01:00
Stephen Gildea
9f2b1c43c9 time-stamp: return quicker when inactive
* lisp/time-stamp.el (time-stamp-once): Do not look for additional
templates once we have displayed the warning about being disabled.
Move earlier the check for arguments being the correct type.
* test/lisp/time-stamp-tests.el (time-stamp-custom-messages): New test.
2025-11-29 09:14:58 -08:00