* 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)
* doc/misc/tramp.texi (Remote processes): Add another example
enabling direct async processes based on method name. (Bug#74105)
* etc/NEWS: Rephrase Tramp entry on direct async processes.
* 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)
* 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)
I somehow thought allow-auto-fill is a global variable that's
used by cc. But it's not. It's just a function param used by
c-indent-new-comment-line.
* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Remove reference to
allow-auto-fill.
* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Delete trailing
whitespace before inserting newline. The insert-line-break
function is the same as in c-indent-new-comment-line.
* lisp/tab-bar.el (tab-bar-tabs): Run the hook
'tab-bar-tab-post-open-functions' after creating the first tab
in the selected frame's tab-bar list of tabs (bug#74087).
Suggested by Ship Mints <shipmints@gmail.com>.
(cherry picked from commit 2c062dfdf5)
* 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.
* doc/lispref/functions.texi (Function Cells): Avoid talking
about the function cell being void.
* src/data.c (Fboundp, Ffmakunbound, Fsymbol_function):
Don't suggest that "void" can be considered as a kind of value.
* 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.
* doc/lispref/functions.texi (Function Cells):
* src/data.c (Ffboundp, Ffmakunbound, Fsymbol_function): Update
documentation to the changes of how void functions are represented
since Emacs 24.5. (Bug#73886)
Try to save people some time if they're developing on Emacs 30.x.
Do not merge to master.
* lisp/subr.el (if-let*, when-let*, if-let, when-let): Move
docstring text around so that if-let* and when-let* descriptions
no longer refer to if-let and when-let. Note that if-let and
when-let will be marked obsolete, and recommend if-let*,
when-let* and and-let* for new code.
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.
Incomplete compound_statement or colon_block (statement-group
without a closing brace or closing keyword) that are not inside
a function or method are not recognized as such by tree-sitter-php.
A new function 'php-ts-mode--open-statement-group-heuristic'
handles this case. Font locking of magic methods and better
support for alternative control structure syntax.
Support for latest grammar version.
* lisp/progmodes/php-ts-mode.el
(php-ts-mode--language-source-alist): Updated grammar version.
(php-ts-mode--possibly-braceless-keyword-re): Regular expression
for braceless keyword.
(php-ts-mode--open-statement-group-heuristic): New function.
(php-ts-mode--parent-html-bol): Use the new function and doc fix.
(php-ts-mode--parent-html-heuristic): Use the new function and doc
fix.
(php-ts-mode--indent-styles): Use the new function and add
'colon_block' support.
(php-ts-mode--class-magic-methods): New predefined magic methods
list.
(php-ts-mode--test-namespace-name-as-prefix-p): Doc fix.
(php-ts-mode--test-namespace-aliasing-clause-p): Fix the test and
doc.
(php-ts-mode--test-namespace-use-group-clause-p): Doc fix.
(php-ts-mode--test-visibility-modifier-operation-clause-p): New
function for the new asymmetric property visibility feature of
PHP 8.4.
(php-ts-mode--font-lock-settings): Font lock for class magic methods
and alternative syntax. Better font lock for 'instanceof'. Use
'font-lock-function-call-face' for scoped and member call expression.
(bug#73779)