f69f54c454 Improve font-locking and indentation in 'php-ts-mode'
27aacbd172 Fix some 'lua-ts-mode' options (Bug#74235)
a0613372a7 ; Update the xwidgets-on-NS text due to fixing bug#60703
d592832504 Improve comment indenting in 'lua-ts-mode'
6bc44ccf28 Update 'xref-num-matches-found' when reverting *xref* buffer
8afcfed825 * lisp/files.el (require-with-check): Fix last fix (bug#7...
3496234c8e lisp/files.el (require-with-check): Fix bug#74091.
90c97d3fac Fix handling of permanent-local variables in 'kill-all-lo...
c96e576090 Precise password cache in Tramp
3954e8d9bb Fix picture-mode with full-width characters
7dabfe9465 Fix movement to the left in picture-mode
# Conflicts:
# lisp/net/tramp.el
* lisp/progmodes/lua-ts-mode.el (lua-ts--simple-indent-rules):
Align single line comments with the surrounding context.
(lua-ts--comment-first-sibling-matcher): Check that comment is
the first sibling.
(lua-ts--multi-line-comment-start): New function.
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
Add tests. (Bug#74298)
Allow `cl-labels` to use the same (FUNC EXP) bindings as were already added
to `cl-flet` in Emacs-25. The Info doc (mistakenly) already documented this
new feature.
* lisp/emacs-lisp/cl-macs.el (cl--self-tco-on-form): New function.
(cl-labels): Use it to add support for (FUNC EXP) bindings.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test for
tail-recursive (FUNC EXP) bindings.
* lisp/time-stamp.el (time-stamp-string-preprocess): %P variations;
allow (and ignore) "*", "E", and "O" as modifier characters.
(time-stamp-inserts-lines): safe-local-variable only if booleanp
* lisp/subr.el (when, unless): Return nil when the body is empty.
Reported by Brennan Vincent.
* test/lisp/subr-tests.el (subr-test-when): Add test cases.
(cherry picked from commit 9ee9154247)
Reported by Brennan Vincent.
* lisp/subr.el (when, unless): Return nil when the body is empty.
* test/lisp/subr-tests.el (subr-test-when): Add test cases.
* lisp/eshell/esh-util.el (eshell-range): New struct.
(eshell--range-string-p, eshell--string-to-range): New functions.
* lisp/eshell/esh-arg.el (eshell-parse-integer)
(eshell-parse-range-token): New functions...
(eshell-parse-argument-hook): ... add them.
(eshell--after-range-token-regexp): New defsubst.
(eshell-concat-1): Don't remove the 'number' property; we use that when
handling range arguments.
(eshell--range-token): New constant.
(eshell-unmark-range-token): New function.
* lisp/eshell/esh-var.el (eshell-parse-index): Update implementation to
use parsed range argument.
* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-indices):
Test range index using variables.
This fixes some errors with more-complex string forms, and also allows
iterating over sequences other than just lists.
* lisp/eshell/esh-cmd.el (eshell-for-iterate): New function...
(eshell-rewrite-for-command): ... use it.
* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/for-loop): Test
multiple values.
(esh-cmd-test/for-loop-string, esh-cmd-test/for-loop-vector): New tests.
(esh-cmd-test/for-loop-mixed-args): Rename.
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/sentinel/change-buffer): Make sure all the processes get
cleaned up.
This simplifies the logic for building these forms and also fixes an
issue where a subcommand in a "&&" or "||" conditional had its output
suppressed.
* lisp/eshell/esh-cmd.el (eshell-structure-basic-command): Make
obsolete.
(eshell-silence-test-command): New function...
(eshell-rewrite-while-command, eshell-rewrite-if-command): ... use it,
and make the command form ourselves.
(eshell-parse-pipeline): Use 'and' and 'or' to make the conditional
command sequence.
(eshell-command-success): New macro.
(eshell-do-eval): Add support for 'and' and 'or' forms.
* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/and-operator/output)
(esh-cmd-test/or-operator/output): New tests.
* lisp/time-stamp.el (time-stamp-format, time-stamp-pattern): Reformat
doc strings for clarity.
(group time-stamp): is a subgroup of "files", not "data".
The "data" group seems to be for editing non-text files.
* test/lisp/time-stamp-tests.el: Fix tense of some doc strings.
This new implementation opts *in* to treating characters as glob
characters, rather than opting out. This reduces the need to coordinate
with other parts of Eshell and should be harder to break (bug#74033).
* lisp/eshell/em-glob.el (eshell-parse-glob-chars): Return the
propertized globbing character directly.
(eshell--propertize-glob, eshell--glob-char-p)
(eshell--contains-glob-char-p, eshell--all-glob-chars-p): New functions.
(eshell-glob-p): Make obsolete.
(eshell-glob-regexp, eshell-glob-convert-1, eshell-glob-convert): Check
for 'eshell-glob-char' property.
(eshell-extended-glob): Remove text properties when returning no match.
(eshell--glob-anything): New constant.
(eshell-glob-entries): Propertize "*" to treat it as a glob.
* lisp/eshell/em-ls.el (eshell-ls--expand-wildcards): New function...
(eshell-ls--insert-directory): ... use it.
* test/lisp/eshell/em-glob-tests.el: Use 'eshell--propertize-glob' in
tests.
(em-glob-test/convert/literal-characters)
(em-glob-test/convert/mixed-literal-characters): New tests.
* lisp/eshell/em-glob.el (eshell-expand-glob): Rename from
'eshell-extended-glob'. Update callers.
(eshell-extended-glob): New function to expand a GLOB that hasn't been
propertized yet, for use outside of Eshell command forms.
(eshell-parse-glob-chars): Return the propertized globbing character
directly.
(eshell-parse-glob-string, eshell--glob-char-p)
(eshell--contains-glob-char-p, eshell--all-glob-chars-p): New functions.
(eshell-glob-regexp, eshell-glob-convert-1, eshell-glob-convert): Check
for 'eshell-glob-char' property.
(eshell-glob-p): Make obsolete.
(eshell--glob-anything): New constant...
(eshell-glob-entries): ... use it.
* lisp/eshell/em-ls.el (eshell-ls--expand-wildcards): New function...
(eshell-ls--insert-directory): ... use it.
* test/lisp/eshell/em-glob-tests.el: Use 'eshell-parse-glob-string in
tests.
(em-glob-test/convert/literal-characters)
(em-glob-test/convert/mixed-literal-characters): New tests.
* lisp/eshell/esh-mode.el (eshell-clear): New function.
(eshell/clear): Fix incorrect behavior, and do the right thing when
'eshell-scroll-show-maximum-output' is nil.
(eshell/clear-scrollback): Call 'eshell/clear'.
* test/lisp/eshell/esh-mode-tests.el
(esh-mode-test/clear/eshell-command)
(esh-mode-test/clear/eshell-command/erase)
(esh-mode-test/clear/emacs-command)
(esh-mode-test/clear/emacs-command/erase): New tests.
* etc/NEWS: Mention the new 'eshell-command' (bug#73722).
* test/lisp/progmodes/project-tests.el
(project-vc-extra-root-markers-supports-wildcards): End with a
check that we didn't cache a wrong value for parent (bug#73801).
(cherry picked from commit 94a9e40e82)
* test/lisp/progmodes/project-tests.el
(project-vc-extra-root-markers-supports-wildcards): End with a
check that we didn't cache a wrong value for parent (bug#73801).
* lisp/dabbrev.el (dabbrev-expand): Use the buffer where the
expansion was found when setting the internal variables used to
determine the next expansion or a replacement expansion.
* test/lisp/dabbrev-tests.el (ert-x): Require for
'ert-with-temp-directory', 'ert-resource-directory' and
'ert-resource-file'.
(with-dabbrev-test): New macro.
(dabbrev-expand-test-same-buffer-{1,2,3,4})
(dabbrev-expand-test-other-buffer-{1,2,3,4})
(dabbrev-expand-test-minibuffer-{1,2,3,4}): New tests.
* test/lisp/dabbrev-resources/dabbrev-expand.el:
* test/lisp/dabbrev-resources/INSTALL_BEGIN: New test resources.
(cherry picked from commit f6c359cb66)
* lisp/dabbrev.el (dabbrev-expand): Use the buffer where the
expansion was found when setting the internal variables used to
determine the next expansion or a replacement expansion.
* test/lisp/dabbrev-tests.el (ert-x): Require for
'ert-with-temp-directory', 'ert-resource-directory' and
'ert-resource-file'.
(with-dabbrev-test): New macro.
(dabbrev-expand-test-same-buffer-{1,2,3,4})
(dabbrev-expand-test-other-buffer-{1,2,3,4})
(dabbrev-expand-test-minibuffer-{1,2,3,4}): New tests.
* test/lisp/dabbrev-resources/dabbrev-expand.el:
* test/lisp/dabbrev-resources/INSTALL_BEGIN: New test resources.
* test/lisp/proced-tests.el
(proced--assert-process-valid-cpu-refinement-explainer): New function
for explaining refinement test failures in greater detail.
PEG rules get "compiled" to functions with name `peg-rule <RULE>`.
`define-peg-ruleset` instead defines it PEG rules with name
`peg-rule <RULESET> <RULE>`, so that they can be made visible
by `with-peg-rules` simply by adding local aliases from
`peg-rule <RULE>` to `peg-rule <RULESET> <RULE>`.
Apparently when I added `define-peg-ruleset` I somehow failed to
install some of the corresponding code in `with-peg-rules`, so
the aliases were not installed, making it "impossible" to use
rulesets.
[ I still have no idea how this happened and/or where
the missing code went, so I "recreated" it. ]
* lisp/progmodes/peg.el (with-peg-rules): Install the aliases
for the rulesets.
(peg--translate-rule-body): Try and preserve
location info when emitting a warning.
* test/lisp/progmodes/peg-tests.el (peg-test-myrules): New ruleset.
(peg-test-ruleset): New test.
* test/lisp/proced-tests.el (proced-refine-test)
(proced-refine-with-update-test): Use the much simpler CPU refinement
for testing 'proced-refine'. The previous tests made the incorrect
assumption that refining on the PID of process A only filtered the
buffer to contain process A and its children, whereas in actuality
the children of process A's children, their children, and so on will
also be shown.
(proced-update-preserves-pid-at-point-test): Mark as unstable.
* lisp/eshell/em-pred.el (eshell-pred-initialize): Ensure that
'eshell-parse-arg-modifier' is called before 'eshell-parse-glob-chars'.
* lisp/eshell/em-glob.el (eshell-glob-initialize): Use a number for hook
depth to be clearer.
(eshell-parse-glob-chars): Simplify; since eshell-pred's hook now runs
first, the extra code is no longer necessary.
* test/lisp/eshell/em-glob-tests.el
(em-glob-test/test-command-without-pred): New test.
* lisp/eshell/esh-util.el (eshell-split-filename): Never expand the
filename.
* lisp/eshell/em-glob.el (eshell-glob-p): A leading "~" isn't a globbing
character.
* test/lisp/eshell/esh-util-tests.el
(esh-util-test/split-filename/absolute)
(esh-util-test/split-filename/relative)
(esh-util-test/split-filename/user)
(esh-util-test/split-filename/remote-absolute)
(esh-util-test/split-filename/remote-relative)
(esh-util-test/split-filename/remote-user): New tests.
This could happen when 'eshell-extended-glob' determines that a "glob"
is not really a glob. This mainly happens for remote file names with a
"~" in them, like "/ssh:remote:~/file.txt".
* lisp/eshell/em-glob.el (eshell-extended-glob): Return a list when
'eshell-glob-splice-results' is non-nil.
* test/lisp/eshell/em-glob-tests.el
(em-glob-test/expand/splice-results)
em-glob-test/expand/no-splice-results): Extend tests.
Previously, this could 'nonc' to a list that shouldn't be modified.
* lisp/eshell/esh-cmd.el (eshell-rewrite-named-command): Use 'append'
instead of 'nconc'.
* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-splice):
(esh-var-test/quoted-interp-var-splice): New tests.
* lisp/autorevert.el (auto-revert--last-time): New defvar.
(auto-revert-handler, auto-revert-notify-handler): Use it.
* test/lisp/autorevert-tests.el (with-auto-revert-test): Set
`auto-revert--lockout-interval' correctly.
This should reduce the number of issues with Eshell converting strings
to numbers too aggressively and losing information (e.g. "001" -> 1)
while still allowing almost all of the beneficial uses, like summing a
list of numeric strings with '+'.
* lisp/eshell/esh-util.el (eshell--do-mark-numeric-string): New
function.
(eshell-convert-to-number): Make obsolete in favor of...
(eshell-mark-numeric-string): ... this. Update callers.
* lisp/eshell/esh-arg.el (eshell--numberlike-p): New function...
(eshell-concat-1): ... use it.
* test/lisp/eshell/esh-util-tests.el: Reimplement type conversion tests
to use 'eshell-convertible-to-number-p' instead.
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/interp-var-splice-concat, esh-var-test/interp-concat-cmd)
(esh-var-test/interp-convert-var-split-indices)
(esh-var-test/interp-convert-quoted-var-split-indices)
(esh-var-test/interp-convert-cmd-multiline)
(esh-var-test/interp-convert-cmd-split-indices): Adjust tests to check
the new behavior.
* doc/misc/eshell.texi (Type Conversion): New section.
(Expansion): Clarify concatenation behavior.
* lib-src/etags.c (regex_tag_multiline): Fix off-by-one error in
determining the end of the tag matched by a multiline regexp.
(Bug#73771)
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6: Adjust test results to the above
change.
* lisp/dired.el (dired-hide-details-hide-absolute-location):
New user option.
(dired-insert-directory, dired-build-subdir-alist): Use it to
hide absolute file name of the directory.
(dired-hide-details-mode): Update doc string.
* test/lisp/dired-tests.el
(dired-test-hide-absolute-location-enabled)
(dired-test-hide-absolute-location-disabled): New tests
* etc/NEWS: Announce the new feature.
Bug#72272
* etc/ERC-NEWS: Announce migration of misplaced `querypoll' module from
erc-goodies.el to erc-notify.el.
* lisp/erc/erc-goodies.el: Move all definitions associated with
experimental module `querypoll' to erc-notify.
* lisp/erc/erc-notify.el (erc--querypoll-ring)
(erc--querypoll-timer, erc-querypoll-exclude-regexp)
(erc-querypoll-mode, erc-querypoll-enable, erc-querypoll-disable)
(erc--queries-current-p, erc-querypoll-period-params)
(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): Move here from erc-goodies.
* 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): Move to new file erc-notify-tests.el.
* test/lisp/erc/erc-notify-tests.el: New file. The `querypoll' module
was first introduced as part of bug#70928 in ERC 5.6.
* doc/misc/erc.texi (Sample Configuration): Remove `erc-modules' from
the `:custom' section of the `use-package' declaration for feature `erc'
because its presence there depends on `:defer' being non-nil, and this
configuration is supposed to be `:defer' agnostic. This reverts part of
3f1ce47f "; Add face customization to ERC's sample config".
* etc/ERC-NEWS: Mention `erc-modules' no longer being autoloaded.
* lisp/erc/erc-match.el (erc-text-matched-hooks): Explain expected
format of non-NUH matches.
* test/lisp/erc/erc-match-tests.el (test/lisp/erc/erc-match-tests.el):
Inhibit messages when running non-interactively.