* lisp/progmodes/elixir-ts-mode.el (elixir-ts--thing-settings):
Add extra grouping "keywords" to named sexp nodes.
Add "," to anonymous sexp nodes. Use bos/eos.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Use bos/eos for anonymous sexp nodes for better disambiguation.
* test/lisp/progmodes/heex-ts-mode-tests.el
(heex-ts-mode-test-indentation): Skip the test when 'elixir' is
missing since 'heex-ts-mode' depends on the 'elixir' grammar.
* lisp/textmodes/mhtml-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
Use 'add-to-list' on items in language-source-alist
that should check for duplicate items.
* test/infra/Dockerfile.emba: Move multi-language mhtml-ts-mode and
php-ts-mode to the end to give their dependent grammars a lower priority.
* test/lisp/progmodes/js-tests.el (js-ts-mode-test-indentation):
Skip the test when 'jsdoc' is missing since 'js-ts-mode' depends
on the 'jsdoc' grammar.
While `register--get-method-type` worked fine for `register-val-insert`
it always returns nil for `register-val-jump-to` because it presumed the
method took a single argument. Make it work for multi-arg generic functions.
* lisp/register.el (register--get-method-type): Add `other-args-type` arg.
(register--jumpable-p): Use it.
Improve the handling of #error and #warning in C and C++ Modes.
* lisp/progmodes/cc-engine.el (c-looking-at-c++-attribute)
(c-enclosing-c++-attribute, c-forward-sws, c-backward-sws):
Handle attributes in C as they have been handled in C++.
(c-forward-align-clause-throw-if-invalid): New macro.
(c-forward-type): Handle alignas, alignof, and _BitInt, putting
a catch block around most of the function to catch invalid uses
of these new keywords.
(c-in-id-arglist): New function.
(c-forward-decl-or-cast-1): Recognize a "maybe" type identifier
as a type in arglists when there is no parameter identifier
associated with it.
* lisp/progmodes/cc-fonts.el (c-font-lock-cpp-messages): New
function.
(c-cpp-matchers): Move the handling of "invalid" comment
delimiters outside of the block handling CPP directives.
Remove the inline handling of #error and #warning, using the
new function c-font-lock-cpp-messages instead.
(c-get-fontification-context): Handle alignof, alignas,
_BitInt.
(c-font-lock-declarations): Adapt fontification of K&R
parameters to the C23 nameless parameter scheme.
* lisp/progmodes/cc-langs.el (c-has-quoted-numbers)
(c-stmt-boundary-skip-chars)
(c-recognize-post-brace-list-type-p, c-modifier-kwds)
(c-constant-kwds): Handle C the same as the existing C++
handling.
(c-cpp-message-directives-re, noncontinued-line-end)
(c-cpp-messages-re, c-cpp-message-match-no): New
c-lang-consts/vars.
(c-cpp-include-directives): New directive embed.
(c-cpp-expr-directives): New directives elifdef, elifndef.
(c-primitive-type-kwds): New types, _Decimal*, bool, char*_t,
nullptr_t.
(c-typeof-kwds): New keyword typeof_unqual.
(c-type-with-paren-kwds, c-type-with-paren-key): New
c-lang-const/vars.
(c-type-modifier-with-parens-kwds)
(c-type-modifier-with-parens-key, c-type-internal-paren-kwds)
(c-type-internal-paren-key): New c-lang-const/vars.
(c-type-modifier-prefix-kwds, c-type-start-kwds): Amend with
the above new c-lang-consts.
(c-no-type-with-equals-kwds, c-no-type-with-equals-key): New
c-lang-const/vars.
(c-modifier-kwds): Add constexpr, auto, and thread_local to the
C value.
(c-paren-nontype-kwds): Add static_assert to the C value.
(c-constant-kwds): Add nullptr to the C value.
(c-regular-keywords-regexp): Include c-type-with-paren-kwds.
(c-recognize-nameless-type-decls): New c-lang-const/var.
* lisp/progmodes/cc-mode.el (c-leave-cc-mode-mode): Also clear
c-digit-separator properties.
* test/infra/Dockerfile.emba (emacs-tree-sitter): Print language
versions.
* test/infra/gitlab-ci.yml (.job-template): Pass ${http_proxy},
${https_proxy} and ${no_proxy} to the docker call.
(.tree-sitter-template): Add some dependencies.
Improves:
- fontification of generic types with namespace-prefixes
- function-call parameters
- variable use in string interpolation
- implicitly typed parameters in lambda-expressions
- index-expressions
- variables used in return-statements
- variables used in binary expressions
* lisp/progmodes/csharp-mode.el:
(csharp-ts-mode--font-lock-settings): Improve queries.
* lisp/emacs-lisp/package-vc.el (package-vc--main-file)
(package-vc--unpack-1): Provide a fallback value if the package
specification has no :lisp-dir.
When we don't have anything to give to Flymake, we still want to
signal we're alive so the mode-line doesn't show a confusing
'Wait'.
* lisp/progmodes/eglot.el (eglot--report-to-flymake): Clear 'Wait'
state.
* lisp/emacs-lisp/package.el (package-unpack, package-dir-info):
Check the marked files if in a Dired buffer, and otherwise
fallback on the previous behaviour or if there was no selection.
(package-install-from-buffer): Document the feature.
* etc/NEWS: Mention the change.
(Bug#78017)
* lisp/emacs-lisp/package-vc.el (package-vc--main-file): Use
`expand-file-name' to support :lisp-dir entries outside of the
elpa directory.
(package-vc--unpack-1): Same as above.
(package-vc-install-from-checkout): Instead of creating a
symlink to the requested directory, create an empty directory
and use autoload indirections, analogously to checkouts with
Lisp code in a subdirectory.
(Bug#78017)
Automatically figure out which regval can be used for insertion
and jump based on the presence of a matching method.
* lisp/register.el (register-type, register--type): Delete functions.
(register--get-method-type, register--jumpable-p)
(register--insertable-p): New functions.
(jump-to-register, insert-register): Use them.
* lisp/frameset.el (register--type): Delete method.
* lisp/register.el (register-command-info): Delete function.
(register-read-with-preview-fancy): Don't use it any more.
(jump-to-register, increment-register, view-register)
(insert-register, append-to-register, prepend-to-register):
Pass a `pred` arg instead.
* lisp/register.el (register--read-with-preview-function):
Improve docstring..
(register--type) <(eql nil)>: New method.
(register-of-type-alist, register-preview-1)
(register--preview-get-defaults): Replace `types` arg with `pred` arg.
(register-read-with-preview, register-read-with-preview-traditional):
Add `pred` arg.
(register-read-with-preview-fancy): Add `pred` arg.
Use it instead of the `types` info returned by `register-command-info`,
when provided.
* lisp/register.el (register-preview-info): Delete slot `act`.
(register-command-info): Delete arg `:act`.
(register--preview-get-defaults): Rename from
`register--preview-get-defaults` and rewrite with, different args.
(register-read-with-preview-fancy): Use it instead of `act`.
Use the `types` slot to carry that info instead.
Replace the list of types `(all)` with `(t)` since `t` is the
usual name of the "supertype of all types".
Use the type `null` to represent the fact that empty registers
can be used. Allow an empty list of types to stand for
`(t null)`, i.e. any register even empty ones.
* lisp/register.el (register-preview-info): Delete slot `smatch`.
(register-command-info): Delete arg `:smatch`. Adjust `:types` instead.
Fix the `copy-rectangle-to-register` case, which disallowed using
an empty register.
(register-of-type-alist): Adjust handling of `types` accordingly.
(register-preview-1): Simplify.
(register-read-with-preview-fancy): Use types instead of `smatch`.
Use it also in place of `act`.
* lisp/register.el (register-preview-info): Remove `noconfirm` slot.
(register-command-info): Delete `:noconfirm` args.
(register-read-with-preview-fancy): Hardcode the `noconfirm` setting
because it was always exactly the same anyway.
The code assumed that the string returned by `register-preview-function`
has the register name as the first char. This was an
incompatible change which broke packages that set this var,
such as `calculator.el` and others.
Remove this assumption by recording the register names in the
preview buffer on a new `register--name` text property.
While at it, fix a few other problems where control chars were
not pretty printed.
* lisp/register.el (register-preview-1): Remember the raw
register name in the `register--name` text property.
(register-preview-forward-line): Use the
`register--name` text property.
(register--find-preview): New function.
(register-read-with-preview-fancy): Use it.
If the last command inserted more than one char, only keep the first of
the new chars.
Make sure control chars are pretty printed in the minibuffer.
including minibuffer messages.
* lisp/frameset.el (register-val-jump-to): Fix `:cleanup-frames`.
The code did not obey its documented behavior and matched
against the wrong symbols.
* lisp/register.el (register-command-info) <append-to-register>,
<prepend-to-register>: Remove `number` from the `:types` argument
since those operations fail on numbers.
* lib-src/emacsclient.c (set_fg, get_wc): Declare using actual
function signatures.
(w32_give_focus): Cast return value of 'GetProcAddress' to correct
pointer types. (Bug#78160)
* lisp/progmodes/cperl-mode.el (cperl-mode-map): Don't bind C-j.
The default global mode bindings will DTRT depending on whether
or not electric-indent-mode is on.
* lisp/register.el (frame-register, kmacro-register): Remove bogus deftypes.
(register--type) <oclosure>: Fix kmacro method and generalize it to
any OClosure.
(register--type) <frameset-register>: Fix method and move it to ...
* lisp/frameset.el (register--type) <frameset-register>: ... here,
where `frameset-register` is defined.