1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00
Commit Graph

7548 Commits

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