1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

7540 Commits

Author SHA1 Message Date
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
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
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
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
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