1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
Commit Graph

7768 Commits

Author SHA1 Message Date
Po Lu
df1630ad3b Merge from savannah/emacs-30
f4c0459ed3 Fix Tramp parser
47c79b62dd Checkdoc fixes in progmodes
6757f8e67d Checkdoc fixes in Org Mode
9fcee3c1d1 Clarify `checkdoc-max-keyref-before-warn` docstring
b249f022f1 * lisp/files.el (insert-directory): Quote switches in wil...
8911d53ce5 Fix uses of 'dired-omit-mode' (bug#71905)
2024-07-08 15:43:55 +08:00
Michael Albinus
f4c0459ed3 Fix Tramp parser
* lisp/net/tramp.el (tramp-host-with-port-regexp): Declare.
(tramp-set-syntax): Set also `tramp-host-with-port-regexp'.
(tramp-build-host-with-port-regexp): New defun.
(tramp-host-with-port-regexp): Make it a defvar.  (Bug#71972)

* test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax)
(tramp-test01-file-name-syntax-simplified)
(tramp-test01-file-name-syntax-separate): Adapt tests.
2024-07-07 19:34:37 +02:00
Po Lu
14d2e89af1 Merge from savannah/emacs-30
99e510977b Correct JNI string error checking and miscellaneous corre...
bbe95a8cea Correctly highlight SYMTAB in `awk-mode`
9625e4af99 Fix formatting of tables with thead/tfoot but no tbody
2024-07-07 10:23:08 +08:00
JD Smith
9625e4af99 Fix formatting of tables with thead/tfoot but no tbody
Correctly handle formatting of tables containing thead and/or tfoot, but
without any tbody, to prevent including thead/tfoot content twice within
the table's derived body.
* lisp/net/shr.el (shr--fix-tbody): Omit 'thead' and 'tfoot' from
implicit body.  (Bug#71685)
* test/lisp/net/shr-resources/table.html:
* test/lisp/net/shr-resources/table.txt: New tests for table rendering.
2024-07-06 21:10:39 +02:00
Stefan Kangas
c302c5fab0 Add new function lm-package-needs-footer-line
* lisp/emacs-lisp/lisp-mnt.el (lm-package-needs-footer-line):
Factor out new function...
* lisp/emacs-lisp/package.el (package-buffer-info): ...from here.
* lisp/emacs-lisp/lisp-mnt.el (lm-verify): Use above new function.
* test/lisp/emacs-lisp/lisp-mnt-tests.el
(lm-tests--lm-package-needs-footer-line/empty-dependencies)
(lm-tests--lm-package-needs-footer-line/old-version)
(lm-tests--lm-package-needs-footer-line/new-version):
New tests.
2024-07-06 18:57:37 +02:00
Thierry Volpiatto
7f631a3e2a Allow using multiple buffers in 'eshell-command'
Provide the same functionality as 'async-shell-command-buffer' but for
'eshell-command'.

Co-Authored-By: Jim Porter <jporterbugs@gmail.com>

* lisp/eshell/eshell.el (eshell-command-async-buffer): New option...
(eshell-command): ... use it.

* lisp/eshell/esh-proc.el (eshell-sentinel): Check for buffer liveness
in 'finish-io'.

* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/output-buffer/async-kill): New test.

* etc/NEWS: Announce this change (bug#71554).
2024-07-05 19:40:29 -07:00
Stefan Monnier
bd86a6c4fd perl-mode.el: Improve indent after hanging open-paren
Make the indentation of the code right after an open paren/brace
use the same rule as already used to indent the corresponding
matching paren/brace.

* lisp/progmodes/perl-mode.el (perl-calculate-indent):
Use `perl-indent-new-calculate`s "virtual" indentation instead of
approximating it with `current-indentation`.
2024-07-05 10:02:39 -04:00
Po Lu
507a13f5a1 Merge from savannah/emacs-30
334d513220 (edebug--called-interactively-skip): Fix bug#71934
6e8b9ccaec ; * lisp/ibuffer.el (ibuffer-mode): Doc fix.
3eaf1abbff Fix MS-Windows build with native-compilation
fc375359ed Tag dbus-test05-register-signal-with-nils as unstable
99230d7080 ; * src/w32fns.c (funhook): Restore mistakenly lost line.
81a7358a33 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
b085d68396 Fix treesit test (bug#71907)
f39cf0beb7 Focus more on MS-Windows than MS-DOS in FAQ
d64396b8e4 Autoload some string functions
bd482b745a Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
b534183135 * etc/NEWS: Fix typos.
850fc68481 ; (grep-read-files): Fix completion table
2853259935 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
921d40759e Remove a reference to a non-existant variable from a doc-...
5d2a115ab0 ; * src/fns.c (value_cmp): ASCIIfy.
2024-07-05 10:05:23 +08:00
Stefan Kangas
0e591a9112 Remove redundant requires
* lisp/gnus/canlock.el (sha1):
* lisp/international/utf7.el (base64):
* lisp/net/hmac-md5.el (md5):
* lisp/org/ob-processing.el (sha1):
* lisp/org/org-feed.el (sha1):
* test/lisp/net/rfc2104-tests.el (sha1, md5): Don't require features
that are built-in, and always provided.
2024-07-04 23:55:16 +02:00
Jim Porter
6d082f3c79 In SHR, keep track of image sizes as specified by the HTML
Previously, these values got lost when zooming the image.

* lisp/net/shr.el (shr-tag-img): Set 'image-dom-size'...
(shr-zoom-image): ... use it.  Rename 'size' to 'zoom'.
(shr-image-fetched): Rename 'image-size' to 'image-zoom'.
(shr-put-image): Accept the zoom level as ':zoom' and document it.
Previously, FLAGS was a mix of alist and plist(!).

* test/lisp/net/shr-tests.el (shr-test/zoom-image): Rename "size" to
"zoom".
2024-07-04 12:14:37 -07:00
Jim Porter
3ce7e4ee3f Slice images based on their height in SHR, not their zoom level
* lisp/net/shr.el (shr-sliced-image-height): New option...
(shr-put-image): ... use it.  Compute the number of slices in relation
to the image height; this way, each slice is roughly the height of a
line of ordinary text.

* test/lisp/net/shr-tests.el (shr-test/zoom-image): Update test, since
zooming no longer necessarily triggers slicing.

* doc/misc/eww.texi (Advanced): Document 'shr-sliced-image-proportion'.

* etc/NEWS: Announce this change.
2024-07-04 12:14:37 -07:00
Mattias Engdegård
0b061ab2ed ; Strengthen value< tests slightly
* test/src/fns-tests.el (fns-value<-ordered, fns-value<-unordered):
Check equality and/or unordered results using lexicographic constructs.
2024-07-04 16:01:55 +02:00
Mattias Engdegård
f9f4f054bc Compare fixnums and floats accurately in value<
Make `value<` compare fixnums and floats by value, as `<` does, instead
of coercing the fixnum to a float first which is what C would do.
This matters when the fixnum cannot be represented as a float. For
example, C would evaluate

  72057594037927935 < 72057594037927936.0

to false since the operands are converted to the same floating-point
number.

* src/fns.c (fixnum_float_cmp): New.
(value_cmp): Use it.
* test/src/fns-tests.el (fns-value<-ordered, fns-value<-unordered):
New test cases.
2024-07-04 15:32:45 +02:00
Andrea Corallo
fc375359ed Tag dbus-test05-register-signal-with-nils as unstable
* test/lisp/net/dbus-tests.el (dbus-test05-register-signal-with-nils):
Tag it as unstable.
2024-07-03 20:13:13 +02:00
Yuan Fu
b085d68396
Fix treesit test (bug#71907)
* test/src/treesit-tests.el (treesit-node-check): Re-parse buffer before
checking for node outdated-ness.
2024-07-03 00:31:16 -07:00
Po Lu
7c8d4e96ba Merge from savannah/emacs-30
64851d101a Improve Android "adaptive icon"
9b294059d7 Fix documentation for Emacs 30
f50167ab95 ; Update NEWS and corresponding manuals
4e22ef870c Add D-Bus test
f784d946d4 ; Repair corruption in etc/DEBUG
c750fbb539 ; * etc/DEBUG: Advice for debugging Emacs on OpenBSD (bug...
38179f85f8 Merge remote-tracking branch 'savannah/scratch/windows-98...
72cf9964f3 Inaccuracy in efaq.texi
fc48e9e8ed ; Fix typos in DOS Makefile scripts
9b8d754579 ; * etc/NEWS: Explain Nextstep.
8819e5a45d Fix treesit crash (bug#71681)
eaf2dc96c1 ; Fix SHR test on MS-Windows
57880f597c Delete redundant mention of `with-eval-after-load'
ea8ce98434 * doc/misc/efaq.texi (New in Emacs 30): Fix typos.
45a20d781a ; Fix typos in symbols
d95f039af4 Document security fixes in FAQ
d063af203c Add "New in Emacs 30" to FAQ
ca6b484162 ; * etc/NEWS: Move "Minibuffer and Completions"
35c46663e4 ; * etc/NEWS: Move item to "Lisp Changes".
0515b38d28 ; * etc/NEWS: Move keyboard macro items closer together.
22af3a7103 ; * etc/NEWS: More copy-edits.
000ef8876a ; * etc/NEWS: Move items to "Incompatible Lisp Changes".
4088dc8e4c ; * etc/NEWS: Rearrange "Incompatible Lisp Changes".
179800f36b ; * lisp/epg.el (epg--start): Add commentary about encoding.
73898f0214 Fix non-ASCII filename operatiion on EasyPG (bug#71500)
a65b6aac6b Silence warning with global minor mode :predicate
f5f7343ac4 ; * etc/NEWS: Move an item to "Startup Changes"
c95066bf18 ; * etc/NEWS: Move some Lisp items to better place.
bf7db88ce1 ; * etc/NEWS: Rearrange "Editing Changes in Emacs 30.1"
000424eb9e ; * etc/NEWS: Make touch screen support more prominent.
5b5671587f ; * etc/NEWS: Rearrange "Changes in Emacs 30.1".
31124abdef ; * lisp/thingatpt.el (sexp-at-point): Doc fix (bug#71777).
44f269d6e6 Fix: make 'xwidget-webkit-scroll-backward' scroll backwards
358085997c Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
736b7cad40 Add jsdoc support to php-ts-mode in <script> element
5f3d964e39 Update to Transient v0.7.2-4-gf75bc48d
2d8881d526 Fix typo incurring leaks of face structures
219501dd62 ; Fix use of @footnote in cc-mode.texi
c7be2dcac4 Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs ...
f0a4879975 Sync with Tramp 2.7.1
53dcf2b949 ; * etc/NEWS: Move the mwheel entry to a better place.
a5726782d0 ; Sort tree-sitter modes in NEWS
daa89dc939 ; * etc/NEWS: Rearrange "New Modes and Packages in Emacs ...
4ddbf4f70e ; * etc/NEWS: Move many items.
437b1ced26 ; * etc/NEWS: Copy-edits.
7372b2eb30 Expand docstring of which-key-mode
df0eb5be1e Improve documentation of 'remove-overlays' in ELisp manual
73c1252bb6 Fix link to major mode variable in docstring
c4ad54812a Make `shell-mode' more robust
c4ec905c9a Correct ommissions in rmc.el
bf862fc277 * lisp/hi-lock.el: More fixes related to revert-buffer.
6cc8ffae9a Update to Org 9.7.5-9-ga091ca
c477443ab8 ; Fix typo in lua-ts-mode.el
6e5e4d6193 ; Add 'eglot-ensure' option to 'lua-ts-mode-hook'
58a2f36a8b ; * etc/NEWS: Copy edit.
df53ef176a Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
039e6ffd86 Write Antinews for Emacs 30 ELisp Reference
bf8c9f702b (eval-last-sexp): Fix bug#71774
6d94090cad * lisp/hi-lock.el: More fixes for revert-buffer (bug#57534)
280c91782a * lisp/hi-lock.el (hi-lock-revert-buffer-rehighlight): Im...
339310d020 * lisp/tab-bar.el (tab-bar-select-restore-windows): Impro...
c1e7569a92 Write Antinews for Emacs 30 user manual
233f683da8 ; * lisp/erc/erc-backend.el (erc-server-reconnect-timeout...
20a672b3b2 Change ERC version for Emacs 30 to 5.6.0.30.1
cbede3d43d * src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper): ...
6f9f9a2155 Fix two tests for --without-all build
98daa10f06 ; * etc/PROBLEMS (PGTK): Remove redundant 2nd PGTK section.
ced33bc239 Fix handling of non-nil 'dired-movement-style'
b1e9b6fd67 ; * lisp/gnus/message.el (message-idna-to-ascii-rhs): Doc...
5eb9a0d2c7 ; * etc/NEWS: Fix last change (bug#71720).
6ec77f580d Do not prematurely truncate python eldoc string
f475a1a254 ; Fix simple-tests as fallout of last change
aa10d0c5ac Add tests for `kill-whole-line' (bug#65734)
058bb4ca25 kill-whole-line: Honor visibility; fix kill-ring when rea...
e45173d114 * lisp/hi-lock.el (hi-lock-file-patterns-policy): Add val...
d6afb017de * lisp/progmodes/xref.el (xref-revert-buffer-restore-poin...
8d55b38e2a Fix Cygwin build
82125b1a66 Use 'revert-function' in *xref* buffer
860840621a Prevent crashes and related issues if initial activity is...
d5c6eb1f96 Doc fix in 'php-ts-mode'
fb15affde8 Avoid compiler warnings in the Cygwin-w32 build
8d354925dd Add new face 'widget-unselected' to wid-edit.el
1809f6a93e Always perform Eshell process cleanup runs in the Eshell ...
8b1841021c Avert crash in store_mode_line_string on Android 5.0 and ...
e7c85f9235 Use HarfBuzz in Cygwin-w32 build
8e3e206bd3 ; * src/buffer.c (syms_of_buffer) <mode-line-format>: ASC...
fe0d9dfb3b ; * lisp/treesit.el (treesit--syntax-propertize-start): F...
2f18929319 Fix tabbing between widgets (bug#70594)
6ad6507532 ; * lisp/which-key.el (which-key-dont-use-unicode): Add :...
60b38c317b * lisp/touch-screen.el (touch-screen-inhibit-drag): Anoth...
a4ca30ac2e Fix rescaling of images via 'text-scale-mode' in EWW
0e43606b20 * lisp/touch-screen.el (touch-screen-inhibit-drag): Fix t...
1b4c562721 Fix latent side-effects of respecting field boundaries in...
e4046f33ab ; * lisp/simple.el (undo-auto--boundaries): Doc fix (bug#...
008eeb21fd ; * lisp/language/cyrillic.el: Delete obsolete commentary...
680155d3f0 Add missing builtin package declarations
ce4f56caf7 Extend treesitter tests on emba
7e8a97ac78 Show entries from key-translation-map in which-key mode
4a0958642d * lisp/tab-bar.el (tab-bar-tab-group-face-function): Impr...
a769f171e7 ; Fix flymake tests with GCC 14.
96e27c2ecf Don't show char name for multi-char translations
0715abfa86 Reset ls-lisp-use-string-collate when ls-lisp-emulation c...
4fcc38966b Update to Transient v0.7.2-1-gf273c0c8
b7d5ca3a8f * doc/misc/calc.texi (Musical Notes): Fix typo.
164f75822b ; Fix typos
768e92b9c0 Update options that depend on 'which-key-dont-use-unicode'
4b2682b17c ; Remove debugging message in Completion Preview test
73a58329a6 Fix omission of updates to child frames on Android
0edacf2aa7 Add jsdoc support to js-ts-mode
cace0cbee9 ; Restore inadvertently removed line.
2b04effb13 ; * test/lisp/net/shr-tests.el (shr-test--rendering-check...
6619aec6bc ; Don't run new 'shr-test/zoom-image' when built without ...
5d19bfda32 ; * admin/release-branch.txt: Update and fix typo.
fb11294d41 ; Fix typos
d9bd1718f9 Backport: Minor changes in tramp-tests.el
1728de5a77 Backport: Tramp: Fix bug#71709, and other minor changes
dd0fc6aff6 New branch emacs-30
bc72c33ac3 * admin/admin.el: (set-version): Fix regexp for configure...
60475a73d1 Disable Ffile_system_info for Android special directories
18e7a9f3d0 Restore functionality on Windows 98
5f8a9cd4b6 Fix a bug in 'switch-to-buffer'
5f9b5803be Fix zooming images in SHR
6f2036243f ; Doc fix in 'php-ts-mode'.
2f1c882a16 Colorize CSS property value like `css--fontify-region'
dd0994aa36 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
486ea8ef5a * configure.ac: Disable kqueue on Haiku.
737fa7c529 Fix 'Customize' menu entry for 'php-ts-mode'
cb7be6035e Fix compilation on prerelease versions of Haiku
2b848a4e50 Fix FIXME in comment
77e3a56507 Update SKK-JISYO.L from upstream
e5bae78861 Update publicsuffix.txt from upstream
bf5f74288b Add assignment form as `etc/copyright-assign.txt`
fcd3798804 ; Merge from origin/emacs-29
0f01cb0ebd Bump Emacs version to 29.4.50
014aab9847 Fix for grammar change of keyword "virtual" in tree-sitte...
fa364a0d46 Revert "; * etc/HISTORY: Delete never-released Emacs 28.3."
a81417e576 Update Tramp version (don't merge to master)
ff389163ee Manually merge NEWS.29 from emacs-29
ea05713122 ; * etc/HISTORY: Delete never-released Emacs 28.3.
d3469978b8 Merge from origin/emacs-29
3739342a4e ; Merge from origin/emacs-29
38e738a35e Merge from origin/emacs-29
4c4c94fa10 ; Merge from origin/emacs-29
1313b8966a Merge from origin/emacs-29
4a76af51bb Replace literal whitespace with `\s`
e41dd2241f ; Merge from origin/emacs-29
8520ec829d ; * lisp/editorconfig.el (editorconfig-indentation-alist)...
99161fb714 Fix non-existing `editorconfig-set-indentation-python-mode`
fd15d89ec5 Merge remote-tracking branch 'origin/emacs-29' into emacs-29
6a299b3cac Release Emacs 29.4
3f3c08bcc7 Add before-save-hook to man page files
7b0e6cb3ff Use UTC when generating man page timestamps
a7cb642a9f Merge from origin/emacs-29
6491d11b53 ; Merge from origin/emacs-29
2f39a4b28a Merge from origin/emacs-29
150e2b979c ; * src/xfns.c (unwind_create_frame): Add missing definit...
75fdeef7b4 Allow to expand truncated long lines in *Compilation* buf...
fb1b188e1a Eglot: Fix command execution (bug#71642)
155cc89de0 Support for indentation of PHP alternative syntax control...
7f7b28a250 ; Wayland SECONDARY selection problem
11fb3510f4 Prevent auto-revert when deleting entry (bug#71264)
a4fe4ca93c Fix font lock regex for user defined constant in PHP
e1ba4ebb49 Make Compilation mode recognize non-legacy Kotlin/Gradle ...
4f03083499 ; Improve documentation of EditorConfig support
c0bfe42948 List Andrea Corallo as co-maintainer in ack.texi
b3d6880512 * admin/MAINTAINERS: Add myself in (co-)maintainers.
7cc939bf27 ; * lisp/ldefs-boot.el: Regenerated for Emacs 29.4
959eacc2a7 Bump Emacs version to 29.4
9a02fce714 Update files for Emacs 29.4
d96c54d388 * admin/authors.el: Update for Emacs 29.4
fd207432e5 * etc/NEWS: Update for Emacs 29.4
c645e1d820 org-link-expand-abbrev: Do not evaluate arbitrary unsafe ...
50a237c468 Update Tramp version (don't merge to master)
f3e80dd0f7 * admin/emacs-shell-lib: Backport to Bash 4.4 or older.
ce85d3811d Fix bug#49289 also for other auth-source backends

# Conflicts:
#	etc/NEWS
2024-06-30 23:12:09 +08:00
Robert Church
4e22ef870c Add D-Bus test
* test/lisp/net/dbus-tests.el (dbus-test05-register-signal-with-nils):
New test.  (Bug#69926)
2024-06-30 12:16:20 +02:00
Po Lu
e2561e267f Merge from savannah/emacs-30
72cf9964f3 Inaccuracy in efaq.texi
fc48e9e8ed ; Fix typos in DOS Makefile scripts
9b8d754579 ; * etc/NEWS: Explain Nextstep.
8819e5a45d Fix treesit crash (bug#71681)
eaf2dc96c1 ; Fix SHR test on MS-Windows
57880f597c Delete redundant mention of `with-eval-after-load'
ea8ce98434 * doc/misc/efaq.texi (New in Emacs 30): Fix typos.
45a20d781a ; Fix typos in symbols
d95f039af4 Document security fixes in FAQ
d063af203c Add "New in Emacs 30" to FAQ
ca6b484162 ; * etc/NEWS: Move "Minibuffer and Completions"
35c46663e4 ; * etc/NEWS: Move item to "Lisp Changes".
0515b38d28 ; * etc/NEWS: Move keyboard macro items closer together.
22af3a7103 ; * etc/NEWS: More copy-edits.
000ef8876a ; * etc/NEWS: Move items to "Incompatible Lisp Changes".
4088dc8e4c ; * etc/NEWS: Rearrange "Incompatible Lisp Changes".
179800f36b ; * lisp/epg.el (epg--start): Add commentary about encoding.
73898f0214 Fix non-ASCII filename operatiion on EasyPG (bug#71500)
a65b6aac6b Silence warning with global minor mode :predicate
f5f7343ac4 ; * etc/NEWS: Move an item to "Startup Changes"
c95066bf18 ; * etc/NEWS: Move some Lisp items to better place.
bf7db88ce1 ; * etc/NEWS: Rearrange "Editing Changes in Emacs 30.1"
000424eb9e ; * etc/NEWS: Make touch screen support more prominent.
5b5671587f ; * etc/NEWS: Rearrange "Changes in Emacs 30.1".
31124abdef ; * lisp/thingatpt.el (sexp-at-point): Doc fix (bug#71777).
44f269d6e6 Fix: make 'xwidget-webkit-scroll-backward' scroll backwards
358085997c Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
736b7cad40 Add jsdoc support to php-ts-mode in <script> element
5f3d964e39 Update to Transient v0.7.2-4-gf75bc48d

# Conflicts:
#	etc/NEWS
2024-06-30 10:06:09 +08:00
Jim Porter
eaf2dc96c1 ; Fix SHR test on MS-Windows
* test/lisp/net/shr-tests.el (shr-test/zoom-image): Ensure the image URL
is properly formatted: it should always have 3 slashes after "file:".
2024-06-29 14:59:20 -07:00
Stefan Kangas
45a20d781a ; Fix typos in symbols 2024-06-29 17:29:38 +02:00
Eshel Yaron
2119cd52cd
Inherit text props in Completion Preview insertion commands
When completing with Completion Preview mode commands,
inherit text properties from surrounding text similarly to
other completion commands, such as 'completion-at-point'.

* lisp/completion-preview.el (completion-preview-insert)
(completion-preview-partial-insert)
(completion-preview-complete): Use 'insert-and-inherit'
instead of 'insert' to insert text for completion.
* test/lisp/completion-preview-tests.el
(completion-preview-insert-inherits-text-properties): New
test.
2024-06-29 15:14:18 +02:00
Björn Lindström
2a7a7c6f69 Make whitespace.el's cleanup add missing final newline
* lisp/whitespace.el (whitespace-cleanup-region): If cleaning
up at end of file, add missing newline if indicated by
'whitespace-style'.  (Bug#71499)

* etc/NEWS: Announce the change in behavior.
2024-06-29 16:01:50 +03:00
Po Lu
c4709d6bcd Merge from origin/emacs-30
2d8881d526 Fix typo incurring leaks of face structures
219501dd62 ; Fix use of @footnote in cc-mode.texi
c7be2dcac4 Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs ...
f0a4879975 Sync with Tramp 2.7.1
53dcf2b949 ; * etc/NEWS: Move the mwheel entry to a better place.
a5726782d0 ; Sort tree-sitter modes in NEWS
daa89dc939 ; * etc/NEWS: Rearrange "New Modes and Packages in Emacs ...
4ddbf4f70e ; * etc/NEWS: Move many items.
437b1ced26 ; * etc/NEWS: Copy-edits.
7372b2eb30 Expand docstring of which-key-mode
df0eb5be1e Improve documentation of 'remove-overlays' in ELisp manual
73c1252bb6 Fix link to major mode variable in docstring
c4ad54812a Make `shell-mode' more robust

# Conflicts:
#	etc/NEWS
2024-06-29 20:04:05 +08:00
Michael Albinus
f0a4879975 Sync with Tramp 2.7.1
* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.
(customize-package-emacs-version-alist): Add Tramp version
integrated in Emacs 30.1.

* lisp/net/tramp-compat.el:
* lisp/net/tramp-message.el (tramp-warning): Use `lwarn'.

* test/lisp/net/tramp-tests.el
(tramp--test-deftest-without-file-attributes): New defmacro.
(tramp-test18-file-attributes-without-file-attributes)
(tramp-test19-directory-files-and-attributes-without-file-attributes)
(tramp-test18-file-attributes-without-file-attributes)
(tramp-test42-utf8-without-file-attributes): New tests.
2024-06-29 10:13:32 +02:00
Po Lu
5c09557df3 Merge from savannah/emacs-30
6f9f9a2155 Fix two tests for --without-all build
2024-06-28 14:46:53 +08:00
Andrea Corallo
6f9f9a2155 Fix two tests for --without-all build
* test/src/image-tests.el
(image-tests-image-mask-p/error-on-nongraphical-display)
(image-tests-image-metadata/error-on-nongraphical-display): xpm images
are not supported in all configurations so use xbm for non graphical
display tests.
2024-06-27 15:32:51 +02:00
Po Lu
a67928c6ba Merge from savannah/emacs-30
98daa10f06 ; * etc/PROBLEMS (PGTK): Remove redundant 2nd PGTK section.
ced33bc239 Fix handling of non-nil 'dired-movement-style'
b1e9b6fd67 ; * lisp/gnus/message.el (message-idna-to-ascii-rhs): Doc...
5eb9a0d2c7 ; * etc/NEWS: Fix last change (bug#71720).
6ec77f580d Do not prematurely truncate python eldoc string
f475a1a254 ; Fix simple-tests as fallout of last change
aa10d0c5ac Add tests for `kill-whole-line' (bug#65734)
058bb4ca25 kill-whole-line: Honor visibility; fix kill-ring when rea...
e45173d114 * lisp/hi-lock.el (hi-lock-file-patterns-policy): Add val...
d6afb017de * lisp/progmodes/xref.el (xref-revert-buffer-restore-poin...
82125b1a66 Use 'revert-function' in *xref* buffer

# Conflicts:
#	etc/NEWS
2024-06-27 20:32:08 +08:00
Eli Zaretskii
f475a1a254 ; Fix simple-tests as fallout of last change
* test/lisp/simple-tests.el
(simple-execute-extended-command--shorter): Fix test broken by new
kill-whole-line tests.  (Bug#65734)
2024-06-27 11:37:15 +03:00
Sebastian Miele
aa10d0c5ac Add tests for `kill-whole-line' (bug#65734)
* test/lisp/simple-tests.el (simple-test-point-tag):
(simple-test-mark-tag):
(simple-test--set-buffer-text-point-mark):
(simple-test--get-buffer-text-point-mark): Add helper functions used by
the tests.
(kill-whole-line-invisible):
(kill-whole-line-read-only):
(kill-whole-line-after-other-kill):
(kill-whole-line-buffer-boundaries):
(kill-whole-line-line-boundaries): Add tests for `kill-whole-line'.
2024-06-27 10:49:01 +03:00
Eshel Yaron
9cb2a20408
Minor improvements to new Completion Preview commands
* lisp/completion-preview.el (Commentary): Mention
`completion-preview-partial-insert' and elaborate about
`completion-preview-insert-sexp'.
(completion-preview--barf-if-no-preview): New function.
(completion-preview-insert, completion-preview-complete):
Use it.
(completion-preview-partial-insert): Rename arg to FUN; only
compute (+ end (length aft)) once; bind 'deactivate-mark' to
nil while inserting/deleting to allow commands that use this
function to work as expected with 'shift-select-mode';
improve behavior when called with point not at the start of
the completion preview overlay (e.g. when point is in the
middle of a multi-word symbol and this function is called
via 'completion-preview-insert-word'); add the base part of
the completion candidate to when calling exit-function.
(completion-preview-insert-word): Improve docsting, rename
argument ARG to N.
(completion-preview-insert-sexp): Likewise, and also remove
second argument INTERACTIVE.
(completion-preview--active-p): Rename to...
(completion-preview-active-p): ...this.  Make this function
public so users can leverage it for their own commands.
Extend docstring to explain how to do that.

* test/lisp/completion-preview-tests.el
(completion-preview-insert-calls-exit-function)
(completion-preview-insert-word): Break long lines.
(completion-preview-insert-sexp)
(completion-preview-insert-nonsubword)
(completion-preview-insert-subword): Fix docstrings.
(completion-preview-insert-mid-symbol): New test.
2024-06-26 12:26:50 +02:00
Jules Tamagnan
b3017e7c25
New commands 'completion-preview-insert-{word,sexp}'
* lisp/completion-preview.el
(completion-preview-partial-insert): New function.
(completion-preview-insert-word)
(completion-preview-insert-sexp): New commands.
(completion-preview-commands): Add them.
(Commentary): Document them.
(completion-preview-active-mode-map): Add comment.
* test/lisp/completion-preview-tests.el
(completion-preview-insert-calls-exit-function): Update.
(completion-preview-insert-nonsubword)
(completion-preview-insert-subword)
(completion-preview-insert-sexp):  New tests.  (Bug#71716)
2024-06-26 12:26:50 +02:00
Jim Porter
1809f6a93e Always perform Eshell process cleanup runs in the Eshell buffer
Previously, some code executed in a timer, which could execute in the
wrong buffer, leading to a hang.

* lisp/eshell/esh-proc.el (eshell-sentinel): Use 'with-current-buffer'
in the timer function.

* test/lisp/eshell/esh-proc-tests.el (eshell-test-value): New variable.
(esh-proc-test/sentinel/change-buffer): New test.

(cherry picked from commit da4bc5c927)
2024-06-25 21:42:28 -07:00
Jim Porter
da4bc5c927 Always perform Eshell process cleanup runs in the Eshell buffer
Previously, some code executed in a timer, which could execute in the
wrong buffer, leading to a hang.

* lisp/eshell/esh-proc.el (eshell-sentinel): Use 'with-current-buffer'
in the timer function.

* test/lisp/eshell/esh-proc-tests.el (eshell-test-value): New variable.
(esh-proc-test/sentinel/change-buffer): New test.
2024-06-25 21:39:35 -07:00
Michael Albinus
ce4f56caf7 Extend treesitter tests on emba
* test/infra/Dockerfile.emba (emacs-tree-sitter): Install c-ashrp
grammar.

* test/infra/Makefile.in (TREE-SITTER-FILES): Add csharp-mode-tests.el.
(tree-sitter-files): Rename from tree-sitter-files-template.
Generate .tree-sitter-files.

* test/infra/gitlab-ci.yml (test-tree-sitter): Extend .tree-sitter-files.

* test/infra/test-jobs.yml: Regenerate.
2024-06-24 20:02:07 +02:00
Ulrich Müller
a769f171e7 ; Fix flymake tests with GCC 14.
* test/lisp/progmodes/flymake-tests.el (included-c-header-files):
Fix test failure with GCC 14.  (Bug#71749)
2024-06-24 15:45:42 +02:00
Eshel Yaron
4b2682b17c
; Remove debugging message in Completion Preview test
* test/lisp/completion-preview-tests.el
(completion-preview-complete): Remove leftover debug message.
2024-06-24 08:22:12 +02:00
Eli Zaretskii
cace0cbee9 ; Restore inadvertently removed line. 2024-06-23 22:22:12 +03:00
Eli Zaretskii
2b04effb13 ; * test/lisp/net/shr-tests.el (shr-test--rendering-check): Use UTF-8. 2024-06-23 22:17:37 +03:00
Jim Porter
6619aec6bc ; Don't run new 'shr-test/zoom-image' when built without image support
* test/lisp/net/shr-tests.el (shr-test/zoom-image): Skip when
'image-types' is unbound.
2024-06-23 11:40:30 -07:00
Stefan Kangas
fb11294d41 ; Fix typos 2024-06-23 16:40:06 +02:00
Michael Albinus
d9bd1718f9 Backport: Minor changes in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp--test-shell-file-name):
Use connection-local value.
(tramp--test-shell-command-switch): New defun.
(tramp-test28-process-file)
(tramp-test34-explicit-shell-file-name): Use it.
(tramp--test-supports-processes-p): Simplify.
(tramp--test-check-files): Use `tramp-compat-seq-keep'.
(tramp-test45-asynchronous-requests): Don't let-bind `shell-file-name'.
(tramp-test45-asynchronous-requests): Adjust timer.
(tramp-test45-asynchronous-requests): Add another test message.

(cherry picked from commit c95caade15)
2024-06-23 14:00:57 +02:00
Jim Porter
5f9b5803be Fix zooming images in SHR
Previously, for images with no alt-text, the zoomed image wouldn't get
properly inserted.  For images with alt-text, both the zoomed and
unzoomed image would be displayed at once (bug#71666).

* lisp/net/shr.el (shr-sliced-image): New face.
(shr-zoom-image): Reimplement using
'next/previous-single-property-change', and don't bother deleting any of
the text.
(shr-image-fetched): Clean up any overlays when deleting the old region.
(shr-put-image): Ensure we always have a non-empty string to put the
image on.  For sliced images, just use "*", since we'll repeat it, so we
can't preserve the original buffer text exactly anyway.  Apply an
overlay to sliced images to prevent unsightly text decorations.
(shr-tag-img): Move the placeholder space insertion where it should be
and explain what it's doing.

* test/lisp/net/shr-tests.el (shr-test--max-wait-time)
(shr-test-wait-for): New helper functions.
(shr-test/zoom-image): New test.
2024-06-22 23:09:00 -07:00
Stefan Kangas
4a76af51bb Replace literal whitespace with \s
* test/lisp/vc/log-edit-tests.el (log-edit-fill-entry-confinement)
(log-edit-fill-entry-space-substitution)
(log-edit-fill-entry-initial-wrapping): Replace literal space character
with '\s', to avoid tripping up merge scripts.
2024-06-22 18:42:06 +02:00
Rudolf Adamkovič
e1ba4ebb49 Make Compilation mode recognize non-legacy Kotlin/Gradle errors
The Compilation mode recognizes Kotlin/Gradle errors but only in
the now legacy format.  The current format, which has been in wide
use for about a year, is not supported.  This change adds support
for the current format.
* etc/compilation.txt: (symbols): Add examples of non-legacy
Kotlin/Gradle warnings and errors.
* lisp/progmodes/compile.el: (compilation-error-regexp-alist-alist):
Rename 'gradle-kotlin' to 'gradle-kotlin-legacy' and add
'grade-kotlin' that matches the errors and warnings outputted by
the current (non-legacy) Kotlin/Gradle.  (Bug#70797)
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): Rename 'gradle-kotlin' to
'gradle-kotlin-legacy' and add two test cases for the newly added,
non-legacy Kotlin/Gradle warnings and errors.
2024-06-22 11:30:51 +03:00
Jim Porter
e22b072423 Ensure navigating by paragraphs in Eshell stops at prompts and paragraphs
The previous implementation in 6ae2b74ed2 only stopped at prompts,
which isn't the right behavior (bug#61545).

* lisp/eshell/em-prompt.el (eshell-forward-paragraph)
(eshell-backward-paragraph): Reimplement to handle prompts and
paragraphs (the latter by calling the original 'forward-paragraph').

* test/lisp/eshell/em-prompt-tests.el
(em-prompt-test/next-previous-prompt/multiline): Rename.
(em-prompt-test/forward-backward-paragraph-1): New function.
(em-prompt-test/forward-backward-paragraph)
(em-prompt-test/forward-backward-paragraph/multiline): New tests.
2024-06-20 19:01:20 -07:00
Philip Kaludercic
fa4203300f
Merge remote-tracking branch 'origin/feature/which-key-in-core' 2024-06-18 21:45:58 +02:00
Jim Porter
aefcccc1d4 Fix Eshell "which" test on MS-Windows
* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/which/plain/external-program): Compare the file name
case-insensitively on case-insensitive file systems.

* test/lisp/eshell/eshell-tests-helpers.el
(eshell-command-result--equal): Revert to the previous implementation.
2024-06-15 22:51:42 -07:00
Eli Zaretskii
2c201bbba5 Fix em-extpipe-tests on MS-Windows
* test/lisp/eshell/em-extpipe-tests.el (em-extpipe-test-14): Fix
test on MS-Windows (bug#71446).
2024-06-15 22:20:56 +03:00
Jim Porter
03ad06737b ; Improve last change
* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline): Fix
check of exit message and ensure we have only one prompt.
2024-06-15 11:27:07 -07:00
Jim Porter
7df855cdfe ; Add command logging to some more Eshell tests
* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline)
(esh-proc-test/kill-pipeline-head): Write debug logs on failure.
2024-06-15 11:06:58 -07:00
Philip Kaludercic
f1c06968ee
Merge remote-tracking branch 'github-which-key/master' 2024-06-15 14:44:06 +02:00
kobarity
af6e7ed4c1 Allow escape sequences in Python prompts
* lisp/progmodes/python.el (python-shell-prompt-detect): Use
Python's json package if available, and remove escape sequences
in prompts.
* test/lisp/progmodes/python-tests.el
(python-tests-interpreter-2-6-higher-p): New predicate
function.
(python-shell-prompt-detect-7): New test.  (Bug#71440)
2024-06-15 13:46:29 +03:00
Jim Porter
4973801c19 ; Minor editorial fixes to some Eshell tests
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/kill-process/redirect-message): Move next to its sibling
tests.
(esh-proc-test/remote/remote-path): Rename from 'esh-var-test/...'.
2024-06-13 12:22:01 -07:00
Harald Jörg
39e3c30b51 ;cperl-mode.el: Avoid false positives when parsing new Perl syntax
* lisp/progmodes/cperl-mode.el (cperl--package-for-imenu-rx)
(cperl--class-for-imenu-rx): avoid false positives when collecting
imenu entries
* lisp/progmodes/cperl-mode.el (cperl-init-faces): avoid false
positives when detecting package names

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-imenu-index): Add test verifying that $class_false is
not shown as a class _false

* test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add a line
containing a false positive "$class_false"
2024-06-13 14:37:13 +02:00
Stefan Kangas
37a715c609 Fix recently added eshell test
* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/empty-background-command): Fix failing test.
2024-06-10 22:18:19 +02:00
Eli Zaretskii
ffd2c492a0 Fix treesit-tests
* test/src/treesit-tests.el (treesit-node-api): Adapt the test to
changes in 'treesit_check_node'.  (Bug#71012)
2024-06-10 21:22:47 +03:00
kobarity
3003d6a0c0 ; Fix recent change to python-tests.el
* test/lisp/progmodes/python-tests.el
(python-tests--pythonstartup-file): Use already bound
'python-shell-interpreter'.  (Bug#70815)
2024-06-10 17:43:07 +02:00
Michael Albinus
24448b7bbb Extend auto-revert-test07-auto-revert-several-buffers
* test/lisp/autorevert-tests.el (auto-revert-test05-global-notify):
Make cleanup robust.
(auto-revert-test07-auto-revert-several-buffers): Extend test.
(Bug#71424)
2024-06-10 12:55:59 +02:00
Harald Jörg
060c48435f cperl-mode.el: Update for the current Perl version 5.040
* etc/NEWS: Announce new features of cperl-mode.

* lisp/progmodes/cperl-mode.el (cperl-menu): Add toggle for extra
paired delimiters.
(defconst): new rx expressions `cperl--sub-name-generated-rx' and
`cperl--field-declaration-rx'
(cperl--imenu-entries-rx): Use the new expressions
(cperl--extra-paired-delimiters): New variable holding the paired
delimiters for Perl 5.36 and newer
(cperl-imenu-sub-keywords): Add autogenerated methods to imenu
(cperl-init-faces): Add the __CLASS__ token, builtin constants,
and attributes for field declarations.
(cperl-short-docs): Add __CLASS__ to one-line docs.
(cperl-extra-paired-delimiters-mode): new minor mode to handle
non-ASCII paired delimiters.

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-builtin-constants): new test.
(cperl-test-fontify-class): New test clauses for attributes.
(cperl-test-field-declaration-rx): new test.
(cperl-test-autogenerated-reader-rx): new unit test for the rx
expression.
(cperl-test-extra-delimiters): new test.
(cperl-test-imenu-index): new clauses for imenu capture of
autogenerated methods.

* test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add
examples for Perl 5.40 syntax.

* test/lisp/progmodes/cperl-mode-resources/extra-delimiters.pl:
New resource for non-ASCII paired delimiters.
2024-06-10 12:22:13 +02:00
Jim Porter
32a75ecc73 Improve correctness of 'eshell-quote-argument'
* lisp/eshell/esh-arg.el (eshell-quote-argument): Mention that this
function is for use within Eshell buffers.
(eshell-quote-backslash): Properly quote newlines.

* lisp/eshell/em-unix.el (eshell/cat, eshell/du): Throw
'eshell-external' instead; that's what it's here for.

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test-quote-argument):
Remove.
(esh-proc-test/emacs-command):
* test/lisp/eshell/esh-var-tests.el (esh-var-test/path-var/set)
(esh-var-test/path-var/set-locally): Use 'eshell-quote-argument'.

* test/lisp/eshell/em-unix-tests.el (em-unix-test/compile/interactive):
Use 'shell-quote-argument' (Note: *not* 'eshell-...').
2024-06-09 15:28:40 -07:00
Jim Porter
00649042f3 Remove empty Eshell commands when parsing
This improves the logic for copying/stealing handles when constructing
the command form: now, we should always steal the handles for the last
real command, even if there were some trailing semicolons.

* lisp/eshell/esh-arg.el (eshell-parse-delimiter): Be stricter about
parsing so that things like "& &" aren't parsed as a single "&&" token.

* lisp/eshell/esh-cmd.el (eshell-parse-command): Get the commands in
reverse, and remove any nil commands.
(eshell-split-commands): Always return the trailing terms (except when
there were no terms to begin with).

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/empty-background-command): New test.
2024-06-09 13:31:08 -07:00
Eli Zaretskii
968bbdb317 ; Allow batch-file Eshell test on MS-Windows
* test/lisp/eshell/em-script-tests.el (em-script-test/batch-file):
Don't skip on MS-Windows, as the test was fixed.
2024-06-09 22:04:51 +03:00
Jim Porter
b91b81957c ; Add another test for 'eshell-batch-script'
* lisp/eshell/em-script.el (eshell-close-target): New function.

* test/lisp/eshell/em-script-tests.el (em-script-test/batch-file): New
test; rename old one to...
(em-script-test/batch-file/shebang): ... this.
2024-06-09 11:53:29 -07:00
kobarity
bfb4c69e7f Specify Python 3 in some ERTs on Mac
* test/lisp/progmodes/python-tests.el
(python-tests-with-temp-buffer-with-shell): Remove setting
'python-shell-interpreter'.
(python-tests-shell-interpreter): Removed.
(python-tests-shell-interpreters): New variable.
(python-tests-with-shell-interpreter)
(python-tests-with-temp-buffer-with-shell-interpreter): New macros.
(python-tests-get-shell-interpreter): Add an optional PRED
argument to allow ERts to specify Python interpreter version.
(python-tests--get-interpreter-info): New function.
(python-tests-interpreter-3-p): New function to be used as the
PRED argument of 'python-tests-get-shell-interpreter'.
(python-shell-make-comint-1)
(python-shell-make-comint-2)
(python-shell-make-comint-4)
(python-shell-get-process-1)
(python-shell-internal-get-or-create-process-1)
(python-shell-prompt-detect-1)
(python-shell-prompt-detect-2)
(python-shell-prompt-detect-3)
(python-shell-prompt-detect-4)
(python-shell-prompt-detect-5)
(python-shell-prompt-detect-6)
(python-shell-prompt-set-calculated-regexps-6)
(python-shell-completion-at-point-jedi-completer)
(python-completion-at-point-pdb-1)
(python-completion-at-point-while-running-1)
(python-ffap-module-path-1)
(python-ffap-module-path-while-running-1)
(python-eldoc--get-doc-at-point-1)
(python-eldoc--get-doc-at-point-while-running-1)
(python-tests--run-python-selects-window)
(python-test--shell-send-block): Use the new macro.
(python-shell-completion-at-point-ipython): Remove setting
'python-tests-shell-interpreter'.
(python-shell-completion-at-point-1)
(python-completion-at-point-1)
(python-completion-at-point-2)
(python-completion-at-point-native-1)
(python-completion-at-point-native-2)
(python-completion-at-point-native-with-ffap-1)
(python-completion-at-point-native-with-eldoc-1): Use the new
macro and specify Python 3 on Mac to avoid errors.  (Bug#70815)
2024-06-09 15:57:53 +02:00
kobarity
25ab3e7be8 Fix hiding a Python block ending with a comment
* lisp/progmodes/python.el (python-hideshow-forward-sexp-function): Move
point to the end of the line.
* test/lisp/progmodes/python-tests.el (python-hideshow-hide-block-2):
New test.  (Bug#71170)
2024-06-09 16:49:05 +03:00
Eli Zaretskii
5c8a8b7dd3 A better fix for esh-proc-tests on MS-Windows
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test-quote-argument): New function.
(esh-proc-test/emacs-command): Use it instead of
'shell-quote-argument', which allows to go back to
system-independent code.
2024-06-09 16:12:11 +03:00
Eli Zaretskii
f869f1ffc2 Fix Eshell tests on MS-Windows
* lisp/eshell/esh-util.el (eshell-get-path): Don't add "." if it
is already there.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/path-var/preserve-across-hosts): Skip on MS-Windows.
(esh-var-test/path-var/set, esh-var-test/path-var/set-locally):
Quote the PATH value, for MS-Windows.
* test/lisp/eshell/esh-util-tests.el (esh-util-test/path/get): No
need to add ".": it is already done by 'eshell-get-path'.
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/kill-pipeline): Accept empty string as valid
output.
(esh-proc-test/sigpipe-exits-process): Skip on MS-Windows: no
SIGPIPE.
(esh-proc-test/emacs-command): Quote correctly for MS-Windows.
* test/lisp/eshell/em-unix-tests.el
(em-unix-test/compile/interactive): Fix test on MS-Windows.
* test/lisp/eshell/em-script-tests.el (em-script-test/batch-file):
Skip on MS-Windows.
* test/lisp/eshell/eshell-tests-helpers.el
(eshell-command-result--equal): Compare strings (file names)
case-insensitively on MS-Windows.
2024-06-09 10:56:39 +03:00
Stefan Monnier
3ecc6b4f3c (find-auto-coding): Provide filename to auto-coding-functions
Allow `auto-coding-functions` to know the file name.
Motivated by the needs of Editorconfig support.

* lisp/international/mule.el (auto-coding-file-name): New var.
(find-auto-coding): Let-bind it for `auto-coding-functions`.
Document the expectation that the arg be an absolute file name.

* doc/lispref/nonascii.texi (Default Coding Systems):
Mention `auto-coding-file-name`.

* test/lisp/international/mule-util-resources/test.utf-16le: New file.
* test/lisp/international/mule-tests.el (mule-tests--dir): New var.
(mule-tests--auto-coding): New fun.
(mule-tests--auto-coding-functions): New test.
2024-06-09 00:19:03 -04:00
Noah Peart
ce5d004b5b Add typescript-ts-mode indentation for multi-assignment decls
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Add indentation rules for
lexical and variable declarations with multiple assignments.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts:
Add indent test for variable declarations (bug#68054).
2024-06-09 05:47:50 +03:00
Stefan Monnier
e9a0256a55 (pcase--app-subst-match): Try and fix performance regression (bug#71398)
* lisp/emacs-lisp/pcase.el (pcase--app-subst-match): Optimize matches
against (quote VAL).
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-quote-optimization):
Add new test case.
2024-06-08 17:34:56 -04:00
Jim Porter
15f515c7a3 Improve implementations of some Eshell output filter functions
* lisp/eshell/esh-mode.el (eshell-postoutput-scroll-to-bottom): Use
'get-buffer-window-list' for simplicity.
(eshell-handle-control-codes): Use 're-search-forward'; this way is much
faster.

* test/lisp/eshell/esh-mode-tests.el: New file.
2024-06-08 12:29:29 -07:00
Jim Porter
2fac71255f Be more efficient when buffering output in Eshell
This makes the built-in 'eshell/cat' 5-10x faster on large files in my
(somewhat limited) tests.  In addition, this change periodically
redisplays when using the Eshell buffered output so that users can see
some progress.

* lisp/eshell/esh-io.el (eshell-print-queue-size, eshell-print-queue,
eshell-print-queue-count): Make obsolete in favor of...
(eshell-buffered-print-size, eshell--buffered-print-queue)
(eshell--buffered-print-current-size): ... these.
(eshell-buffered-print-redisplay-throttle): New user option.
(eshell--buffered-print-next-redisplay): New variable.
(eshell-init-print-buffer): Make obsolete.
(eshell-flush): Add new REDISPLAY-NOW argument in favor of CLEAR (which
only 'eshell-init-print-buffer' should have used).
(eshell-buffered-print): Compare queued output length to
'eshell--buffered-print-current-size'.
(eshell-with-buffered-print): New macro.

* lisp/eshell/esh-var.el (eshell/env):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-hist.el (eshell/history):
* lisp/eshell/em-unix.el (eshell/cat):
* lisp/eshell/em-ls.el (eshell/ls): Use 'eshell-with-buffered-print'.
(flush-func): Remove.
(eshell-ls--insert-directory, eshell-do-ls): Remove 'flush-func'.

* test/lisp/eshell/em-unix-tests.el (em-unix-test/compile/interactive)
(em-unix-test/compile/pipeline, em-unix-test/compile/subcommand): Fix
indentation.
(em-unix-test/cat/file-output): New test.

* etc/NEWS: Announce these improvements.
2024-06-08 12:29:29 -07:00
F. Jason Park
f6bfa1844b Restore deferred date-stamp insertions in ERC
* lisp/erc/erc-stamp.el (erc-stamp--recover-on-reconnect): Treat
`erc-stamp--deferred-date-stamp' as a permanent-local variable.
(erc-stamp--date): Document expected possible values for `fn' slot.
(erc-stamp--defer-date-insertion-on-post-modify): Use the function
`ignore' to mean a new `erc-timer-hook' member has been requested.
Use nil to mean one has already run.  Deferred date stamps are new in
ERC 5.6 and Emacs 30.
(erc-stamp--date-mode): Improve doc string.
* test/lisp/erc/erc-scenarios-stamp.el
(erc-scenarios-stamp--date-mode/reconnect): New test.
2024-06-08 12:21:14 -07:00
kobarity
c03cafba39 Fix Python mode error caused by incorrect indentation
* lisp/progmodes/python.el (python-indent--calculate-indentation):
Guard against negative indentation.  (Bug #65870)

* test/lisp/progmodes/python-tests.el
(python-indent-badly-indented-block-end): New test.
2024-06-08 15:27:47 +03:00
Javier Olaechea
23ef989935 Add 'sqlite-execute-batch' command
This command is similar to 'sqlite-execute' except that it
executes multiple statements in exchange for not accepting
any arguments.  (Bug#70145)
* src/sqlite.c (Fsqlite_execute_batch): New function.

* test/src/sqlite-tests.el (sqlite-multiple-statements): Add
smoke test for 'sqlite-execute-batch'.

* etc/NEWS: Mention new command 'sqlite-execute-batch'.
* doc/lispref/text.texi (Database): Document the new command.
2024-06-06 12:51:46 +03:00
F. Jason Park
50b134c4dc Don't recurse in erc-server-delayed-check-reconnect
* lisp/erc/erc-backend.el (erc-server-delayed-check-reconnect): Run
`reschedule' function on a timer to avoid growing the stack when
calling `delete-process'.
* lisp/erc/erc-common.el (erc--favor-changed-reverted-modules-state):
Fix `pcase' condition so that changing an option to its standard value
does not earn a "STANDARD" label in Customize if that value differs
from the saved one.
* lisp/erc/erc.el (erc-open-socks-tls-stream): Reword doc string.
* test/lisp/erc/erc-tests.el (erc--with-dependent-type-match)
(erc--with-dependent-type-match): Remove useless tests (bug#71178).
* test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld:
Await phantom EOFs and PINGs to somewhat account for a race that can
result in a failure when running the suite in parallel with -jN.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--print-trace): Set `debug-on-error' to t
so that errors in timers always trigger test failures.
;; * test/lisp/erc/resources/base/assoc/reconplay/foonet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/base/upstream-reconnect/soju-barnet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/base/mask-target-routing/foonet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/join/network-id/barnet.eld: Timeout.
2024-06-05 11:58:44 -07:00
Paul Eggert
3dcac22dd4 Spelling fixes 2024-06-04 22:16:28 -07:00
Stefan Monnier
16fc5b6c0c pcase.el (\`): Try and handle large patterns better
Large backquote patterns tend to lead to very large and deeply
nested expansions, but they also tend to contain a lot of
"constant" subpatterns that can be compiled to quote patterns.
This patch does just that.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg01140.html

* lisp/emacs-lisp/pcase.el (pcase--split-pred):
Improve the handling of pred-vs-quote so it also works with
quoted objects like cons cells, vectors, and strings.
Simplify the `pcase--mutually-exclusive-p` branch accordingly.
(pcase--expand-\`): New function, extracted from the \` pcase macro.
Make it recurse internally, and optimize backquote patterns to `quote`
patterns where possible.
(\`): Use it.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-vectors): Add tests
that were broken by a more naïve version of the optimization.
(pcase-tests-quote-optimization): New test.
2024-06-03 13:40:39 -04:00
Michael Albinus
288b0db968 Skip unmature file notification tests
* test/lisp/filenotify-tests.el (file-notify--deftest-remote):
Skip with "gio" library.  It is unmature.
2024-06-03 12:53:04 +02:00
Alex Bochannek
5ad8ebe6e2 Add new keyboard macro counter functions (bug#61549)
Advanced keyboard macro counter commands for register
integration and conditional macro termination
* lisp/kmacro.el (kmacro-keymap)
(kmacro-reg-load-counter, kmacro-reg-save-counter)
(kmacro-reg-add-counter-equal, kmacro-reg-add-counter-less)
(kmacro-reg-add-counter-greater, kmacro-reg-add-counter)
(kmacro-quit-counter-equal, kmacro-quit-counter-less)
(kmacro-quit-counter-greater, kmacro-quit-counter):
Add advanced keyboard macro counter commands to kmacro keymap.
Implement advanced keyboard macro counter commands.

* test/lisp/kmacro-tests.el (kmacro-tests-test-reg-load)
(kmacro-tests-test-reg-save)
(kmacro-tests-test-reg-add-counter-equal-01)
(kmacro-tests-test-reg-add-counter-equal-02)
(kmacro-tests-test-reg-add-counter-equal-03)
(kmacro-tests-test-reg-add-counter-equal-04)
(kmacro-tests-test-reg-add-counter-less)
(kmacro-tests-test-reg-add-counter-greater)
(kmacro-tests-test-quit-counter-equal-01)
(kmacro-tests-test-quit-counter-equal-02)
(kmacro-tests-test-quit-counter-equal-03)
(kmacro-tests-test-quit-counter-equal-04)
(kmacro-tests-test-quit-counter-less)
(kmacro-tests-test-quit-counter-greater):
Implement unit tests for advanced keyboard macro counter
commands.

* etc/NEWS:
Document advanced keyboard macro counter commands.
2024-06-02 08:59:16 +03:00
Noah Peart
3021421892 Add font-locking for variables in go-ts-mode range clauses (bug#71209)
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Add font-locking rule for variable names in range clauses.
* test/lisp/progmodes/go-ts-mode-tests.el (go-ts-test-font-lock):
Add font-locking test for go-ts-mode.
* test/lisp/progmodes/go-ts-mode-resources/font-lock.go: New file
for go-ts-mode font-locking tests.
2024-06-01 17:47:57 +03:00
Eli Zaretskii
22d9bbe284 Merge from origin/emacs-29
bf50aa38f9 Improve documentation of case-conversion commands
225b426f25 ; Fix typos
2024-06-01 08:34:43 -04:00
Jim Porter
1df3554f07 Make Eshell's "which" command extensible
Since 'eshell-named-command-hook' already makes execution of commands
extensible, "which" should be too.  This makes sure that "which" returns
the right result for quoted commands like "/:cat".

* lisp/eshell/em-alias.el (eshell-aliases-file): Allow it to be nil.
(eshell-read-aliases-list, eshell-write-aliases-list): Check if
'eshell-aliases-file' is nil.
(eshell-maybe-replace-by-alias--which): New function...
(eshell-maybe-replace-by-alias): ... use it.

* lisp/eshell/esh-cmd.el (eshell-named-command-hook): Update docstring.
(eshell/which): Make extensible.
(eshell--find-plain-lisp-command, eshell-plain-command--which): New
functions.
(eshell-plain-command): Use 'eshell--find-plain-lisp-command'.

* lisp/eshell/esh-ext.el (eshell-explicit-command--which): New
function...
(eshell-explicit-command): ... unise it.
(eshell-quoted-file-command--which): New function...
(eshell-quoted-file-command): ... use it.
(eshell-external-command--which): New function.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/which/plain/eshell-builtin)
(esh-cmd-test/which/plain/external-program)
(esh-cmd-test/which/plain/not-found, esh-cmd-test/which/alias)
(esh-cmd-test/which/explicit, esh-cmd-test/which/explicit/not-found)
(esh-cmd-test/which/quoted-file)
(esh-cmd-test/which/quoted-file/not-found): New tests.

* test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell-settings):
Don't load or save aliases.
(eshell-command-result--match,eshell-command-result--match-explainer)
(eshell-command-result-match): New functions.
2024-05-29 19:33:13 -07:00
Jim Porter
9280a619ab Fix calling Eshell scripts outside of Eshell
* lisp/eshell/em-script.el (eshell-source-file): Make obsolete.
(eshell--source-file): Adapt from 'eshell-source-file'...
(eshell-script-initialize, eshell/source, eshell/.): ... use it.
(eshell-princ-target): New struct.
(eshell-output-object-to-target, eshell-target-line-oriented-p): New
implementations for 'eshell-princ-target'.
(eshell-execute-file, eshell-batch-file): New functions.

* lisp/eshell/esh-mode.el (eshell-mode): Just warn if we can't create
the Eshell directory.

* test/lisp/eshell/em-script-tests.el (em-script-test/execute-file):
(em-script-test/execute-file/args), em-script-test/batch-file): New
tests.

* test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell-settings):
New function...
(with-temp-eshell): ... use it.

* doc/misc/eshell.texi (Control Flow): Update documentation.

* etc/NEWS: Announce this change (bug#70847).
2024-05-29 12:11:58 -07:00
Jim Porter
9daf1085a9 Add ability for Eshell virtual targets to handle closing the target
This was documented to work by calling the output function with 'nil',
but that was never actually implemented.  Instead, for compatibility,
we now support a new (optional) close function.

* lisp/eshell/esh-io.el (eshell-virtual-targets): Update docstring.
(eshell-generic-target): New struct...
(eshell-function-target): ... inherit from it, and rename from
'eshell-virtual-target'.
(eshell-get-target): Handle already-created 'eshell-generic-target'.
(eshell-close-target): Call the target's close function if present.

* test/lisp/eshell/esh-io-tests.el (esh-io-test/virtual/device-close):
New test.

* doc/misc/eshell.texi (Redirection): Document the new behavior.
2024-05-29 12:09:05 -07:00
Jim Porter
6c2f21e4a6 Consolidate Eshell module loading/unloading code
This also adds the ability to suppress module loading/unloading
messages, which will be necessary to support running Eshell scripts as
batch scripts.

* lisp/eshell/esh-mode.el (eshell-mode): Move module
loading/initialization to...

* lisp/eshell/esh-module.el (eshell-load-modules)
(eshell-initialize-modules): ... here.
(eshell-module-loading-messages): New option.
(eshell-module--feature-name): Improve docstring.
(eshell-unload-modules): Display a real warning if unable to unload a
module.

* test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell)
(eshell-command-result-equal):
* test/lisp/eshell/eshell-tests-unload.el (load-eshell): Silence Eshell
loading messages.
2024-05-29 12:09:05 -07:00
Michael Albinus
17c23a46c3 Add Tramp distrobox method
* doc/misc/tramp.texi (Inline methods) <distrobox>: Add.

* etc/NEWS: Mention Tramp distrobox method.

* lisp/net/tramp-container.el (tramp-distrobox-program): New defcustom.
(tramp-distrobox-method): New defconst.
(tramp-distrobox--completion-function)
(tramp-enable-distrobox-method): New defuns.  (Bug#71200)
(tramp-docker-method, tramp-dockercp-method)
(tramp-podman-method, tramp-podmancp-method)
(tramp-kubernetes-method, tramp-flatpak-method)
(tramp-apptainer-method, tramp-nspawn-method): Adapt docstring.

* test/lisp/net/tramp-tests.el (tramp--test-box-p): Rename from
`tramp--test-toolbox-p'.  Add distrobox.  Adapt callees.
2024-05-29 18:29:52 +02:00
Eshel Yaron
a9af70849d
Add a couple of minibuffer completion tests
Add tests for regressions that followed commit ff3f17ca3c.

See discussion here:
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00701.html

* test/lisp/minibuffer-tests.el (completion-cycle)
(minibuffer-next-completion): New tests.
2024-05-29 11:54:54 +02:00
Stefan Monnier
fde8dc9287 Redirect calls to subr-native-elisp-p to native-comp-function-p
* test/src/comp-tests.el (comp-tests-bootstrap, lambda-return)
(lambda-return2, free-fun, free-fun2, free-fun-silly-name, speed--1)
(compile-forms, comp-test-defsubst, primitive-redefine-compile-44221)
(48029-1, 61917-1, tco, fw-prop-1, pure):
* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun):
* lisp/subr.el (subr-primitive-p, primitive-function-p, symbol-file):
* lisp/help-fns.el (find-lisp-object-file-name):
* lisp/emacs-lisp/disass.el (disassemble-internal):
* lisp/emacs-lisp/comp.el (comp--call-optim-form-call):
* lisp/emacs-lisp/comp-run.el (comp-warn-primitives):
* lisp/emacs-lisp/comp-common.el (comp-function-type-spec):
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
* lisp/emacs-lisp/bytecomp.el (<trailer>): Rename `subr-native-elisp-p`
to `native-comp-function-p`.
2024-05-28 20:53:25 -04:00
Mattias Engdegård
9c7de10079 Use same Python binary for test as in python mode (bug#70815)
* test/lisp/progmodes/python-tests.el
(python-tests-get-shell-interpreter): Try Python executable names
in the same order as we do for `python-shell-interpreter`,
so that we run the test with the one is most likely to be used.
2024-05-28 17:51:20 +02:00
Michael Albinus
8b70093b36 Fix tar-mode-test-tar-extract-zip-and-gz
* test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-zip-and-gz):
Check also for "unzip" executable.
2024-05-28 13:23:12 +02:00
F. Jason Park
7aa91b299e Fix date-stamp regression in erc-fill-wrap
* lisp/erc/erc-fill.el (erc-fill-wrap, erc-fill-wrap-enable)
(erc-fill-wrap-disable): Add and remove `erc-stamp--insert-date-hook'
member.
(erc-fill--wrap-continued-predicate): Add function-valued variable for
modules to influence `erc-fill--wrap-continued-message-p', which was
originally introduced as part of bug#60936.
(erc-fill--wrap-rejigger-last-message): Move toward beginning of file.
(erc-fill--wrap-unmerge-on-date-stamp): New function.
(erc-fill-wrap): Use `erc-fill--wrap-continued-predicate'.  Restore
recently deleted hunk that reset the wrap marker upon seeing a date
stamp.
* test/lisp/erc/erc-scenarios-fill-wrap.el: New file.
* test/lisp/erc/resources/fill/wrap/merge-datestamp.eld: New file.
2024-05-27 16:47:24 -07:00
F. Jason Park
6888bbbe83 Add ERC module querypoll as monitor placeholder
* doc/misc/erc.texi: Add module `querypoll' to list of built-in
modules'.
* etc/ERC-NEWS: Mention new module `querypoll', and explain new
default behavior for deriving query membership from that of channels.
* lisp/erc/erc-goodies.el (erc--querypoll-ring)
(erc--querypoll-timer): New variables.
(erc-querypoll-exclude-regexp): New option.
(erc-querypoll-mode, erc-querypoll-enable, erc-querypoll-disable): New
module for polling with "WHO" requests for the presence of otherwise
"untracked" query targets.
(erc-querypoll-period-params): New variable.
(erc--querypoll-compute-period)
(erc--querypoll-target-in-chan-p)
(erc--querypoll-get-length)
(erc--querypoll-get-next)
(erc--querypoll-subscribe)
(erc--querypoll-on-352)
(erc--querypoll-send): New functions.
* lisp/erc/erc-speedbar.el (erc-speedbar-buttons): Dispatch queries as
if they were channels when `erc--queries-current-p' returns non-nil.
That is, show head counts alongside query targets as users come and
go.
(erc-speedbar-insert-target): Defer to `erc--queries-current-p' to
know whether to show a query in the style of a channel.  This affects
both the plain speedbar integration as well as the `nickbar' module
added for bug#63595.  Also, use question marks rather than the empty
string for query bullets, so that query and channel items are aligned
vertically.
* lisp/erc/erc.el (erc--queries-current-p): New function.
* test/lisp/erc/erc-goodies-tests.el
(erc--querypoll-compute-period)
(erc--querypoll-target-in-chan-p)
(erc--querypoll-get-length)
(erc--querypoll-get-next): New tests.  (Bug#70928)
2024-05-27 16:46:40 -07:00
F. Jason Park
5f84213c98 Retain client's own user in erc-server-users
* lisp/erc/erc-backend.el (erc-server-KICK, erc-server-PART): Use new
function `erc--remove-channel-user-but' instead of
`erc-remove-channel-users'.  In `erc-server-KICK', remove sender's
channel membership data after displaying the message so that nicks are
buttonized.  Return nil.  In `erc-server-PART', don't run
`erc-remove-channel-member' when the client itself has parted.
* lisp/erc/erc-common.el (erc--remove-user-from-targets): New
function.
* lisp/erc/erc.el (erc-remove-server-user): Redo doc string.
(erc--forget-server-user-function): New variable.
(erc--forget-server-user): New function.
(erc--forget-server-user-ignoring-queries): New function, the default
value of `erc--forget-server-user-function'.
(erc-remove-channel-user): Defer to `erc--forget-server-user-function'
to do the actual removal.
(erc-remove-user): Defer to `erc--remove-user-from-targets'.
(erc-remove-channel-users): Redo doc
(erc--remove-channel-users-but): New function.  The only use case thus
far is for protecting the client's own `erc-server-users' entry from
removal when draining `erc-channel-members' tables after the client
leaves a target buffer or quits.
(erc-kill-buffer-function): Don't remove own user from
`erc-server-users'.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-queries-solo): Assert own client parting
its only channel doesn't remove own user from server.  Also assert
that another user parting their only channel removes them from all
queries.  (Bug#70928)
2024-05-27 16:39:18 -07:00
F. Jason Park
04477cf97b Tether query rolls to channel membership in ERC
* lisp/erc/erc-backend.el (erc-server-JOIN): Update query membership
via `erc--ensure-query-member' when someone else joins a channel.
(erc-server-NICK): Update query membership via
`erc--ensure-query-member' after someone else changes their nick.
(erc-server-PRIVMSG): After printing a query message from some other
person, remove their nick's data from the query buffer's user table if
they're "untracked," i.e., not a member of a channel.
(erc-server-263, erc-server-263-functions): New function and variable,
a default response handler and hook for "RPL_TRYAGAIN", which servers
send for things like rejecting "WHO" and "WHOX" responses due to rate
limiting.
(erc-server-311): Fix call to `erc-update-user-nick' so the userhost
login component is no longer supplied as the `info' parameter but
rather, correctly, as the `login'.
(erc--extract-352-full-name): Factor out trailing hop-count and GECOS
parsing for use by overriding handlers or those for adjacent numerics.
(erc-server-352): Refactor to handle asterisk as `channel' parameter,
which indicates a nick rather than a channel target.
(erc-server-366): Update membership in all query buffers via
`erc--ensure-query-members' after all names have been received.
(erc-server-401): Forget a known user completely when the server
reports them as nonexistent.
* lisp/erc/erc-common.el (erc--get-server-user): New function, a thin
wrapper around `erc-get-server-user' for cases were inlining would
require declaring symbols not defined in erc-common.
* lisp/erc/erc.el (erc-channel-members): Mention that instances are
used for query-participant tables as well.
(erc--decouple-query-and-channel-membership-p): New variable, a
compatibility flag to access pre-5.6 query bookkeeping behavior.
(erc--ensure-query-member, erc--ensure-query-members): New functions.
(erc-cmd-QUERY): Ensure parties are present in the query buffer's
membership table if they're known to be on the server by simple virtue
of being present in some joined channel.
(erc-message-english-s352-you): New variable.
* test/lisp/erc/erc-scenarios-base-query-participants.el
(erc-scenarios-base-query-participants)
(erc-scenarios-base-query-participants/legacy): Rename former to
latter.  Enable compat flag to activate legacy query behavior in which
channel membership does not impact query membership.
(erc-scenarios-base-query-participants/coupled): New test asserting
new behavior in which channel membership dictates query
membership.  (Bug#70928)
2024-05-27 16:39:18 -07:00
F. Jason Park
75aefe6514 Reuse old query buffers for reassumed nicks in ERC
* lisp/erc/erc-backend.el
(erc--wrangle-query-buffers-on-nick-change): New function for handling
buffer renaming and message routing triggered by a nick change.  Such
twiddling used to reside in `erc-server-NICK' but has been separated
out for use by built-in modules overriding `erc-server-NICK'.  The
behavior has also changed to favor always reusing an existing query
buffer whenever possible instead of creating a new, <N>-suffixed
buffer.  This addresses some arguably unfinished business from
bug#48598.
(erc-server-NICK): Fix erroneous call to `erc-update-user-nick' that
passed the sender's login as the function's INFO argument.  Move
buffer renaming logic to `erc--wrangle-query-buffers-on-nick-change'
for use by "NICK" handlers managed by modules.  Also, print the notice
in all query buffers when the client changes its own nick.
(erc-server-QUIT): Show messages in all query buffers when the client
itself quits, but prevent `track' from updating the mode line with
redundant noise.
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fix typo in doc.
(erc--query-list): New function.
* test/lisp/erc/erc-scenarios-base-query-participants.el: New file.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-queries-solo): Revise slightly to use
modern helper API.
(erc-scenarios-base-renick-queries/reassume): New test.
(erc-scenarios-base-renick-self/merge-query): New test.
* test/lisp/erc/resources/base/query-participants/legacy.eld: New file.
* test/lisp/erc/resources/base/reconnect/options-again.eld: Adjust
timeout.
* test/lisp/erc/resources/base/renick/queries/reassume.eld: New file.
* test/lisp/erc/resources/base/renick/self/manual.eld: Update timeouts.
* test/lisp/erc/resources/base/renick/self/merge-query-a.eld: New file.
* test/lisp/erc/resources/base/renick/self/merge-query-b.eld: New file.
(Bug#70928)
2024-05-27 16:39:18 -07:00
F. Jason Park
ab78cbfabc Mention if an ERC module is local in its doc string
* lisp/erc/erc-common.el (erc--assemble-toggle)
(define-erc-module): Update language of doc string to indicate if a
module is local.
* test/lisp/erc/erc-tests.el (define-erc-module--global)
(define-erc-module--local)
(define-erc-module--local/permanent-locals): Update expected output.
2024-05-27 16:39:18 -07:00
F. Jason Park
1b633ea59a Delete original speedbar frame in erc-nickbar-mode
* lisp/erc/erc-speedbar.el (erc-speedbar-buttons): Disable
`erc-nickbar-mode' when it's not displayed in a window.
(erc-speedbar--highlight-self-and-ops): Check `status' slot of
`erc-channel-user' object instead of calling accessors.
(erc-speedbar--hidden-speedbar-frame)
(erc-speedbar--emulate-speedbar): Add doc string.
(erc-speedbar--handle-delete-frame): New function.
(erc-speedbar--toggle-nicknames-sidebar): Remove function because its
conditional logic was needlessly complicated and is no longer needed.
(erc-speedbar--ensure): Create `speedbar-buffer' when needed, and
delete the original frame, but still keep a reference to it in
`erc-speedbar--hidden-speedbar-frame'.  Set
`dframe-delete-frame-function' to own handler.
(erc-speedbar--shutting-down-p): Remove unused variable.
(erc-speedbar--run-timer-on-post-insert)
(erc-speedbar--prod-dframe-timer): Rename former to latter.  Return
nil, and accept any number of args.
(erc-nickbar-mode, erc-nickbar-disable): Tear down completely when
disabling, regardless of universal argument.  This changes user-facing
behavior that was originally introduced with this module as part of
bug#63595.  Run `erc-speedbar--prod-dframe-timer' on
`erc-server-PONG-functions' as well as `erc-insert-post-hook' so that
the panel will eventually update if no messages are being received.
(erc-speedbar--dframe-controlled): Don't make frame visible because
it's been deleted and was never made invisible.
* test/lisp/erc/erc-scenarios-status-sidebar.el
(erc-scenarios-status-sidebar--nickbar): Update assertions.
2024-05-27 16:39:18 -07:00
F. Jason Park
8c54a79ec1 Return nil from more ERC response handlers
* etc/ERC-NEWS: Mention that certain aberrant response handlers now
return nil.
* lisp/erc/erc-backend.el (define-erc-response-handler): Mention that
body should explicitly return nil.
(erc-server-PART)
(erc-server-PING): Return nil.
* lisp/erc/erc-sasl.el (erc-sasl--destroy): Return nil.
* lisp/erc/erc.el (erc-display-message): Mention in doc string that
the return value is undefined.
(erc-kill-channel-hook): Fix package-version.
* test/lisp/erc/erc-networks-tests.el (erc-networks--set-name): Ensure
`erc--route-insertion' returns nil because this influences whether
response-handler hooks continue running.
* test/lisp/erc/erc-sasl-tests.el
(erc-sasl-create-client-ecdsa): Fix regression that made test
unusable, although it's still relatively useless and therefore skipped
by default.
* test/lisp/erc/erc-services-tests.el
(erc-services-tests--auth-source-standard)
(erc-services-tests--auth-source-announced): Clarify annotations.
* test/lisp/erc/erc-tests.el (erc-message): Don't return non-nil in
mocked `erc-display-message'.
(erc-send-modify-hook): Shadow `erc-send-modify-hook' because
`erc-stamp--date-mode' modifies it locally.
2024-05-27 16:39:18 -07:00
Stefan Kangas
225b426f25 ; Fix typos 2024-05-27 10:11:15 +02:00
Lin Sun
b241ec0e78 Enhance 'python-shell-send-block' for convenience
* lisp/progmodes/python.el (python-shell-send-block):
'python-shell-send-block' will now send block without header
by default.
* test/lisp/progmodes/python-tests.el
(python-test--shell-send-block): Update the test case.
(Bug#71083)
2024-05-26 11:23:12 +03:00
Jim Porter
57dc1ed665 Fix a race condition when evaluating Eshell commands
* lisp/eshell/esh-cmd.el (eshell-do-eval): Don't defer when all the
processes are done.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/pipeline-wait/nested-pipes): New test.
2024-05-25 13:46:24 -07:00
Michael Albinus
91509d5d2a Make Tramp's async processes more robust
* lisp/simple.el (shell-command-sentinel): Check process property
`remote-command' first.

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process):
Set sentinel `ignore'.  (Bug#71049)

* test/lisp/net/tramp-tests.el
(tramp--test-deftest-direct-async-process): Don't suppress
internal sentinel.
(tramp-test32-shell-commanddirect-async): Don't tag it :unstable.
2024-05-25 17:23:30 +02:00
Eli Zaretskii
ed7e576975 Merge from origin/emacs-29
4f0121f8db Avoid assertion violations in displaying under 'outline-m...
1bf6583662 Improve documentation of 'no-special-glyphs' frame parameter
3647645e94 Fix Python font lock of chained assignment statement
3291dea441 Fix example in Calc manual
350ae75f5c Avoid crashes on MS-Windows due to invalid UNC file names
ccf8dba44a ; * lisp/face-remap.el (text-scale-adjust): Doc fix.
5ab144c77c ; Improve documentation of backing up files
2024-05-25 08:00:48 -04:00
Robin Joy
984fb346fd Erase existing duplicates in eshell-history-ring
Erase all existing duplicates instead of just the last duplicate entry
when 'eshell-hist-ignoredups' is set to 'erase'.  Multiple duplicates
can exist in case 'eshell-hist-ignoredups' was set to something else
than 'erase' in the past or if the history file contains duplicates
(bug#71107).

* lisp/eshell/em-hist.el (eshell-add-input-to-history): Remove all
duplicates from history ring.

* test/lisp/eshell/em-hist-tests.el
(em-hist-test/add-to-history/erase-existing-dups): New test.
2024-05-24 19:29:20 -07:00
kobarity
3647645e94 Fix Python font lock of chained assignment statement
* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Allow chaining
of single assignment statements.
* test/lisp/progmodes/python-tests.el
(python-font-lock-assignment-statement-20): New test.
(Bug#71093)
2024-05-24 17:53:34 +03:00
Lin Sun
a2ca5d0198 Enhance python-tests to adapt different Python interpreters (bug#70815)
* test/lisp/progmodes/python-tests.el
(python-tests-get-shell-interpreter): New function to get Python
interpreter for testing; and also introduce new env variable
EMACS_PYTHON_INTERPRETER to support customer Python interpreter.

Co-authored-by: kobarity <kobarity@gmail.com>
2024-05-23 16:07:52 +03:00
Eli Zaretskii
350ae75f5c Avoid crashes on MS-Windows due to invalid UNC file names
* src/w32.c (parse_root): Avoid crashes due to invalid (too short)
UNC names, such as "\\".  (Bug#70914)

* test/src/fileio-tests.el (fileio-tests-invalid-UNC): New test.
2024-05-22 14:10:53 +03:00
Michael Albinus
9aeb4872d4 Fix some Tramp oddities
* lisp/net/tramp-container.el: Move connection-local settings
where they belong to.

* lisp/net/tramp-sshfs.el (tramp-connection-properties): Do not
set connection property "direct-async-process".
(tramp-direct-async-process): Set connection-local value.

* test/lisp/net/tramp-tests.el (comp-warn-primitives): Declare.
(tramp-test18-file-attributes): Use it.
2024-05-21 18:13:40 +02:00
Jim Porter
77ece5709a Support text overlays for thingatpt provider helpers
* lisp/thingatpt.el (thing-at-point-for-text-property)
(forward-thing-for-text-property)
(bounds-of-thing-at-point-for-text-property): Rename to...
(thing-at-point-for-char-property)
(forward-thing-for-char-property)
(bounds-of-thing-at-point-for-char-property): ... and add overlay
support.  Update callers.

* test/lisp/thingatpt-tests.el (thing-at-point-providers)
(forward-thing-providers, bounds-of-thing-at-point-providers): Test
overlays too.

* test/lisp/progmodes/bug-reference-tests.el (test-thing-at-point): Test
'bounds-of-thing-at-point' and 'forward-point'.

* etc/NEWS: Update function names in announcement.
2024-05-20 13:24:11 -07:00
Jim Porter
f6c60f16a2 Improve implementation of 'forward-thing' using custom providers
Now, call all the custom providers for each step, using the provider
that moves point the smallest non-zero amount.  This allows multiple
providers for a given "thing" to work nicely together.

* lisp/thingatpt.el (forward-thing-provider-alist): Update docstring.
(forward-thing): New implementation to call each provider N times.
(forward-thing-for-text-property): Take BACKWARD instead of N.  Update
callers.

* test/lisp/thingatpt-tests.el (thing-at-point-providers)
(forward-thing-providers): Add more checks.
(consecutive-things-at-point): New test.
2024-05-20 13:24:11 -07:00
Michael Albinus
3c238f7c50 Tramp code cleanup
* lisp/net/tramp-sh.el (tramp-find-shell, tramp-find-inline-compress)
(tramp-get-remote-path):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
Use `tramp-warning'.

* test/lisp/net/tramp-tests.el (tramp--test-container-p):
Add "kubernetes", "run0" and "nspawn".
(tramp--test-toolbox-p): New defun.
(tramp-test45-asynchronous-requests): Use it.
(tramp--test-check-files): Adapt regexp.
2024-05-20 16:22:17 +02:00
Juri Linkov
91e02dde5f New tests for nested archives (bug#70987)
* test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-zip-and-gz):
* test/lisp/arc-mode-tests.el (arc-mode-test-zip-extract-tar-and-gz):
New tests.
* test/data/decompress/tzg.tar.gz:
* test/data/decompress/ztg.zip:
New data files to test decompressing of different combinations
of nested tar and zip archives.
2024-05-20 09:22:41 +03:00
Jim Porter
ae9045a8bd Allow defining custom providers for more "thingatpt" functions
This also fixes an issue in EWW and bug-reference-mode where
(thing-at-point 'url) at the end of a URL would return nil.

See <https://lists.gnu.org/archive/html/emacs-devel/2024-02/msg00200.html>.

* lisp/thingatpt.el (forward-thing-provider-alist)
(bounds-of-thing-at-point-provider-alist): New variables...
(forward-thing, bounds-of-thing-at-point): ... use them.
(text-property-search-forward, text-property-search-backward)
(prop-match-beginning, prop-match-end): Declare.
(thing-at-point-for-text-property, forward-thing-for-text-property)
(bounds-of-thing-at-point-for-text-property): New functions.

* lisp/net/eww.el (eww--url-at-point): Use
'thing-at-point-for-text-property'.
(eww--bounds-of-url-at-point, eww--forward-url): New functions...
(eww-mode): ... use them.

* lisp/progmodes/bug-reference.el (bug-reference--url-at-point): Use
'thing-at-point-for-text-property'.
(bug-reference--bounds-of-url-at-point, bug-reference--forward-url): New
functions...
(bug-reference--init): ... use them.

* test/lisp/thingatpt-tests.el (thing-at-point-providers)
(forward-thing-providers, bounds-of-thing-at-point-providers): New
tests.

* etc/NEWS: Announce this change.
2024-05-19 18:31:58 -07:00
Michael Albinus
c4cc905d6b Add connection-local variable `tramp-direct-async-process'
* doc/misc/tramp.texi (Predefined connection information):
Remove "direct-async-process".
(Remote processes): Explain connection-local variable
tramp-direct-async-process.

* etc/NEWS: Add connection-local variable 'tramp-direct-async-process'.

* lisp/net/tramp-compat.el (tramp-compat-connection-local-p): Sync with
Emacs source.
(tramp-compat-connection-local-value): New defalias.

* lisp/net/tramp-message.el (tramp-warning): New defsubst.

* lisp/net/tramp.el (tramp-direct-async-process): New defvar.
(tramp-direct-async-process-p): Use connection-local variable for
check.  (Bug#70959)

* test/lisp/net/tramp-tests.el
(tramp--test-deftest-direct-async-process):
Use connection-local-variable `tramp-direct-async-process'.
2024-05-19 14:13:03 +02:00
Robert Church
c5e5940ba4 Add Oklab color space utility functions in color.el.
* lisp/color.el (color-oklab-to-xyz, color-oklab-to-srgb)
(color-srgb-to-oklab): New functions.  (Bug#70963)

* test/lisp/color-tests.el (color-tests-oklab-to-xyz)
(color-tests-xyz-to-oklab, color-tests-srgb-to-oklab)
(color-tests-oklab-to-srgb): New tests.
2024-05-19 11:14:56 +03:00
F. Jason Park
fee637468b Reconcile erc-stamp--date-stamps when merging buffers
* etc/ERC-NEWS: Mention new face `erc-information'.
* lisp/erc/erc-button.el (erc-button-add-buttons): Skip buttonization
when the "msg prop" `erc--skip' is present and contains the symbol
`button'.  Set `alist' to nil in the same guard condition as a
roundabout way of suppressing further processing.
* lisp/erc/erc-networks.el (erc--insert-admin-message): Forward
declaration.
(erc-networks--insert-transplanted-content)
(erc-networks--transplant-buffer-content): Replace former with latter.
Change signature to take source and destination buffers as parameters.
(erc-networks--transplant-target-buffer-function): New function-valued
variable.
(erc-networks--target-transplant-in-progress-p): New variable, a flag
for downstream code to detect when a transplant is underway.
(erc-networks--reclaim-orphaned-target-buffers): Defer to
`erc-networks--transplant-target-buffer-function' to handle the actual
transplant business.  Crucially, kill the buffer afterwards instead of
beforehand.  If new buffer-association bugs emerge related to the
combining of old or renamed target buffers, this reordering may be at
fault.
(erc-networks--copy-over-server-buffer-contents): Pass old and new
buffers to `erc-networks--insert-transplanted-content'.
* lisp/erc/erc-stamp.el
(erc-stamp--defer-date-insertion-on-post-modify): Set `fn' slot of
`erc-stamp--date' instance to `ignore' when running the actual
callback in order to conserve a little space.
(erc-stamp--date-mode): Add and remove hook members for
`erc-networks--copy-server-buffer-functions' and
`erc-networks--transplant-target-buffer-function'.
(erc-insert-timestamp-left-and-right): Always clear
`erc-timestamp-last-inserted-right' to ensure a right stamp
accompanies every date stamp.
(erc-stamp--dedupe-date-stamps)
(erc-stamp--dedupe-date-stamps-from-buffer)
(erc-stamp--dedupe-date-stamps-from-target-buffer): New functions.
Date stamp behavior was revamped as part of bug#60936.
* lisp/erc/erc.el (erc-informational): New face.
(erc--insert-admin-message): New function to hide some "msg prop"
complexity from "upstream" libraries, like `erc-networks', and thus
avoid more forward-declarations.  A less smelly approach would be to
devise a general interface owned by such libraries, or erc-common,
that `erc-mode' could then hook into on init.
(erc-display-message-highlight): Make face matching more limber to
accommodate the convention of face names lacking a "-face" suffix.
(erc-message-english-graft): New variable.
(erc-kill-channel): Inhibit execution of hook when
`erc-networks--target-transplant-in-progress-p' is non-nil.
* test/lisp/erc/erc-networks-tests.el
(erc-networks--rename-server-buffer--no-existing--orphan)
(erc-networks--rename-server-buffer--existing--reuse)
(erc-networks--rename-server-buffer--local-match)
(erc-networks--rename-server-buffer--local-nomatch): Use helper to
initialize markers.
* test/lisp/erc/erc-stamp-tests.el (erc-stamp--dedupe-date-stamps):
New test.  (Bug#70928)
2024-05-18 15:48:05 -07:00
F. Jason Park
cf7cc4c630 Don't kill server buffer with erc-kill-buffer-on-part
* etc/ERC-NEWS: Mention new flag `erc-killing-buffer-on-part-p' and
the renaming of `erc-kill-channel'.
* lisp/erc/erc-backend.el (erc-server-PART): Only kill a buffer on
behalf of `erc-kill-buffer-on-part' when the buffer hasn't already
been killed, and bind `erc-killing-buffer-on-part-p' to t when doing
so.
* lisp/erc/erc-log.el (erc-conditional-save-buffer): Don't save logs
when the buffer parameter is nil because that causes the server buffer
to be saved out.  It's possible that user code relying on this
longstanding bug will be affected, however, by default, the server
buffer will also be saved out independently at designated junctures.
* lisp/erc/erc.el (erc-part-hook): Redo doc string.
(erc-killing-buffer-on-part-p): New variable, a flag to prevent
redundant execution of `erc-kill-channel-hook' members concerned with
parted channels.
(erc-kill-buffer-on-part): Tweak doc string.
(erc-kill-channel-hook): Use new name for `erc-kill-channel',
`erc-part-channel-on-kill'.
(erc-kill-channel, erc-part-channel-on-kill): Rename former to latter,
and inhibit execution when `erc-killing-buffer-on-part-p' is non-nil.
* test/lisp/erc/erc-scenarios-base-kill-on-part.el: New file.
(Bug#70840)
2024-05-18 15:48:05 -07:00
kobarity
c97e7a2da2 Improve fontification of Python assignments with type hints
* lisp/progmodes/python.el (python-font-lock-keywords-maximum-decoration):
Fontify type hints of assignment statement.  (Bug#69357)
* test/lisp/progmodes/python-tests.el
(python-font-lock-assignment-statement-11)
(python-font-lock-assignment-statement-12)
(python-font-lock-assignment-statement-13)
(python-font-lock-assignment-statement-18): Add fontification of type
hints.
(python-font-lock-assignment-statement-19): New test.
2024-05-18 22:22:34 +02:00
Tony Zorman
a019d2bd56 use-package: Add ':ignored-files' support to ':vc' keyword
* lisp/use-package/use-package-core.el (use-package-split-when):
New utility function to split a list whenever a specified
predicate returns t.
(use-package-vc-valid-keywords): A new defconst to gather all
allowed keywords.
(use-package-normalize--vc-arg): Properly normalize the
':ignored-files' keyword, in that the following are all valid
ways of entering files:
  :ignored-files "a"
  :ignored-files ("a")
  :ignored-files "a" "b" "c"
  :ignored-files ("a" "b" "c")
(use-package-normalize/:vc): Adjust normalization, now that we
do not necessarily receive a valid plist as an input.  (Bug#66567)

* test/lisp/use-package/use-package-tests.el
(use-package-test-normalize/:vc): Add tests for ':ignored-files'
keyword.
2024-05-18 13:30:45 +03:00
Joost Kremers
4f27d763bb Make 'vtable-insert-object' more versatile
* lisp/emacs-lisp/vtable.el (vtable-insert-object): Rename
argument AFTER-OBJECT to LOCATION; allow use of index to
refer to the insertion position; add argument BEFORE.
(Bug#70664).

* etc/NEWS:
* doc/misc/vtable.texi (Interface Functions): Document the
change.

* test/lisp/emacs-lisp/vtable-tests.el
(test-vtable-insert-object): New test.
2024-05-18 11:52:33 +03:00
Dmitry Gutov
646b8da4a5 xref--group-name-for-display: Undo most of the latest change
* lisp/progmodes/xref.el (xref--group-name-for-display):
Remove the DD-SUFFIX parameter, returning the function more like
to how it was (bug#69233).
(xref--analyze, xref--add-log-current-defun):
Revert the previous change accordingly.

* test/lisp/progmodes/xref-tests.el: Undo the last change.
2024-05-18 03:32:48 +03:00
Jim Porter
2f7d011d18 Add new Eshell built-in command 'funcall'
* lisp/eshell/esh-cmd.el (eshell/funcall): New function...

* test/lisp/eshell/em-glob-tests.el (em-glob-test/expand/splice-results)
(em-glob-test/expand/no-splice-results)
(em-glob-test/expand/explicitly-splice-results)
(em-glob-test/expand/explicitly-listify-results):
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/quoted-interp-lisp-indices)
(esh-var-test/quoted-interp-cmd-indices)
(esh-var-test/interp-convert-quoted-var-number)
(esh-var-test/quoted-interp-convert-var-number)
(esh-var-test/quoted-interp-convert-quoted-var-number)
(esh-var-test/last-status-var-lisp-command)
(esh-var-test/last-result-var-split-indices)
(esh-var-test/last-arg-var-split-indices): ... use it in tests.

* doc/misc/eshell.texi (List of Built-ins): Describe this command.
2024-05-16 20:33:18 -07:00
Robert Pluim
cdf49336cd Add multi/unibyte string tests for key-description
* test/src/keymap-tests.el (keymap--key-description): Add multi/unibyte
tests.

This is to check the fix for Bug#59305.
2024-05-16 14:29:10 +02:00
Jim Porter
e260bf1be7 Use "/local:" prefix in Eshell to run local commands when cwd is remote
* lisp/eshell/esh-ext.el (eshell-explicit-remote-commands)
(eshell-explicit-command): Update docstrings.
(eshell--local-prefix): New constant.
(eshell-handle-remote-command): Remove.
(eshell-quoted-file-command): New function...
(eshell-ext-initialize): ... add it as a hook.
(eshell-remote-command): Support running commands on localhost.
(eshell-connection-local-command): Rename from
'eshell-external-command'.
(eshell-external-command): New implementation calling
'eshell-remote-command' or 'eshell-connection-local-command' as
appropriate.

* test/lisp/eshell/esh-ext-tests.el
(esh-ext-test/explicitly-local-command): Update test.

* doc/misc/eshell.texi (Remote Access): Update documentation.

* etc/NEWS: Update announcement.
2024-05-15 18:50:54 -07:00
Dmitry Gutov
e86c4d8bdc ; Fix the xref--group-name-for-display tests 2024-05-13 16:16:39 +03:00
Mattias Engdegård
49e243c0c8 Avoid resizing mutation in subst-char-in-string, take two
This time we take care to preserve properties, and add a test.

* lisp/subr.el (subst-char-in-string):
Use string-replace to avoid resizing mutation and O(n^2) time.
* test/lisp/subr-tests.el (subr--subst-char-in-string): New test.
2024-05-13 12:39:41 +02:00
Dmitry Gutov
b20d4ab374 Fix 'C-u C-x p g' globally and 'A' in dired-mode
* lisp/progmodes/project.el (project-find-regexp): Ensure the
DEFAULT-DIRECTORY is set correctly for the 'C-u' case (bug#70888).

* lisp/progmodes/project.el (project--files-in-directory):
Ensure that the DIR argument ends with a slash --
'dired-do-find-regexp' passes it differently, for example.

* lisp/progmodes/xref.el (xref--group-name-for-display): Ensure
the project-relative and absolute display modes work well for
groups with "relative" file names.
(xref--analyze, xref--add-log-current-defun): Change accordingly.

* test/lisp/progmodes/project-tests.el
(project-find-regexp-with-prefix): New test.
2024-05-12 20:56:55 +03:00
Mattias Engdegård
9365feadcc Silence some macOS build warnings
* src/image.c (native_image_type): Declare static.
* src/keyboard.c (lispy_function_keys): Declare static on NS.
* src/nsmenu.m (context_menu_value):
* src/nsterm.m (ns_frame_parm_handlers): Move extern declarations...
* src/nsterm.h: ...here.
* test/src/emacs-module-resources/mod-test.c: Add extern declaration.
2024-05-12 15:04:47 +02:00
kobarity
6380806196 Support Python 3 in 'package-test-update-archives-async'
* test/lisp/emacs-lisp/package-resources/package-test-server.py:
Support Python 3.
* test/lisp/emacs-lisp/package-tests.el
(package-test-update-archives-async): Search for an executable
named "python", "python3", or "python2".  (Bug#70722)

Co-authored-by: Lin Sun <sunlin7@hotmail.com>
2024-05-11 13:06:08 +03:00
Jim Porter
42c0686d61 ; Fix an edge case with Eshell globs when the directory part is quoted
* lisp/eshell/esh-util.el (eshell-split-filename): Escaping shouldn't
matter for splitting the name (no other shells handle it like this).

* test/lisp/eshell/em-glob-tests.el
(em-glob-test/convert/quoted-start-directory): New test.
2024-05-09 17:15:14 -07:00
john muhl
73d2b829f0
Improve indentation in 'lua-ts-mode' (bug#70785)
* lisp/progmodes/lua-ts-mode.el (lua-ts--simple-indent-rules):
- Ignore comments when aligning arguments, parameters and fields.
- Apply simpler rules to simpler usage of anonymous functions.
- Better handling of table as a function argument.
(lua-ts--comment-first-sibling-matcher):
(lua-ts--first-real-sibling-anchor):
(lua-ts--last-arg-function-call-matcher):
(lua-ts--top-level-function-call-matcher): New function.
(lua-ts--g-parent):
(lua-ts--g-g-parent): New function.
(lua-ts--g-g-g-parent): Use it.
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
Add tests.
2024-05-08 20:36:37 -07:00
john muhl
4eb363acc8
; Quietly skip 'lua-ts-mode' tests (bug#70786)
* test/lisp/align-tests.el (align-lua):
* test/lisp/progmodes/lua-ts-mode-tests.el
(lua-ts-test-indentation):
(lua-ts-test-movement):
(lua-ts-test-font-lock):
(lua-ts-test-which-function): Suppress warnings when the grammar is not
installed.
2024-05-08 20:36:37 -07:00
F. Jason Park
caddc4e727 Add format-catalog entry for unknown chan mode in ERC
* lisp/erc/erc.el (erc--process-channel-modes): Use format spec
catalog entry, and convert char to string.
(erc-message-english-channel-mode-unknown): New variable.
;; * test/lisp/erc/erc-scenarios-base-renick.el
;; (erc-scenarios-base-renick-queries-solo): Adjust timeout.
;; * test/lisp/erc/erc-scenarios-ignore.el (erc-scenarios-ignore/basic):
;; Adjust timeouts.
;; * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-flood):
;; Adjust timeouts.
;; * test/lisp/erc/resources/base/assoc/bouncer-history/barnet.eld:
;; Adjust timeouts.
;; * test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld:
;; Adjust timeouts.
;; * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-run-basic):
;; Adjust timeouts.
;; * test/lisp/erc/resources/sasl/plain.eld: Adjust timeouts.
;; * test/lisp/erc/resources/sasl/external.eld: Adjust timeout.
;; * test/lisp/erc/resources/base/auth-source/foonet.eld: Adjust
;; timeout.
2024-05-08 17:11:26 -07:00
Michael Albinus
339b8349f4 More Tramp optional methods
* doc/misc/tramp.texi (Inline methods) <krlogin, ksu>:
(External methods) <fcp, nc>: These are optional methods.

* etc/NEWS: Mention more optional Tramp methods.

* lisp/net/tramp-androidsu.el (tramp-enable-androidsu-method):
Use proper regexp for `tramp-default-user-alist'.

* lisp/net/tramp-sh.el (tramp-enable-nc-method)
(tramp-enable-ksu-method, tramp-enable-krlogin-method)
(tramp-enable-fcp-method): New defuns.  Move respective
configurations there.

* lisp/net/tramp.el (tramp-enable-method): Implement completion
for interactive use.

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults)
(tramp-test03-file-name-host-rules): Extend tests.
2024-05-08 13:44:15 +02:00
Arash Esbati
ead7252353 Support biblatex field in `reftex-cite-format'
* lisp/textmodes/reftex-cite.el (reftex-format-citation):
Recognize the alternative "journaltitle" field which is preferred
by biblatex.  (bug#38762)

* test/lisp/textmodes/reftex-tests.el
(reftex-format-citation-test): Adjust test.
2024-05-07 15:50:03 +02:00
Michael Albinus
4808c63d43 Add Tramp method "apptainer"
* doc/misc/tramp.texi (Top, Configuration): Add "Optional methods".
(Optional methods): New section.
(Inline methods) <androidsu, toolbox, flatpak>: These are optional
methods.
(Inline methods) <apptainer>: Add.

* etc/NEWS: New Tramp method "apptainer".
Some Tramp methods are optional.
Fix typos.

* lisp/net/tramp-androidsu.el (tramp-enable-androidsu-method):
New defun.  Call it when `system-type' is `android'.

* lisp/net/tramp-container.el (tramp-apptainer-program): New defcustom.
(tramp-apptainer-method): New defconst.
(tramp-apptainer--completion-function)
(tramp-enable-toolbox-method, tramp-enable-flatpak-method)
(tramp-enable-apptainer-method): New defuns.

* lisp/net/tramp.el (tramp-enable-method): New defun.

* test/lisp/net/tramp-tests.el (tramp--test-container-p):
Add "apptainer".
(tramp--test-supports-processes-p): Extend function.
2024-05-07 09:56:05 +02:00
Alan Mackenzie
67e1b9d055 `read': give fuller error message for errors following "#".
This solves bug#70702.

* src/lread.c (READ_AND_BUFFER, INVALID_SYNTAX_WITH_BUFFER):
New macros.
(read0): For errors in characters sequences beginning with "#",
output the entire character sequence rather than just "#".

* test/src/lread-tests.el (lread-test-bug70702): New test.
2024-05-06 20:14:57 +00:00
Jim Porter
1529ad0315 Fix Eshell handling of remote files like "/ssh:remote:~/file.txt"
* lisp/eshell/em-glob.el (eshell-glob-convert): Use 'concat' instead of
'file-name-concat' to avoid extraneous slashes.
(eshell-extended-glob): Bail out if we didn't find a glob after all.

* test/lisp/eshell/em-glob-tests.el (tramp): Require.
(em-glob-test/convert/remote-start-directory): Use the mock remote
connection.
(em-glob-test/remote-user-directory): New test.
2024-05-05 13:21:55 -07:00
Dmitry Gutov
696b1cb8de project-find-regexp: Fix test
* test/lisp/progmodes/project-tests.el (project-find-regexp):
Add binding for project-list-file, to fix the test when running
in the terminal (reported on the mailing list).
2024-05-05 19:43:06 +03:00
Dmitry Gutov
370b216f08 New variable 'project-files-relative-names'
* lisp/progmodes/project.el (project-files-relative-names):
New variable (bug#69233).
(project--files-in-directory): Honor it.
(project--vc-list-files): Here too.
(project-find-regexp): Use it to improve performance.
(project-or-external-find-regexp): Add a TODO.
(project-find-file): Use it here too.
(project--read-file-cpd-relative, project--read-file-absolute):
Try to handle file lists with absolute and relative files names.
(project-find-file-in): Set default-directory, so relative names
are interpreted correctly.

* lisp/progmodes/xref.el (xref-matches-in-files):
Consider that the first in FILES can be a relative file name.

* test/lisp/progmodes/project-tests.el (project-find-regexp):
New test.

* etc/NEWS: Mention it.
2024-05-05 06:27:55 +03:00
Mattias Engdegård
fd859fbea2 Allow letrec binding without init expression
For example, (letrec (... (x) ...) ...) is now allowed.

* lisp/subr.el (letrec): Allow omitted init expression.
* test/lisp/subr-tests.el (subr--tests-letrec): Add test case.
2024-05-04 14:39:24 +02:00
F. Jason Park
068e44ed75 ; Set explicit hook depth for erc-once-with-server-event
* lisp/erc/erc.el (erc-once-with-server-event): Set hook depth to -95.
* test/lisp/erc/erc-scenarios-base-association-nick.el: Improve
comment.
* test/lisp/erc/resources/erc-d/erc-d-tests.el
(erc-d--render-entries): Remove do-nothing assertion since its purpose
was unclear and likely dubious, as was incidentally highlighted by the
addition of a function not present on older Emacsen, which this test
still needs to run on.
2024-05-02 19:21:48 -07:00
Eli Zaretskii
59c18389bd ; Fix last change
* lisp/progmodes/python.el (python-shell-send-block): Doc fix.

* test/lisp/progmodes/python-tests.el
(python-test--shell-send-block): Avoid byte-compiler warnings.
(Bug#70609)
2024-05-02 13:04:15 +03:00
Lin Sun
b2e92c746e New function 'python-shell-send-block' for python-mode
* lisp/progmodes/python.el (python-shell-send-block): New
function.
* test/lisp/progmodes/python-tests.el
(python-test--shell-send-block): Test case for the new
function.
* etc/NEWS: Document 'python-shell-send-block'.
(Bug#70609)
2024-05-02 12:56:31 +03:00
Lin Sun
0e0fe20040 ; Fix python test case for testing completion with ipython
* test/lisp/progmodes/python-tests.el
(python-shell-completion-at-point-ipython): Fix value of
'python-test-shell-interpreter'.  (Bug#70578)
2024-05-02 12:04:52 +03:00
Noah Peart
0f92d433d2
Add font-locking for typed parameters in python-ts-mode (bug#70665)
* lisp/progmodes/python.el (python--treesit-settings): Add
tree-sitter font-locking rule for typed parameters.
* test/lisp/progmodes/python-tests.el
(python-ts-mode-types-face-1): Test for
font-lock-variable-name-face in typed parameter.
2024-05-01 21:26:29 -07:00
Basil L. Contovounesios
04635f399b ; Silence obsoletion warning in mwheel-tests. 2024-05-01 13:08:30 +02:00
Po Lu
b36fd07560 Fix deletion of text holding `inhibit-read-only' properties
* src/intervals.h (INTERVAL_VISIBLE_P): Split into ...
(INTERVAL_GENERALLY_WRITABLE_P, INTERVAL_EXPRESSLY_WRITABLE_P):
... two new macros.

* src/textprop.c (verify_interval_modification): If the buffer
is read only, verify not that there is only a single exempting
interval spanning the area of a multiple-character operation,
but that every intervening interval in such an operation exempts
it from write restrictions, either by providing a read-only
property that appears in Vinhibit_read_only, or by providing an
inhibit-read-only property.

* test/src/textprop-tests.el (textprop-interval-immutability):
New test.
2024-04-30 18:28:05 +08:00
Michael Albinus
d844521abd Improve treesitter tests on EMBA
* test/infra/Makefile.in (subdir_template):
* test/infra/gitlab-ci.yml (.tree-sitter-template): Check also
textmodes subdirectory for treesitter files.

* test/infra/test-jobs.yml: Regenerate.
2024-04-30 09:25:53 +02:00
Michael Albinus
c4eecbf684 * test/README (EMACS_EXTRAOPT): Add environment variable. 2024-04-30 09:25:07 +02:00
Stefan Monnier
7c835291dd oclosure-tests.el: Adjust to new interpreted-function type
* test/lisp/emacs-lisp/oclosure-tests.el (oclosure-test-gen): Adjust to
new `interpreted-function` type.
(oclosure-test): Tweak accordingly.
2024-04-29 13:35:12 -04:00
Mattias Engdegård
3be382311f Declare the variable rx-constituents obsolete.
It has been effectively obsolete since Emacs 27, when the modern
extension mechanism was introduced.

* lisp/emacs-lisp/rx.el (rx-constituents): Make obsolete.
* test/lisp/emacs-lisp/rx-tests.el (rx-constituents): Suppress warning.
* etc/NEWS: Announce.
2024-04-29 14:29:53 +02:00
Mattias Engdegård
9b1e44c7fb Fix value< string comparison ungoodthink
* src/fns.c (string_cmp): Fix bad comparisons for certain strings.
This only affected `value<` for aggregates, not `string<`.
* test/src/fns-tests.el (fns-value<-ordered): Add test cases.
2024-04-29 14:29:52 +02:00
Stefan Monnier
f2bccae22b Use a dedicated type to represent interpreted-function values
Change `function` so that when evaluating #'(lambda ...)
we return an object of type `interpreted-function` rather than
a list starting with one of `lambda` or `closure`.
The new type reuses the existing PVEC_CLOSURE (nee PVEC_COMPILED)
tag and tries to align the corresponding elements:

- the arglist, the docstring, and the interactive-form go in the
  same slots as for byte-code functions.
- the body of the function goes in the slot used for the bytecode string.
- the lexical context goes in the slot used for the constants of
  bytecoded functions.

The first point above means that `help-function-arglist`,
`documentation`, and `interactive-form`s don't need to
distinguish interpreted and bytecode functions any more.

Main benefits of the change:

- We can now reliably distinguish a list from a function value.
- `cl-defmethod` can dispatch on `interactive-function` and `closure`.
  Dispatch on `function` also works now for interpreted functions but still
  won't work for functions represented as lists or as symbols, of course.
- Function values are now self-evaluating.  That was alrready the case
  when byte-compiled, but not when interpreted since
  (eval '(closure ...)) signals a void-function error.
  That also avoids false-positive warnings about "don't quote your lambdas"
  when doing things like `(mapcar ',func ...)`.

* src/eval.c (Fmake_interpreted_closure): New function.
(Ffunction): Use it and change calling convention of
`Vinternal_make_interpreted_closure_function`.
(FUNCTIONP, Fcommandp, eval_sub, funcall_general, funcall_lambda)
(Ffunc_arity, lambda_arity): Simplify.
(funcall_lambda): Adjust to new representation.
(syms_of_eval): `defsubr` the new function.  Remove definition of `Qclosure`.

* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
Change calling convention and use `make-interpreted-closure`.

* src/data.c (Fcl_type_of): Distinguish `byte-code-function`s from
`interpreted-function`s.
(Fclosurep, finterpreted_function_p): New functions.
(Fbyte_code_function_p): Don't be confused by `interpreted-function`s.
(Finteractive_form, Fcommand_modes): Simplify.
(syms_of_data): Define new type symbols and `defsubr` the two
new functions.

* lisp/emacs-lisp/cl-print.el (cl-print-object) <interpreted-function>:
New method.

* lisp/emacs-lisp/oclosure.el (oclosure): Refine the parent
to be `closure`.
(oclosure--fix-type, oclosure-type): Simplify.
(oclosure--copy, oclosure--get, oclosure--set): Adjust to
new representation.

* src/callint.c (Fcall_interactively): Adjust to new representation.

* src/lread.c (bytecode_from_rev_list):

* lisp/simple.el (function-documentation):
* lisp/help.el (help-function-arglist): Remove the old `closure` case
and adjust the byte-code case so it handles `interpreted-function`s.

* lisp/emacs-lisp/cl-preloaded.el (closure): New type.
(byte-code-function): Add it as a parent.
(interpreted-function): Adjust parent (the type itself was already
added earlier by accident).

* lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Adjust to
new representation.
(byte-compile): Use `interpreted-function-p`.

* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Adjust to
new representation.
(side-effect-free-fns): Add `interpreted-function-p` and `closurep`.

* src/profiler.c (trace_hash, ffunction_equal): Simplify.
* lisp/profiler.el (profiler-function-equal): Simplify.

* lisp/emacs-lisp/nadvice.el (advice--interactive-form-1):
Use `interpreted-function-p`; adjust to new representation; and take
advantage of the fact that function values are now self-evaluating.

* lisp/emacs-lisp/lisp-mode.el (closure):
Remove `lisp-indent-function` property.

* lisp/emacs-lisp/disass.el (disassemble-internal): Adjust to
new representation.
* lisp/emacs-lisp/edebug.el (edebug--strip-instrumentation):
Use `interpreted-function-p`.
* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers):
Add `closurep` and `interpreted-function-p`.

* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): Adjust to
more precise type info in `describe-function`.
* test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d--render-entries):
Use `interpreted-function-p`.
* test/lisp/emacs-lisp/macroexp-resources/vk.el (vk-f4, vk-f5):
Don't hardcode function values.

* doc/lispref/functions.texi (Anonymous Functions): Don't suggest that
function values are lists.  Reword "self-quoting" to reflect the
fact that #' doesn't return the exact same object.  Update examples
with the new shape of the return value.

* doc/lispref/variables.texi (Lexical Binding):
* doc/lispref/lists.texi (Rearrangement):
* doc/lispref/control.texi (Handling Errors): Update examples to reflect
new representation of function values.
2024-04-28 11:58:12 -04:00
Eli Zaretskii
6dcd7de02a Merge from origin/emacs-29
cf839129ce Fix last change
3e68d413c1 ; Skip 'csharp-ts-mode' test if grammar is missing
2024-04-27 15:21:13 -04:00
Eli Zaretskii
cf839129ce Fix last change
* test/lisp/progmodes/csharp-mode-tests.el
(csharp-ts-mode-test-indentation): If need to skip the tree-sitter
test, do so silently.  (Bug#70345)
2024-04-27 22:12:14 +03:00
john muhl
3e68d413c1 ; Skip 'csharp-ts-mode' test if grammar is missing
* test/lisp/progmodes/csharp-mode-tests.el
(csharp-ts-mode-test-indentation): Skip test instead of
failing.  (Bug#70345)
2024-04-27 22:08:45 +03:00
Eli Zaretskii
687c4137fa Merge from origin/emacs-29
f37f01b504 Fix a typo in Introduction to Emacs Lisp (bug#70571).
d8687fd6cd Fix last change
494dfd9cf2 Fix indentation of if/else in 'csharp-ts-mode' (bug#70345)
1cc6322e61 ; * etc/PROBLEMS: Document crashes due to tree-sitter ABI...
42766f95e5 * build-aux/make-info-dir: Avoid bashism (bug#70484).
81476fa19e Improve documentation of selection and navigation in *xre...
2a53351492 Fix Widget manual typos, markup and omissions (bug#70502)
90be3015b4 ; Document bookmark fringe mark in the user manual
afd0b548fc Fix python-ts-mode built-in functions and attributes (bug...
dc720decc3 Fix markup and indexing in the Calendar chapter of user m...
f593bf79a9 Fix the user manual for `calendar-time-zone-style'
aed2b7a3d8 Avoid assertion violations in 'push_prefix_prop'
c929532b46 Remove ert-equal-including-properties from manual
e3aae5fd38 ; Document 'filtered-frame-list'
2024-04-27 06:23:46 -04:00
Eli Zaretskii
4e8e877c37 ; * test/lisp/jsonrpc-tests.el: Skip all tests on MS-Windows. 2024-04-27 12:28:42 +03:00
Eli Zaretskii
d8687fd6cd Fix last change
* test/lisp/progmodes/csharp-mode-tests.el
(csharp-ts-mode-test-indentation): Move the test to here.
* test/lisp/progmodes/csharp-ts-mode-tests.el: Remove file.
* test/lisp/progmodes/csharp-ts-mode-resources/indent.erts: Move
to test/lisp/progmodes/csharp-mode-resources/indent-ts.erts.
2024-04-25 18:59:25 +03:00
Jacob Leeming
494dfd9cf2 Fix indentation of if/else in 'csharp-ts-mode' (bug#70345)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--indent-rules):
Fix indentation rules for 'if' and 'else'.

* test/lisp/progmodes/csharp-ts-mode-tests.el:
* test/lisp/progmodes/csharp-ts-mode-resources/indent.erts: New
test files.

Copyright-paperwork-exempt: yes
2024-04-25 18:53:06 +03:00
john muhl
c493f28cc9 Fix which-function error in 'lua-ts-mode' (bug#70515)
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Remove incorrect
usage of 'which-func-functions'.
* test/lisp/progmodes/lua-ts-mode-tests.el
(lua-ts-test-which-function): Add test.
* test/lisp/progmodes/lua-ts-mode-resources/which-function.lua:
New file.
2024-04-25 18:39:30 +03:00
Michael Albinus
2df8bc4685 ; Remove comment in eglot-tests.el 2024-04-24 08:28:20 +02:00
Po Lu
145a77808e More effectually prevent defun list wrapping in C-x C-w
* lisp/vc/log-edit.el (log-edit-fill-entry): Match and replace
with NBSPs the opening defun list also.

* test/lisp/vc/log-edit-tests.el
(log-edit-fill-entry-no-defun-list-wrapping): New test.
2024-04-24 11:45:31 +08:00
Michael Albinus
94ed2df02f Revert skip on eglot-tests.el
* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink):
Comment out skip on EMBA.
2024-04-23 17:08:06 +02:00
João Távora
418cade239 Eglot: robustify eglot-test-basic-symlink test (bug#70036)
The previous version of this test was brittle, unstable and
didn't really fail when supposed to (because we need main.cpp to
not be visited when visiting mainlink.cpp).  This new version is
faster and more secure.

* test/lisp/progmodes/eglot-tests.el (eglot--sniffing): Add to the
jsonrpc-event-hook at the end.
(eglot-test-basic-symlink): Robustify test.
2024-04-23 08:44:43 -05:00
Michael Albinus
0e139ca741 * test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink): Skip on EMBA. 2024-04-23 13:24:35 +02:00
Michael Albinus
4a27b31c46 Some EMBA integration fixes
* test/infra/Dockerfile.emba (emacs-native-comp-speed2): Fix typo.

* test/infra/gitlab-ci.yml (.job-template): Add configure.log to
artifacts.
2024-04-23 13:24:09 +02:00
Mattias Engdegård
e442161f11 Better format string compilation warning
* lisp/emacs-lisp/bytecomp.el (byte-compile-format-warn):
Speed up by eliminating the temporary buffer.
Detect invalid format sequences.  Use plurals properly.
* test/lisp/emacs-lisp/bytecomp-tests.el: Update test.
2024-04-22 19:27:24 +02:00
Michael Albinus
6f810459d8 ; Fix last commit
* test/infra/Makefile.in:
* test/infra/gitlab-ci.yml:
* test/infra/test-jobs.yml: Do not quote make_params.
2024-04-22 16:54:07 +02:00
Michael Albinus
42c8e2dfce Rework EMBA integration
* test/infra/Dockerfile.emba (emacs-inotify, emacs-filenotify-gio)
(emacs-eglot, emacs-tree-sitter, emacs-gnustep)
(emacs-native-comp-speed0, emacs-native-comp-speed1)
(emacs-native-comp-speed2): Use "-j `nproc`".
(emacs-eglot): Add libxml2-dev and node-typescript.
(emacs-tree-sitter) Add libxml2-dev and tree-sitter-rust.

* test/infra/Makefile.in (subdir_template): Simplify make_params.

* test/infra/gitlab-ci.yml (.job-template): Set environment
variable NPROC.  Use "-k -j \$NPROC".
(test-filenotify-gio, test-eglot, test-tree-sitter)
(test-native-comp-speed2): Simplify make_params.

* test/infra/test-jobs.yml: Regenerate.
2024-04-22 13:38:10 +02:00
Noah Peart
ac2a4f61bd
Add rust-ts-mode font-locking tests (bug#70464)
* test/lisp/progmodes/rust-ts-mode-tests.el: New file for rust-ts-mode
tests.
* test/lisp/progmodes/rust-ts-mode-resources/font-lock.rs: New file
with rust-ts-mode font-locking tests. New tests added for macro
font-locking (bug#70464) and function signatures
(bug#70465).
2024-04-21 21:49:19 -07:00
Michael Albinus
21e33567fa gitlab-ci.yml adaptions
* test/infra/gitlab-ci.yml (test-filenotify-gio, test-eglot):
Add TEST_HOME.
(test-tree-sitter): Extend SELECTOR.
2024-04-20 17:49:28 +02:00
Eshel Yaron
00caec8058
New command 'completion-preview-complete'
This command completes the symbol at point up to the longest
common prefix of all completions candidates.  We also add an
indication of the longest common prefix in the completion
preview by highlighting that part of the preview with the
'completion-preview-exact' face.  To facilitate these features
we change the way we store the completion candidates while the
preview is visible, to explicitly keep the common prefix along
with a list of its suffixes.

* lisp/completion-preview.el (completion-preview--try-table):
Return longest common prefix and list of suffixes instead of
list of full candidates.  Add illustrative comment.
(completion-preview--capf-wrapper, completion-preview--update)
(completion-preview--show, completion-preview-insert)
(completion-preview-next-candidate): Adjust.
(completion-preview-common): New face.
(completion-preview-exact): Tweak to distinguish it from
'completion-preview-common'.
(completion-preview-complete): New command.
(completion-preview-active-mode-map): Bind it.
(completion-preview-mode): Mention it in docstring.
(completion-preview-commands): Add 'completion-preview-complete'.
(completion-preview--make-overlay): Simplify.
(completion-preview--internal-command-p): Remove.
(completion-preview-require-certain-commands): Update.
(completion-preview--inhibit-update): New inline function.
(completion-preview--inhibit-update-p): New local variable.
(completion-preview--post-command, completion-preview-hide):
Reset it to nil.

* test/lisp/completion-preview-tests.el
(completion-preview-tests--check-preview): Check the 'face'
property of both the first and last character.  Update callers.
(completion-preview-insert-calls-exit-function)
(completion-preview-complete): New tests.  (Bug#70381)
2024-04-20 14:32:00 +03:00
Mattias Engdegård
a4a136217d Kill process in files-tests before exiting
* test/lisp/files-tests.el
(files-tests-file-name-non-special-start-file-process):
Make sure that the subprocess is killed before the test concludes.
2024-04-20 13:12:30 +02:00
Mattias Engdegård
1bbc2fa416 Update gravatar-tests after URL escaping change (bug#70312)
* test/lisp/image/gravatar-tests.el (gravatar-default-image):
It seems we now escape less.
2024-04-20 11:07:51 +02:00
Michael Albinus
dd2f989511 * test/infra/Dockerfile.emba: Add libxml2-dev. 2024-04-20 10:05:37 +02:00
Michael Albinus
3af9c33263 Complete fix for eww-tests.el
* test/lisp/net/eww-tests.el (eww-test/readable/toggle-display)
(eww-test/readable/default-readable): Check for libxml.  (Bug#70472)
2024-04-20 09:43:30 +02:00
Eli Zaretskii
b93d568e47 ; On MS-Windows, skip eglot test that creates symlinks
* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink):
Skip this test on MS-Windows.
2024-04-20 10:25:12 +03:00
João Távora
f90008411e Eglot: tweak previous change (bug#70036)
* lisp/progmodes/eglot.el (eglot--TextDocumentIdentifier-uri):
Rename from eglot--cached-tdi.
(eglot-handle-notification): Tweak comment.  Use
eglot--TextDocumentIdentifier-uri.
(eglot--TextDocumentIdentifier)
(eglot--signal-textDocument/didOpen): Use
eglot--TextDocumentIdentifier-uri.

* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink):
Address compilation warning.  Tweak comment slightly.
2024-04-19 16:30:41 -05:00
F. Jason Park
473189ab69 Fix regression involving erc-query-buffer-p
* lisp/erc/erc.el (erc-server-or-unjoined-channel-buffer-p): Doc.
(erc-query-buffer-p): Don't return non-nil in non-ERC buffers and
server buffers, and continue to honor string arguments.  The
regression was introduced by 3d87e343 "Use modern fallback for channel
name detection in ERC".  Thanks to Libera user mekeor for reporting
this bug.
* test/lisp/erc/erc-tests.el (erc-query-buffer-p): New test.
(Bug#67220)
2024-04-19 13:54:52 -07:00
F. Jason Park
6000e48e0d Add erc--skip message property
* lisp/erc/erc-backend.el (erc-server-connect): Add `erc--skip'
property to `erc--msg-prop-overrides' so that timestamps only show up
with the first server-sent message.
(erc-server-PRIVMSG): Move `erc--msg-prop-overrides' declaration to
top-level.
* lisp/erc/erc-button.el (erc-button--display-error-notice-with-keys):
Use `erc--skip' msg prop instead of `erc-stamp--skip' variable.
* lisp/erc/erc-stamp.el (erc-stamp--skip): Remove variable.
(erc-stamp--allow-unmanaged, erc-stamp--allow-unmanaged-p): Rename
former to latter to remain consistent with convention used by other
quasi-internal compatibility-related switches.
(erc-add-timestamp): Check `erc--skip' property instead of deleted
variable `erc-stamp--skip'.
* lisp/erc/erc.el (erc--msg-props): Mention `erc--skip' in doc.
(erc--check-msg-prop): Doc.
(erc--memq-msg-prop): New function.
(erc--ranked-properties): Add `erc--skip'.
* test/lisp/erc/erc-scenarios-stamp.el
(erc-scenarios-stamp--legacy-date-stamps): Revise to expect
"opening connection.." to appear above first stamp.
* test/lisp/erc/erc-tests.el (erc--memq-msg-prop): New test.
(Bug#60936)
2024-04-19 13:54:52 -07:00
F. Jason Park
86184cba21 Don't nest date stamp insertions in erc-stamp
* etc/ERC-NEWS: Don't mention certain insertion-adjacent hooks being
suppressed for date stamps, which is no longer true.
* lisp/erc/erc-common.el (erc--solo): New utility function.
* lisp/erc/erc-fill.el (erc-fill-wrap): Don't move last-message marker
when encountering a date stamp.
* lisp/erc/erc-stamp.el (erc-stamp--recover-on-reconnect): Restore
`erc-stamp--date-stamps' on reconnect and rejoin.
(erc-stamp--insert-date-hook): Fix erroneous doc string.
(erc-stamp--date): New struct type.
(erc-stamp--deferred-date-stamp): New internal variable to pass state
between hook members.
(erc-stamp--date-stamps): New internal variable to store a reference
to all inserted timestamps.
(erc-stamp--propertize-left-date-stamp): Don't hide messages because
this function runs on `erc-insert-modify-hook'.  Prefer doing so
later, in `erc-insert-post-hook'.
(erc-stamp--find-insertion-point): New helper function.
(erc-stamp--insert-date-stamp-as-phony-message): Remove.
(erc-stamp--lr-date-on-pre-modify): Remove function.  Portions of body
now appear in `erc-stamp--defer-date-insertion-on-post-modify'.
(erc-stamp--defer-date-insertion-on-post-modify)
(erc-stamp--defer-date-insertion-on-post-insert)
(erc-stamp--defer-date-insertion-on-post-send): New functions,
although the first incorporates parts of the now defunct
`erc-stamp--lr-date-on-pre-modify'.
(erc-stamp--date-mode): Update hook-member functions.
(erc-stamp-prepend-date-stamps-p): Revise doc.
(erc-insert-timestamp-left-and-right): Remove code to initialize a
date stamp in place through a nested call to `erc-display-message'.
Instead, "pre-render" date stamp and stash it for retrieval by
the function `erc-stamp--defer-date-insertion-on-post-modify'.
(erc-stamp--setup): Kill variables `erc-stamp--deferred-date-stamp'
and `erc-stamp--date-stamps'.
(erc-stamp--reset-on-clear): Remove trimmed stamps from
`erc-stamp--date-stamps'.
* lisp/erc/erc.el (erc--msg-props): Document `erc--hide' in doc
string.
(erc--with-inserted-msg): Remove unused macro.
(erc--insert-line-splice-function): New variable.
(erc--with-spliced-insertion): New macro.
(erc--insert-line-function): Expand doc string.
(erc--remove-from-prop-value-list): Tweak doc string.
(erc--insert-before-markers-transplanting-hidden): New function.
(erc--hide-message): Remember managed `invisible' prop value.  Do so
by recording them in the `erc--hide' "msg prop".
(erc--delete-inserted-message, erc--delete-inserted-message-naively):
Rename former to latter to emphasize that it's largely impractical for
general use.
(erc--ranked-properties): Add `erc--hide'.
* test/lisp/erc/erc-button-tests.el
(erc-button-tests--erc-button-alist--function-as-form): Use
`erc-display-message' helper.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--insert-privmsg)
(erc-fill-tests--wrap-populate, erc-fill-wrap-tests--merge-action)
(erc-fill-line-spacing): Use `erc-display-message' wrappers to
intercept `erc-timer-hook' modifications.
* test/lisp/erc/erc-scenarios-match.el
(erc-scenarios-match--invisible-stamp): Add convenience commands to
`extended-command-history' when running interactively.
* test/lisp/erc/erc-tests.el
(erc--insert-before-markers-transplanting-hidden): New test.
(erc--delete-inserted-message, erc--delete-inserted-message-naively):
Update test name as well as namesake function in body.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common-with-cleanup): Validate `erc-stamp--date-stamps'
members after every scenario test.
(erc-scenarios-common--assert-date-stamps): New function.
* test/lisp/erc/resources/erc-tests-common.el: Require `erc-stamp'
atop file when compiling.
(erc-tests--common-display-message)
(erc-tests-common-display-message)
(erc-tests-common-with-date-aware-display-message): New functions and
macro for running `erc-display-message' while intercepting additions
to `erc-timer-hook' made by date-stamp-related post-insertion hooks.
(erc-tests-common-snapshot-compare): Insert expected output into its
own buffer for easier review during interactive sessions.  This change
is unrelated to the rest of this commit.  (Bug#60936)
2024-04-19 13:54:52 -07:00
F. Jason Park
21b372a57b Improve erc-fill-wrap-merge refilling and movement
* lisp/erc/erc-fill.el (erc-fill--wrap-escape-hidden-speaker): Add
parameter to suppress escaping of hidden prefixes.
(erc-fill--wrap-beginning-of-line): Remember original value of point,
and pass it to `erc-fill--wrap-escape-hidden-speaker'.
(erc-fill--wrap-previous-line, erc-fill--wrap-next-line): Guard call
to `erc-fill--wrap-escape-hidden-speaker' with conditional check for
`erc-fill-wrap-merge'.
(erc-fill--wrap-insert-merged-pre): Add additional text property,
`erc-fill--wrap-merge', to help identify `display' regions servicing
`erc-fill-wrap-merge'.  This should make resolving inconsistencies
easier when "splicing" new messages between existing ones.
(erc-fill-wrap): Add `erc-fill--wrap-merge' text property to merged
speaker region.
(erc-fill--wrap-rejigger-region): Remove assertion disallowing a
non-nil `erc-fill--wrap-rejigger-last-message'.  Instead, adopt the
existing value of that variable when shadowing it for the remaining
extent of the function's execution.  When removing the `display'
property, also look for nonempty replacement text, such as values
specified by the option `erc-fill-wrap-merge-indicator'.
(erc-fill--wrap-merged-button-p): Look for `erc-fill--wrap-merge'
property instead of `display'.
* test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update.
* test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Update.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
Update.
* test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update.
(Bug#60936)
2024-04-19 13:54:52 -07:00
F. Jason Park
c572c30fb1 Simplify option erc-merge-wrap-merge-indicator
* lisp/erc/erc-fill.el (erc-fill-wrap-merge-indicator): Reduce
offering of acceptable values by removing leading symbols and ditching
the `post' variant entirely.  The justification for the latter move
hinges on it not being well suited to next-gen requirements involving
the splicing and deletion of inserted messages.  Meeting these would
be overly burdensome and involve scanning the buffer in both
directions for every such operation.  This option is new in ERC 5.6,
which is yet unreleased.
(erc-fill--wrap-massage-legacy-indicator-type): New function to warn
of obsolete `erc-fill-wrap-merge-indicator' value and perform a
migration for the current session.
(erc-fill-wrap, erc-fill-wrap-enable): Preform preflight compat check
for obsolete `erc-fill-wrap-merge-indicator' value types.
(erc-fill-wrap-disable): Don't bother killing nonexistent variable
`erc-fill--wrap-merge-indicator-post'.
(erc-fill--wrap-merge-indicator-post): Remove unused variable.
(erc-fill--wrap-insert-merged-post): Remove unused function.
(erc-fill--wrap-insert-merged-pre): Adapt to simplified format for
option `erc-merge-wrap-merge-indicator'.
(erc-fill-wrap): Remove conditional dispatch because there is only one
path and only one indicator style.
(erc-fill--wrap-rejigger-region): Remove reference to nonexistent
variable `erc-fill--wrap-merge-indicator-post'.
* test/lisp/erc/erc-fill-tests.el
(erc-fill-wrap--merge-action/indicator-pre): Update format of value
for option `erc-fill-wrap-merge-indicator'.
(erc-fill-wrap--merge-action/indicator-post): Remove test focusing on
obsolete and unsupported `post' variant of option
`erc-fill-wrap-merge-indicator'.
(erc-fill--wrap-massage-legacy-indicator-type): New test.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld:
Delete file.  (Bug#60936)
2024-04-19 13:54:52 -07:00
F. Jason Park
ff1d1f6df1 ; Improve erc-services and upgrade documentation
* doc/misc/erc.texi (Getting Help and Reporting Bugs): Describe
alternate method for upgrading from GNU ELPA.  This is a partial
workaround for bug#68660 discovered by ERC contributor Alcor.
* lisp/erc/erc-backend.el (erc-call-hooks): Add comment.
* lisp/erc/erc-services.el (erc-nickserv-alist): Doc.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-queries-bouncer): Adjust timeout.
2024-04-19 13:54:52 -07:00
Theodor Thornhill
49ef173b02 Make publishDiagnostics faster by using cached variable
* lisp/progmodes/eglot.el (eglot--cached-tdi): Move variable.
(eglot-handle-notification): Expose 'server' and search through managed
buffers for a cached textDocumentIdentifier, which has a file-truename
resolved path.
* test/lisp/progmodes/eglot-tests.el (eglot-test-basic-symlink): Add
regression test for symlink behavior
2024-04-19 22:21:38 +02:00
Jim Porter
82775f2141 ; * test/lisp/net/eww-tests.el (eww-test/display/html): Check for libxml. 2024-04-19 10:37:16 -07:00
Stefan Monnier
c833892140 (eglot--signal-textDocument/didChange): Fix tests
The tests call `eglot--signal-textDocument/didChange` eagerly,
which means in the case where we use `track-changes` that they
call it before the tracker's signal has been called.
So make sure we fetch pending changes even if we haven't yet
been notified of them, and make sure `eglot--versioned-identifier`
is incremented even when the signal is not called.

* lisp/progmodes/eglot.el (eglot--track-changes-fetch)
(eglot--after-change): Increment `eglot--versioned-identifier` here...
(eglot--track-changes-signal): ...instead of here.
(eglot--signal-textDocument/didChange): Try and fetch changes even if the
tracker's signal wasn't called yet.

* test/lisp/progmodes/eglot-tests.el (eglot-tests--get): New function.
(eglot-tests--lsp-abiding-column-1): Use it.
2024-04-18 23:39:30 -04:00
Stephen Berman
94dec95317 Don't error on tabbing to a widget at BOB (bug#69943)
* lisp/wid-edit.el (widget-move): Don't move backward when at
beginning of buffer, and keep point on widget's left side.

* test/lisp/wid-edit-tests.el (widget-test-widget-move): Test that
moving to a widget at beginning of buffer does not signal a
beginning-of-buffer error.
2024-04-18 15:35:49 +02:00
Dagfinn Ilmari Mannsåker
40629706b1 Avoid unnecessary escaping in 'url-build-query-string'
* lisp/url/url-util.el (url-query-key-value-allowed-chars):
New defconst.
(url-build-query-string): Use it to escape only those
characters that need it in keys and values.
* test/lisp/url/url-util-tests.el (url-util-tests): Add
new test cases.  (Bug#70312)
2024-04-18 13:04:13 +03:00
Michael Albinus
b47b8159d8 Adapt tree-sitter job on EMBA
* test/infra/gitlab-ci.yml (.tree-sitter-template)
(test-tree-sitter): Adapt tree-sitter job.
2024-04-16 10:55:37 +02:00
Basil L. Contovounesios
98b90fc853 ; Fix last change to secrets-tests.el. 2024-04-15 23:56:00 +02:00
Mattias Engdegård
3d36020552 GC-mark temporary key values created when sorting (bug#69709)
Bug reported and fix proposed by Aris Spathis.

* src/sort.c (merge_markmem): Mark heap-allocated temporary key values.
(tim_sort): Delay key function calls to after marking function has been
registered.
* test/src/fns-tests.el (fns-tests-sort-gc): New test.
2024-04-14 18:29:16 +02:00
Arash Esbati
845246093f Recognize multicite macros from biblatex
* lisp/textmodes/reftex-cite.el (reftex-all-used-citation-keys):
Match the citation keys used with multicite macros provided by
biblatex.  (bug#38249)

* test/lisp/textmodes/reftex-tests.el
(reftex-all-used-citation-keys): Adjust test accordingly.
2024-04-13 22:33:24 +02:00
Stefan Monnier
7b94c6b00b peg-tests.el: Fix test failures
* lisp/progmodes/peg.el (peg-parse): Refine heuristic since unknown
terminals are resolved at run-time rather than compile-time now.
(peg--macroexpand) <stack-action>: Avoid generating a `let` with an
empty body.
(peg--translate-rule-body): Adjust to name change of
`macroexp-warn-and-return` and the fact that it's always available.

* test/lisp/progmodes/peg-tests.el (peg-parse-string):
Add `indent` declaration.
(peg-test): Check that the compiler emits the warnings we expect.
2024-04-13 15:35:46 -04:00
Stefan Monnier
d67e08d6c3 Merge branch 'track-changes' 2024-04-13 09:44:12 -04:00
Stefan Monnier
d7a83e23d4 lisp/emacs-lisp/track-changes.el: New file (bug#70077)
This new package provides an API that is easier to use right than
our `*-change-functions` hooks.

The patch includes changes to `diff-mode.el` and `eglot.el` to
make use of this new package.

* lisp/emacs-lisp/track-changes.el: New file.
* test/lisp/emacs-lisp/track-changes-tests.el: New file.
* doc/lispref/text.texi (Tracking changes): New subsection.

* lisp/progmodes/eglot.el: Require `track-changes`.
(eglot--virtual-pos-to-lsp-position): New function.
(eglot--track-changes): New var.
(eglot--managed-mode): Use `track-changes-register` i.s.o
`after/before-change-functions` when available.
(eglot--track-changes-signal): New function, partly extracted from
`eglot--after-change`.
(eglot--after-change): Use it.
(eglot--track-changes-fetch): New function.
(eglot--signal-textDocument/didChange): Use it.

* lisp/vc/diff-mode.el: Require `track-changes`.
Also require `easy-mmode` before the `eval-when-compile`s.
(diff-unhandled-changes): Delete variable.
(diff-after-change-function): Delete function.
(diff--track-changes-function): Rename from `diff-post-command-hook`
and adjust to new calling convention.
(diff--track-changes): New variable.
(diff--track-changes-signal): New function.
(diff-mode, diff-minor-mode): Use it with `track-changes-register`.
2024-04-13 09:43:11 -04:00
Eli Zaretskii
71f8b2c324 Fix Icalendar export with ISO dates
* lisp/calendar/icalendar.el (icalendar--datestring-to-isodate):
Accept dashes in ISO-style numeric dates.  Patch by Erwan Hingant
<erwan.hingant@mailo.com>. (Bug#69894)

* test/lisp/calendar/icalendar-tests.el
(icalendar--datestring-to-isodate): Add a test for dashes in
ISO-style numeric dates.
2024-04-13 10:52:55 +03:00
Stefan Monnier
e8adb8cf5a (elisp-tests-syntax-propertize): New test for bug#24542
* test/lisp/progmodes/elisp-mode-tests.el (elisp-tests-syntax-propertize):
New test.
2024-04-12 21:54:53 -04:00
Michael Albinus
a69890eea9 Improve D-Bus byte-array conversion
* doc/misc/dbus.texi (Type Conversion): Adapt dbus-byte-array-to-string.

* etc/NEWS: D-Bus byte array conversion works over raw UTF-8 bytes.
Fix typos.

* lisp/net/dbus.el (dbus-string-to-byte-array)
(dbus-byte-array-to-string): BYTE-ARRAY must be an UTF-8 raw bytes
sequence.  Make optional argument MULTIBYTE obsolete.  (Bug#70301)
(dbus-call-method-handler, dbus-register-signal)
(dbus-escape-as-identifier): Use `length=' and `length>'.

* test/lisp/net/dbus-tests.el (dbus--test-method-handler)
(dbus-test09-get-managed-objects): Use `length='.
(dbus-test01-type-conversion): Extend test.

* test/lisp/net/secrets-tests.el (secrets-test03-items): Extend test.
2024-04-12 10:09:45 +02:00
Eli Zaretskii
5d35ef858a ; Fix whitespace in editfns-tests.el
* test/src/editfns-tests.el
(editfns-tests--before/after-change-functions): Fix whitespace.
2024-04-11 08:55:12 +03:00
Stefan Monnier
36cb16556c (en/decode_coding_object): Fix after-change-functions
For `en/decode-coding-string/region`, `after-change-functions`
were either not run at all, or run only after deleting the text
but not after inserting it.

* src/coding.c (decode_coding_object, encode_coding_object): Run the
after-change-functions after inserting the result.

* test/src/editfns-tests.el (sanity-check-change-functions-with-op):
New macro.
(sanity-check-change-functions-errors): New function.
(editfns-tests--before/after-change-functions): Use them to add
cases for `en/decode-coding-string/region`.
2024-04-10 12:15:26 -04:00
Eli Zaretskii
3351697080 Fix 'format-seconds' when all values are zero and %z is used
* lisp/calendar/time-date.el (format-seconds): Fix all-zero time.

* test/lisp/calendar/time-date-tests.el (test-format-seconds): Add
two new tests.  (Bug#70322)
2024-04-10 17:00:34 +03:00
Stefan Monnier
e3861aeb48 (test-replace-match-modification-hooks): Delete test
* test/src/search-tests.el (test-replace-match-modification-hooks):
Delete, this is testing a functionality we can't really support.
2024-04-09 11:01:36 -04:00
Eli Zaretskii
2c6eb49fa2 ; Avoid byte-compiler warnings in 'ls-lisp-test-bug70271'. 2024-04-09 11:01:52 +03:00
Eli Zaretskii
93576969c2 ; Fix the test in last change. 2024-04-09 06:21:38 +03:00
Lin Sun
a4c766e057 Support more long time options in 'ls-lisp'
* lisp/ls-lisp.el (ls-lisp--sanitize-switches): Support '--time'
and '--sort=time'.  (Bug#70271)

* test/lisp/ls-lisp-tests.el (ls-lisp-test-bug70271): New
test case.
2024-04-09 06:18:56 +03:00
Andrea Corallo
4d486bd378 * Fix out of date comp pass names in comp-tests.el
* test/src/comp-tests.el (comp-tests-tco, comp-tests-fw-prop-1)
(comp-tests-pure): Update out of date pass names.
2024-04-08 10:52:53 +02:00
Yuan Fu
64854869ae
Make tree-sitter thing feature public and remove obsolete functions
* lisp/treesit.el (treesit--things-around): Remove function.
(treesit-forward-sexp):
(treesit-beginning-of-thing):
(treesit-end-of-thing):
(treesit-navigate-thing):
(treesit-thing-at-point):
(treesit-outline-search): Use public version of thing-functions.
(treesit--thing-prev):
(treesit--thing-next):
(treesit--thing-at):
(treesit--navigate-thing): Make public.

* test/src/treesit-tests.el (treesit--ert-test-defun-navigation): Use
public version of thing-functions.
2024-04-07 22:20:31 -07:00
F. Jason Park
e0df2841fb Allow updating of /IGNORE timeouts in ERC
* lisp/erc/erc.el (erc--read-time-period, erc--decode-time-period):
Move body of former, now a superficial wrapper, to latter, a new
function.
(erc--format-time-period): New function.
(erc--get-ignore-timer-args): New function.
(erc--find-ignore-timer): New function to search through `timer-list'
to find matching ignore timer.
(erc-cmd-IGNORE): Refactor and redo doc string.  Add new optional
`timespec' parameter, primarily to aid in testing.  Update an existing
timer instead of always creating one, and display time remaining in
"ignore list" output.  Pass server buffer instead of current buffer to
timer callbacks because `erc--unignore-user' displays its messages in
the `active' buffer, not necessarily the issuing one.  Note that doing
this does discard potentially useful information, so if ever reverting,
we can change the `cl-find' :test in `erc--find-ignore-timer' to
something that compares the `erc-server-process' of both buffers.
;;
;; Something like:
;;
;; (defun erc--ignore-timers-equal-p (a b)
;;   (and (equal (car a) (car b))
;;        (eq (buffer-local-value 'erc-server-process (cadr a))
;;            (buffer-local-value 'erc-server-process (cadr b)))))
;;
(erc-cmd-UNIGNORE): Pass `erc-ignore-list' member matching `user'
parameter to `erc--unignore-user' instead of original, raw parameter,
along with the server buffer.
(erc--unignore-user): Cancel existing timer and don't bother switching
to server buffer since we're already there.
(erc-message-english-ignore-list): New variable.
* test/lisp/erc/erc-scenarios-ignore.el: New file.
* test/lisp/erc/erc-tests.el (erc--read-time-period): New test.
(erc-cmd-UNIGNORE): New test.  (Bug#70127)
2024-04-07 12:59:21 -07:00
Stefan Monnier
63588775fc (Freplace_match): Fix bug#65451
* src/search.c (Freplace_match): For ordering of *-change-functions.

* test/src/editfns-tests.el
(editfns-tests--before/after-change-functions): New test.
(sanity-check--message, sanity-check-change-functions-error)
(sanity-check-change-functions-check-size)
(sanity-check-change-functions-before)
(sanity-check-change-functions-after): New functions.
(sanity-check--verbose, sanity-check-change-functions-beg)
(sanity-check-change-functions-end)
(sanity-check-change-functions-buffer-size)
(sanity-check-change-functions-errors): New vars.
2024-04-07 14:16:38 -04:00
Eli Zaretskii
5f89da1423 Merge from origin/emacs-29
46b8746b38 Fix warning-suppress for list type "warning type"
910ea5f1e5 Make object init more robust (bug#69571)
2024-04-06 11:13:34 -04:00
Michael Albinus
aa356d03ae Make sh-script-tests.el more robust
* test/lisp/progmodes/sh-script-tests.el (test-sh-script-indentation)
(test-basic-sh-indentation, test-indent-after-continuation):
* test/lisp/progmodes/sh-script-resources/sh-indents.erts (Code):
Skip if `sh-indent-supported-here' is nil.  (Bug#70196)
2024-04-05 19:43:56 +02:00
Michael Albinus
c2e0ebf752 Adapt treesitter tests for EMBA
* test/infra/Makefile.in (TREE-SITTER-FILES): Add js-tests.el and
python-tests.el, which don't follow test file name convention.

* test/infra/test-jobs.yml: Regenerate.
2024-04-04 16:51:55 +02:00
Mattias Engdegård
0c55261971 Make lexical-binding cookie warning test more robust
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--lexical-binding-cookie):
Run with lexical-binding both on and off.
2024-04-03 11:27:16 +02:00
Mattias Engdegård
617debf673 Fix json-insert unibyte buffer bug (bug#70007)
Previously, a unibyte target buffer could be put in an incorrect state
if json-insert was used to insert non-ASCII characters.

* src/json.c (Fjson_insert): Simplify.  Don't attempt to decode the data
being inserted: it is guaranteed to be correct UTF-8 and is correct for
both unibyte and multibyte buffers.
* test/src/json-tests.el (json-serialize/roundtrip)
(json-serialize/roundtrip-scalars): Extend tests.
2024-04-02 19:10:00 +02:00
Mattias Engdegård
dbfe3cae2d Update JSON parser test and docs
* test/src/json-tests.el (json-parse-string/object):
Duplicated object keys are now retained in alist and plist output.
* etc/NEWS: Mention it.
2024-04-01 17:07:04 +02:00
Vladimir Kazanov
3f9263f791 Fix symbol list matching regexps.
Fix symbol list matching regexp performance

Allow empty face lists, improve the face list matching regexp (see
discussion in Bug#69714) based on relint's comments, add tests:
* test/lisp/emacs-lisp/ert-font-lock-tests.el: Add tests.
* lisp/emacs-lisp/ert-font-lock.el: Fix regexps.
2024-04-01 11:13:12 +02:00
Mattias Engdegård
3f4486dd76 Don't signal json-end-of-file for short nonempty bad JSON inputs
* src/json.c (json_parse_value): Generate a plain parse error.
* test/src/json-tests.el (json-parse-string/short): Adapt test.
2024-04-01 10:41:46 +02:00
Mattias Engdegård
734bd005aa Faster JSON parsing
Speed up JSON parsing substantially by only UTF-8-parsing string
literals and only exactly once.  Previously, json-parse-string always
first parsed the entire input and copied it to a new string, and then
validated each string literal twice.

We no longer create an extra new string when interning an alist key,
nor do we garble plist keys with Unicode characters.

* src/lread.c (intern_c_multibyte): New.
* src/json.c (json_encode): Remove.
(utf8_error): New.
(json_parse_string): Faster and more careful UTF-8 decoding.
Create and return a new multibyte string or symbol without extra
decoding.  All callers adapted.
(Fjson_parse_string): Skip expensive input pre-decoding.
* test/src/json-tests.el (json-parse-string/object-unicode-keys)
(json-parse-string/short): New.
(json-parse-string/string, json-parse-string/invalid-unicode):
Adapt tests.
* etc/NEWS: Mentioned change in errors.
2024-04-01 10:41:46 +02:00
Mattias Engdegård
f178a6d800 Native JSON support is always available
* lisp/progmodes/sh-script.el (sh--json-read): Remove.
(sh-shellcheck-flymake): Call json-parse-buffer directly.
* test/src/json-tests.el: Don't check for function availability.
2024-04-01 09:42:46 +02:00
Theodor Thornhill
910ea5f1e5 Make object init more robust (bug#69571)
* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Make the
regex same as before, but conditionally check other heuristics rather
than crazy regex shenanigans.
2024-03-31 10:43:44 +02:00
Eli Zaretskii
994bcc125b Fix the new PEG library
* doc/lispref/peg.texi (Parsing Expression Grammars)
(PEX Definitions, Parsing Actions, Writing PEG Rules): Fix markup,
indexing, and wording.

* etc/NEWS: Fix wording of PEG entry.

* test/lisp/progmodes/peg-tests.el: Move from test/lisp/, to match
the directory of peg.el.
2024-03-31 10:29:34 +03:00
Eric Abrahamsen
8bee4060ea Add peg.el as a built-in library
* lisp/progmodes/peg.el: New file, taken from ELPA package.
* test/lisp/peg-tests.el: Package tests.
* doc/lispref/peg.texi: Documentation.
2024-03-30 15:19:47 -07:00
Mattias Engdegård
890edfd2bb New JSON encoder (bug#70007)
It is in general at least 2x faster than the old encoder and does not
depend on any external library.  Using our own code also gives us
control over translation details: for example, we now have full
bignum support and tighter float formatting.

* src/json.c (json_delete, json_initialized, init_json_functions)
(json_malloc, json_free, init_json, json_out_of_memory)
(json_releae_object, check_string_without_embedded_nulls, json_check)
(json_check_utf8, lisp_to_json_nonscalar_1, lisp_to_json_nonscalar)
(lisp_to_json, json_available_p, ensure_json_available, json_insert)
(json_handle_nonlocal_exit, json_insert_callback):
Remove.  Remaining uses updated.
* src/json.c (json_out_t, symset_t, struct symset_tbl)
(symset_size, make_symset_table, push_symset, pop_symset)
(cleanup_symset_tables, symset_hash, symset_expand, symset_add)
(json_out_grow_buf, cleanup_json_out, json_make_room, JSON_OUT_STR)
(json_out_str, json_out_byte, json_out_fixnum, string_not_unicode)
(json_plain_char, json_out_string, json_out_nest, json_out_unnest)
(json_out_object_cons, json_out_object_hash), json_out_array)
(json_out_float, json_out_bignum, json_out_something)
(json_out_to_string, json_serialize): New.
(Fjson_serialize, Fjson_insert):
New JSON encoder implementation.
* test/src/json-tests.el (json-serialize/object-with-duplicate-keys)
(json-serialize/string): Update tests.
2024-03-30 14:45:53 +01:00
David Ponce
cc212ea314 bug#69992: Minor improvement to image map transformation logic
* lisp/image.el (image--compute-rotation): New function.
(image--compute-map, image--compute-original-map): Use it.
Ensure all transformations are applied or undone according to what
Emacs does internally.  Call a transformation function only when
needed.  Fix doc string.
(image--scale-map, image--rotate-map): Assume effective scale
argument.
(image--rotate-coord): Improve doc string.
(image--flip-map): Remove no more used argument FLIP.

* test/lisp/image-tests.el (image-create-image-with-map): Use a
valid SVG image otherwise `image-size' will not return a valid
value and calculation of scale could fail.
(image-transform-map): Update according to changed signature of
`image--flip-map'.
2024-03-30 16:35:11 +03:00
Eli Zaretskii
87be53846b Merge from origin/emacs-29
946d4aad1d Avoid errors in Info-search-case-sensitively in DIR buffers
fbf6830299 Add test for previous change (bug#70023)
bcf6dd6e26 Add typescript-ts-mode indentation for interface bodies (...
2024-03-30 04:38:18 -04:00
Eli Zaretskii
cd60fa42f6 Merge from origin/emacs-29
7a5d7be52c org--confirm-resource-safe: Fix prompt when prompting in ...
2bc865ace0 org-file-contents: Consider all remote files unsafe
6f9ea396f4 org-latex-preview: Add protection when `untrusted-content...
937b9042ad * lisp/gnus/mm-view.el (mm-display-inline-fontify): Mark ...
ccc188fcf9 * lisp/files.el (untrusted-content): New variable.
befa9fcaae org-macro--set-templates: Prevent code evaluation
3221d8d461 * admin/authors.el (authors-aliases): Add ignored authors.
8d8253f899 * etc/NEWS: Update for Emacs 29.3
2024-03-30 04:35:24 -04:00
Mattias Engdegård
2f0df93d8c ; * test/lisp/vc/vc-git-tests.el: bend doc string quote 2024-03-29 11:53:56 +01:00
Mattias Engdegård
ae5f2c02bd New sort keyword arguments (bug#69709)
Add the :key, :lessp, :reverse and :in-place keyword arguments.
The old calling style remains available and is unchanged.

* src/fns.c (sort_list, sort_vector, Fsort):
* src/sort.c (tim_sort):
Add keyword arguments with associated new features.
All callers of Fsort adapted.
* test/src/fns-tests.el (fns-tests--shuffle-vector, fns-tests-sort-kw):
New test.
* doc/lispref/sequences.texi (Sequence Functions): Update manual.
* etc/NEWS: Announce.
2024-03-29 11:39:38 +01:00
Mattias Engdegård
1232ab31c6 Add value< (bug#69709)
It's a general-purpose polymorphic ordering function, like `<` but
for any two values of the same type.

* src/data.c (syms_of_data): Add the `type-mismatch` error.
(bits_word_to_host_endian): Move...
* src/lisp.h (bits_word_to_host_endian): ...here, and declare inline.
* src/fns.c (Fstring_lessp): Extract the bulk of this function to...
(string_cmp): ...this 3-way comparison function, for use elsewhere.
(bool_vector_cmp, value_cmp, Fvaluelt): New.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns):
Add `value<`, which is pure and side-effect-free.
* test/src/fns-tests.el (fns-value<-ordered, fns-value<-unordered)
(fns-value<-type-mismatch, fns-value<-symbol-with-pos)
(fns-value<-circle, ert-deftest fns-value<-bool-vector): New tests.
* doc/lispref/sequences.texi (Sequence Functions):
* doc/lispref/numbers.texi (Comparison of Numbers):
* doc/lispref/strings.texi (Text Comparison):
Document the new value< function.
* etc/NEWS: Announce.
2024-03-29 11:39:38 +01:00
Stefan Monnier
4cee95815b pp.el: Try and fix bug#70039
* lisp/emacs-lisp/pp.el (pp-fill): Avoid splitting `#N#` or `#[`.
* test/lisp/emacs-lisp/pp-tests.el (pp-tests--sanity): New test.
2024-03-28 15:31:04 -04:00
Theodor Thornhill
fbf6830299 Add test for previous change (bug#70023)
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: Add
test.
2024-03-28 19:03:02 +01:00
Vladimir Kazanov
cdd7093e17 Improve ert-font-lock assertion parser (Bug#69714)
Fail on files with no assertions, parser now accepts multiple
carets per line and face lists:
* lisp/emacs-lisp/ert-font-lock.el: Assertion parser fix.
* test/lisp/emacs-lisp/ert-font-lock-resources/no-asserts.js:
* test/lisp/emacs-lisp/ert-font-lock-tests.el
(test-parse-comments--no-assertion-error)
(test-syntax-highlight-inline--caret-negated-wrong-face)
(test-macro-test--file-no-asserts): New test cases.
* doc/misc/ert.texi (Syntax Highlighting Tests): More syntax examples.
2024-03-28 11:40:27 +02:00
Stefan Monnier
f1fe13ea05 (pcase-mutually-exclusive): Use auto-generated table
The `pcase-mutually-exclusive-predicates` table was not very
efficient since it grew like O(N²) with the number of
predicates.  Replace it with an O(N) table that's auto-generated
from the `built-in-class` objects.

* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Delete variable.
(pcase--subtype-bitsets): New function and constant.
(pcase--mutually-exclusive-p): Use them.
* lisp/emacs-lisp/cl-preloaded.el (built-in-class): Don't inline.
2024-03-28 00:06:00 -04:00
Stefan Monnier
e5d824b632 cl-preloaded.el: Partly revert last change
The change caused type-check errors in auth-source where they use
`:type function` constraints on object slots and expect those to
be able to hold symbols.

* lisp/emacs-lisp/cl-preloaded.el (function): Revert last change.

* test/src/data-tests.el (data-tests--cl-type-of): Use `cl-functionp`
rather than `functionp` to test `function`.
2024-03-26 17:27:29 -04:00
Stefan Monnier
004f2493a5 cl-preloaded.el: Fix the type lattice
We generally want types to form not just a DAG but a lattice.
If objects can be both `keyword` and `symbol-with-pos`, this
means there should be a more precise type describing this intersection.
If we ever find the need for such a refinement, we could add
such a `keyword-with-pos` type, but here I took the simpler
route of treating `keyword` not as a proper built-in type but
as a second-class type like `natnum`.

While fixing this problem, also fix the problem we had where
`functionp` was not quite adequate to characterize objects of type
`function`, by introducing a new predicate `cl-functionp` for that.

* lisp/emacs-lisp/cl-preloaded.el (cl-functionp): New function.
(function): Use it.
(keyword): Don't declare it as a built-in type.
(user-ptrp): Remove redundant declaration.

* lisp/emacs-lisp/cl-generic.el (cl--generic--unreachable-types):
Delete constant.
(cl-generic-generalizers): Remove corresponding test.

* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Add entry for
`keyword` type.

* lisp/emacs-lisp/comp.el (comp-known-predicates): Fix type for
negative result of `characterp`.  Remove duplicate `numberp` entry.
Fix types for `keywordp` now that `keyword` is not a built-in type any more.

* test/src/data-tests.el (data-tests--cl-type-of): Add a few cases.
Remove workaround for `function`.
2024-03-26 13:14:15 -04:00
Andrea Corallo
8cc67dbcec Fix native comp prediction on null functionp tested objects
* lisp/emacs-lisp/comp.el (comp-known-predicates)
(comp-known-predicates-h): Update.
(comp--pred-to-pos-cstr, comp--pred-to-neg-cstr): New functions.
(comp--add-cond-cstrs): Make use of them.

* test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.
2024-03-26 11:14:08 +01:00
Andrea Corallo
c5de73a95a Fix native compilation for circular immediates (bug#67883)
* test/src/comp-resources/comp-test-funcs.el
(comp-test-67883-1-f): New function.

* lisp/emacs-lisp/comp.el (comp--collect-rhs)
(comp--ssa-rename-insn): Handle setimm aside to avoid unnecessary
immediate manipulation.
(comp--copy-insn-rec): Rename.
(comp--copy-insn): New function.
(comp--dead-assignments-func): Handle setimm aside to avoid
unnecessary.
2024-03-24 12:16:11 +01:00
F. Jason Park
b9bd78f78d Restore leading space to right-margin stamps in ERC
* lisp/erc/erc-stamp.el (erc-insert-timestamp-right): Insert a single
space character immediately before right-side stamps managed by
`erc-stamp--display-margin-mode'.  Include it as part of the
`timestamp' field.  This behavior was originally present in an earlier
draft of the changes for bug#60936, mainly to favor symmetry between
hard-wrapped fill styles and fill-wrap with regard to stamps.  It was
subsequently removed to simplify management, so that the `field' and
`display' intervals aligned.
* test/lisp/erc/erc-stamp-tests.el
(erc-stamp--display-margin-mode--right): Update expected output.

; test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld:
; Add space.
; test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
; Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Add space.
2024-03-23 15:10:32 -07:00
F. Jason Park
44be4fa8e6 Remove unused faces from various erc-goodies tests
; A note to anyone running ERC's test suite while bisecting and
; unlucky enough to land on this commit: apologies for the
; inconvenience.  It fails because it includes adjustments for fixes
; only introduced by the subsequent commit.  This is obviously
; objectionable but was done knowingly in order to duck the
; copyright-exemption threshold for new contributors.

* test/lisp/erc/erc-goodies-tests.el
(erc-controls-highlight--spoilers)
(erc-controls-highlight--inverse): Remove all mention of stricken
faces `erc-control-default-fg' and `erc-control-default-bg'.
(erc-controls-highlight/default-foreground)
(erc-controls-highlight/default-background): New tests.
(Bug#69860)
2024-03-23 15:10:32 -07:00
Joseph Turner
79c758187c Recompute :map when image :scale, :rotation, or :flip changes
Now, when transforming an image, its :map is recomputed to fit.
Image map coordinates are integers, so when computing :map,
coordinates are rounded.  To prevent an image from drifting from
its map after repeated transformations, 'create-image' now adds
a new image property :original-map, which is combined with the
image's transformation parameters to recompute :map.

* lisp/image.el (image-recompute-map-p): Add user option to
control whether :map is recomputed when an image is transformed.
(create-image): Create :map from :original-map and vice versa.
(image--delayed-change-size): Fix comment.
(image--change-size, image-rotate, image-flip-horizontally,
image-flip-vertically): Recompute image map after transformation
and mention 'image-recompute-map-p' in docstring.
(image--compute-map): Add function to compute a map from original
map.
(image--compute-original-map): Add function to compute an
original map from map.
(image--scale-map): Add function to scale a map based on :scale.
(image--rotate-map): Add function to rotate a map based on
:rotation.
(image--rotate-coord): Add function to rotate a map coordinate
pair.
(image--flip-map): Add function to flip a map based on :flip.
(image-increase-size, image-decrease-size, image-mouse-increase-size)
(image-mouse-decrease-size): Mention 'image-recompute-map-p' in
docstrings.
* etc/NEWS: Add NEWS entry.
* doc/lispref/display.texi (Image Descriptors): Document :original-map
and new user option 'image-recompute-map-p'.
* test/lisp/image-tests.el (image--compute-map-and-original-map):
Test 'image--compute-map' and 'image--compute-original-map'.
(image-tests--map-equal): Add equality predicate to compare image maps.
(image-create-image-with-map): Test that 'create-image' adds :map
and/or :original-map as appropriate.
(image-transform-map): Test functions related to transforming maps.
(Bug#69602)
2024-03-23 19:54:53 +02:00
Jim Porter
4b0f5cdb01 Add 'eww-readable-urls'
* lisp/net/eww.el (eww-readable-urls): New option.
(eww-default-readable-p): New function...
(eww-display-html): ... use it.

* test/lisp/net/eww-tests.el (eww-test/readable/default-readable): New
test.

* doc/misc/eww.texi (Basics): Document 'eww-readable-urls'.

* etc/NEWS: Announce this change (bug#68254).
2024-03-23 10:17:06 -07:00
Jim Porter
72972118e6 Allow toggling "readable" mode in EWW
Additionally, add an option to prevent adding a new history entry for
each call of 'eww-readable' (bug#68254).

* lisp/net/eww.el (eww-retrieve):

* lisp/net/eww.el (eww-readable-adds-to-history): New option.
(eww-retrieve): Make sure we call CALLBACK in all configurations.
(eww-render): Simplify how to pass encoding.
(eww--parse-html-region, eww-display-document): New functions, extracted
from...
(eww-display-html): ... here.
(eww-document-base): New function.
(eww-readable): Toggle "readable" mode interactively, like with a minor
mode.  Consult 'eww-readable-adds-to-history'.
(eww-reload): Use 'eshell-display-document'.

* test/lisp/net/eww-tests.el (eww-test--with-mock-retrieve): Fix indent.
(eww-test/display/html, eww-test/readable/toggle-display): New tests.

* doc/misc/eww.texi (Basics): Describe the new behavior.

* etc/NEWS: Announce this change.
2024-03-23 10:17:06 -07:00
Eli Zaretskii
e813c0fa3a Merge from origin/emacs-29
689f04a2dd Clarify description of format-spec truncation
759dedfab0 More accurate documentation of 'rmail-mail-new-frame'
fa79de7c6b ; * lisp/calendar/calendar.el: Remove extra space.
7f6e335f4b Fix documentation of M-SPC in user manual
5bdc2436c6 ; * lisp/emacs-lisp/cl-macs.el (cl-labels): Fix stray dif...
8014dbb2ad * admin/notes/bugtracker: Minor copyedit.
06a991e7e8 ; * admin/notes/bugtracker: Minor copyedit.
c890622e1a Tweak regexp for object initializers in csharp-mode (bug#...
f48babb112 `term-mode': mention the keymap to add keybindings to
8cf05d9be1 Fix 'shortdoc-copy-function-as-kill'
d5901f3f05 Improve documentation of 'edebug-print-*' variables
2024-03-23 06:51:39 -04:00
Stefan Monnier
7e32e8392a Fix recent test regressions
* lisp/emacs-lisp/pp.el (pp-fill): Don't cut between `#` and `(`.

* test/lisp/help-fns-tests.el (help-fns-test-built-in)
(help-fns-test-interactive-built-in, help-fns-test-lisp-defun)
(help-fns-test-lisp-defsubst):
* test/src/emacs-module-tests.el (module/describe-function-1):
Adjust tests to new wording in `describe-function`.
2024-03-22 18:44:54 -04:00
Stefan Monnier
7269a2f158 (pp-fill): Cut before parens and dots
The `pp-fill` code sometimes end up generating things like:

    (foo .
         bar)

instead of

    (foo
     .  bar)

so make sure we cut before rather than after the dot (and open
parens while we're at it).

* lisp/emacs-lisp/pp.el (pp-fill): Cut before parens and dots.

* test/lisp/emacs-lisp/pp-tests.el (pp-tests--dimensions): New function.
(pp-tests--cut-before): New test.
2024-03-22 16:46:28 -04:00
Kévin Le Gouguec
014cd00402 Fix vc-git test when no identities are configured
Reported by john muhl <jm@pub.pink>.

* test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo): Set
some environment variables (lifted from vc-tests.el) to let
'git commit' compute dummy author and committer identities.
2024-03-19 21:53:40 +01:00