* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Raise an error
if the package name is empty.
(package-vc-install): Avoid generating an empty file name, if a URL
ends with a slash, and raise an error if the package name is empty.
This reversion is of an ill-advised optimization, which resulted in non-type
identifiers getting fontified as types.
* lisp/progmodes/cc-fonts.el (c-fontify-new-found-type): Rather than writing
the expected face directly to the text, instead remove the `fontified'
property. This allows the full font-lock mechanism to fontify the buffer
correctly.
* lisp/erc/erc-networks.el
(erc-networks--copy-server-buffer-functions): New internal hook
through which modules can perform housekeeping when server buffers
belonging to the same network context are merged.
(erc-networks--copy-over-server-buffer-contents): Run new internal
hook `erc-networks--copy-server-buffer-functions'.
* lisp/erc/erc-track.el (erc-track-enable, erc-track-disable): Manage
membership in `erc-networks--copy-server-buffer-functions' hook.
(erc-track--replace-killed-buffer): New function to replace server
buffer being killed in `erc-modified-channels-alist'.
* test/lisp/erc/erc-scenarios-base-association.el
(erc-scenarios-networks-merge-server-track): New test.
* test/lisp/erc/resources/networks/merge-server/track.eld: New test
data. (Bug#60560.)
* test/lisp/erc/erc-services-tests.el
(erc--auth-source-search--plstore-standard,
erc--auth-source-search--plstore-announced,
erc--auth-source-search--plstore-overrides): Kill buffer renamed by
plstore. In the future, try using the `:buffer' keyword introduced in
Emacs 29.
* test/lisp/erc/resources/erc-d/erc-d-t.el
(erc-d-t-kill-related-buffers): Don't forget about `erc-dcc-chat-mode'
buffers.
Follow-up on bug#60689. This commit just copied the change in
e385c099b8 to js-ts-mode.
* lisp/progmodes/js.el:
(js--treesit-font-lock-settings): Add import query.
(bug#60689)
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--font-lock-settings): Add rules to highlight the
actual imports in import-statements.
If the first line is "/*" or "/* ", indent like this:
/*
aaa
If the first line is "/* some text", indent like this:
/* some text
aaa
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles):
(c-ts-mode--looking-at-star): Minor refactor.
(c-ts-mode--comment-2nd-line-matcher)
(c-ts-mode--comment-2nd-line-anchor): New functions.
* lisp/treesit.el (treesit-simple-indent-presets):
prev-adaptive-prefix doesn't handle the comment-start-skip case (i.e,
2nd line) anymore. (Handled by the new matcher.)
If you open an empty python buffer and type
1 + 2
a
b
Currently the explorer only displays the top-level node at point, ie,
only 1 + 2, only a, or only b. That's kind of awkward, so if the
buffer is small, show the entire parse tree.
* lisp/treesit.el (treesit--explorer-refresh): See above.
There are two possible ways to solve the problem raised in the bug
report: either make sure NODE is never the root (so that parent is
never nil), or allow parent to be nil.
If we go with the latter, a lot of matcher and anchor functions need
change (they need to guard against a null parent). I tried it, and
needing to check for null parent is pretty annoying. In comparison,
if NODE is never the root, it is very convenient for the user, and it
doesn't complicate the rule that much (and it's rather intuitive,
people usually don't think of the case where NODE is the root node).
So that's what I choose.
* doc/lispref/modes.texi (Parser-based Indentation): Update manual.
* lisp/treesit.el (treesit-indent-function): Update docstring.
(treesit--indent-1): Make sure NODE is not the root.
The previous fix isn't correct.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-styles): New indent rule. Fix the rule for Linux
style.
(c-ts-mode--top-level-label-matcher): New function.
The Imenu items are extended to support "Method", "Struct",
"Interface", "Alias" and "Type".
go-ts-mode is updated to use the Imenu facility added in commit
b39dc7ab27.
Variable electric-indent-chars is set in order to improve integration
with Electric Pair mode.
* lisp/progmodes/go-ts-mode.el (go-ts-mode--imenu-1) (go-ts-mode--imenu):
Remove functions.
(go-ts-mode--defun-name, go-ts-mode--interface-node-p)
(go-ts-mode--struct-node-p, go-ts-mode--other-type-node-p)
(go-ts-mode--alias-node-p): New functions.
(go-ts-mode): Improve Imenu settings, navigation, add Electric Pair
mode settings.
XDG_DATA_DIRS may consist of multiple directories, and
g_settings_schema_source_get_default composes these into a recursive
schema source. One must pass TRUE to g_settings_schema_source_lookup,
otherwise only the first directory in XDG_DATA_DIRS is searched.
It follows that in the case that the directory containing the compiled
GSettings schema for Emacs is not the first in XDG_DATA_DIRS,
parse_resource_key will not accept any resource key, which causes
pgtk_get_defaults_value and pgtk_set_defaults_value to fail.
This impacts systems that compose multiple GSettings schema sources
via XDG_DATA_DIRS, such Flatpak and NixOS.
Supporting GIO documentation for g_settings_schema_source_get_default:
> The returned source may actually consist of multiple schema sources
> from different directories, depending on which directories were given
> in `XDG_DATA_DIRS` and `GSETTINGS_SCHEMA_DIR`. For this reason, all
> lookups performed against the default source should probably be done
> recursively.
Bug#60565
Copyright-paperwork-exempt: yes
A more accurate replacement for font-lock-fontify-syntactically-region
would be a function that funcalls the
font-lock-fontify-syntactically-function variable. That way, callers
of the function can inherit new behavior, if the value of that variable
changes.
* lisp/font-lock.el (font-lock-fontify-syntactically-region):
Add function back, remove its obsolete alias.
Copyright-paperwork-exempt: yes
* lisp/simple.el (read-extended-command-predicate): Expand the
doc string. Add 2 more selectable values.
(command-completion-using-modes-and-keymaps-p): New function.
(execute-extended-command): Mention
'read-extended-command-predicate' in the doc string. (Bug#60645)
* lisp/progmodes/python.el:
(python--treesit-fontify-string-interpolation): New function.
(python--treesit-settings): Use the new function for
string-interpolation.
(bug#60546)
- Highlight variable declarations in catch-clauses.
- Remove highlighting of variables where not declarations (improve
consistency with other *-ts-modes).
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--font-lock-settings): See above.
Right now the Class subindex includes top-level functions, which is
wrong. This change ensures the Class subindex only contain classes and
functions nested in those classes.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--defun-for-class-in-imenu-p): New function.
* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Use the new function.
Explain that tree-sitter c modes and cc-mode c modes don't share
config variables.
* lisp/progmodes/c-ts-mode.el (c-ts-mode)
(c++-ts-mode): Update docstring.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Improve highlighting in patterns: highlight values not keys as
variable in the usual case; highlight keys when no value;
highlight the "as pattern" variable.
This is an additional fix for bug#60397.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--declarator-identifier): New parameter QUALIFIED.
(c-ts-mode--defun-name): Use qualified identifier.
Not a complete fix. See the next commit.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add rules.
(c-ts-mode--defun-name): Add namespace_definition.
(c-ts-base-mode): Add namespace_definition to
treesit-defun-type-regexp.
Not the topic of bug#60270 but reported in one of the replies.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--looking-at-star): Check not
the character after point but character after BOL. Otherwise
indentation is wrong when point is not at BOL.
* doc/lispref/symbols.texi (Standard Properties): Document
'definition-name'.
* doc/lispref/functions.texi (Defining Functions): Describe how to
use 'definition-name' when generating function definitions at run
time. (Bug#60568)