Commit graph

12723 commits

Author SHA1 Message Date
Eli Zaretskii
26873d5028 Avoid warning when loading 'go-ts-mode'
* lisp/progmodes/go-ts-mode.el (treesit-ready-p): Silence the
warning if the gomod language library is not installed.
(Bug#77213)
2025-03-29 13:36:02 +03:00
Gerd Möllmann
638ec3cd66 Remove a use of a PUA Unicode character (bug#77328)
* lisp/progmodes/eglot.el (eglot-code-action-indicator): Use
U+1F4A1 ELECTRIC LIGHT BULB instead of a PUA character.
2025-03-28 14:48:33 +01:00
Jimmy Aguilar Mena
59fd8c26be Add jump action to margin indicators in flymake
(flymake--indicator-overlay-spec): Receive type instead of prepossessed
indicator.
(flymake--resize-margins): Update reference call to
flymake--indicator-overlay-spec.
(flymake-show-buffer-diagnostics-at-event-line):
(flymake-diagnostics-at-mouse-event):
(flymake-show-buffer-diagnostics-at-event-position): New functions.
(flymake-after-show-buffer-diagnostics-hook): New custom with actions
when jumping to an error line.
(flymake-pulse-momentary-highlight-region):
(flymake-show-buffer-diagnostics): Receive new optional argument with
current diagnostic information.  Add code to jump and execute the new hook
after jumping (bug#75841).
2025-03-27 20:15:45 +02:00
Stefan Monnier
1db7aaceb9 PEG: Fix bug#76555
* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix `define-peg-ruleset` example.

* lisp/progmodes/peg.el (define-peg-rule): Fix indent rule.
2025-03-27 08:59:32 -04:00
Alan Mackenzie
555ec43a32 C++ Mode: Fix some indentation bugs. FIxes bug#19867
1. Fix closing paren aligning with trailing comment on line
with matching open paren.
2. Fix indentation of first identifier inside a comma separated
list aligning with the type rather than the subsequent
identifiers.
3. Fix lambda expressions inside a brace list aligning like a
single statement.

* lisp/progmodes/cc-align.el (c-lineup-arglist): Take into
account any preceding comments when lining up the arguments in
the arglist.
(c-lineup-arglist-intro-after-paren): Handle comments properly,
and don't line up the closing parenthesis with a trailing
comment on the first line.
(c-lineup-item-after-paren-at-boi): Also allow a paren to count
as being at BOI when it is preceded only by open parens on that
line.
(c-lineup-runin-statements, c-lineup-ObjC-method-call): Hanle
comments better.

* lisp/progmodes/cc-engine.el (c-forward-comments) Introduce an
optional limit parameter.  Use this limit in calls from
cc-align.el and cc-mode.el.
(c-just-after-func-arglist-p): Handle the presence of a
protection keyword such as "public".
(c-at-bracelist-p): Renamed from c-inside-bracelist-p, after
dropping the accept-in-paren parameter, having removed its
functionality.
(c-looking-at-statement-block-1): New function, based on the
old c-looking-at-statement-block.  Enhanced to handle C++
lambda expressions, and to return the symbol `maybe' when the
contents of a brace delimited block fail to determine whether
it is a statement block.
(c-looking-at-statement-block): Enhanced to examine the context
of a brace delimited block when the contents are ambiguous.
(c-looking-at-c++-lambda-expression): Check the character after
point is a < before calling c-forward-<>-arglist.
(c-add-stmt-syntax): Make the context more accurate by calling
c-looking-at-statement-block.
(c-guess-basic-syntax, CASE 5D.5): Replace the syntactic symbol
topmost-intro-cont with the new symbol class-field-cont,
additionally determining the position of the enclosing brace as
an extra anchor point.
(c-guess-basic-syntax, CASE 5V): New case for an identifier
following a type inside class braces.
(c-guess-basic-syntax, CASE 9): Use
c-looking-at-statement-block to detect a brace list more
accurately.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context):
Rename the call to c-inside-bracelist-p to c-at-bracelist-p.

* lisp/progmodes/cc-langs.el (c-protection-kwds): Add an entry
for java-mode.
(c-stmt-block-only-keywords-regexp): Prevent this regexp also
matching a character preceding the keyword.

* /lisp/progmodes/cc-mode.el (c-before-change-include-<>)
(c-after-change-include-<>): Use the new limit argument to
c-forward-comments.

* lisp/progmodes/cc-styles.el (c-style-alist, "gnu" and "java"
styles): Change the offset for arglist-close to
c-lineup-arglist-close-under-paren.

* lisp/progmodes/cc-vars.el (c-offsets-alist): Introduce the
new syntactic symbol class-field-cont, giving it default
offset +.

* doc/misc/cc-mode.texi (Syntactic Symbols, Class Symbols):
Document the new syntactic symbol class-field-cont.
2025-03-27 10:24:48 +00:00
Stefan Monnier
fb4db5c1a7 PEG: Fix bug#76555
* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix `define-peg-ruleset` example.

* lisp/progmodes/peg.el (define-peg-rule): Fix indent rule.
2025-03-25 22:17:32 -04:00
James Cherti
1aebb02611 ElDoc: Add more commands using 'eldoc-add-command-completions'
Add more commands to 'eldoc-add-command-completions' to fix
disappearing ElDoc help in the minibuffer for the following
cases:
- All modes: Added "comment-indent-new-line".
- All modes: Added "delete-char" for handling when the user presses delete.
- Python mode: Added "python-indent-dedent-line-backspace" for handling
  when the user presses backspace.
* lisp/emacs-lisp/eldoc.el (eldoc-remove-command-completions):
* lisp/progmodes/python.el (python-base-mode): Add more commands
to 'eldoc-add-command-completions'.

Copyright-paperwork-exempt: yes
2025-03-22 13:55:09 +02:00
john muhl
cf7fdd374a ; Update version comment in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el: Update comment for version
0.3.0 of tree-sitter-lua grammar.  (Bug#77158)
2025-03-22 09:12:01 +02:00
Daniel Colascione
2fcf6b4086 xref: error -> user-error: reduce debug-on-error annoyance
* lisp/progmodes/xref.el (xref--next-error-function): Use user-error
instead of error.
2025-03-21 21:11:07 -04:00
Stefan Kangas
40a17ce3b2 Make compilation-filter-hook into a defcustom
* lisp/progmodes/compile.el (compilation-filter-hook): Make variable
into a defcustom.
2025-03-20 19:21:08 +01:00
Vincenzo Pupillo
cace07f27d MariaDB and Mysql handle escaped aphostrophes in the same way
* lisp/progmodes/sql.el (sql-mode): MariaDB and Mysql both
handle escaped apostrophes in the same way.  (Bug#77088)
2025-03-20 14:47:18 +02:00
Yuan Fu
eb63d0c04a
Add some keywords to java-ts-mode--keywords (bug#75154)
* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--keywords): Add keywords, remove @interface.
2025-03-16 22:44:05 -07:00
Yuan Fu
3d2d95e284
Move around java-ts-mode font-lock rules (bug#75154)
* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--font-lock-settings): Move constant feature down
so it overrides expression and definition.
2025-03-16 22:44:05 -07:00
Yuan Fu
93cd55f40e
Use c-ts-common baseline rule in java-ts-mode (bug#75154)
Use it for function parameters.

* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--standalone-predicate): New function.
(java-ts-mode--indent-rules): Comment out rules for function
parameters and statements, and add
c-ts-common-baseline-indent-rule as fallback.
(java-ts-mode): Setup.
(java-ts-mode--first-line-on-multi-line-string): Mark BOL as
unused.
* test/lisp/progmodes/java-ts-mode-resources/indent.erts:
New test.
2025-03-16 22:44:05 -07:00
Yuan Fu
affb2ba77b
Add indentation for multi-line string in java-ts-mode (bug#75154)
* lisp/progmodes/java-ts-mode.el:
(java-ts-mode--first-line-on-multi-line-string): New function.
(java-ts-mode--indent-rules): Add rules.
2025-03-16 22:44:04 -07:00
Yuan Fu
8fb31f5866
Add java-ts-mode-method-chaining-indent-offset (bug#75154)
Default method chaining to indent 8 spaces.

* lisp/progmodes/java-ts-mode.el:
(java-ts-mode-method-chaining-indent-offset): New custom option.
(java-ts-mode--indent-rules): Use
java-ts-mode-method-chaining-indent-offset.
2025-03-16 22:44:04 -07:00
Stefan Kangas
d8d524071d Use defvar-keymap for some trivial keymaps
* lisp/bindings.el (mode-line-window-dedicated-keymap)
(mode-line-buffer-identification-keymap):
* lisp/emulation/cua-rect.el (cua--overlay-keymap, cua--overlay-key):
* lisp/mh-e/mh-mime.el (mh-mime-security-button-map):
* lisp/mh-e/mh-utils.el (mh-hidden-header-keymap):
* lisp/net/eudc-bob.el (eudc-bob-generic-keymap, eudc-bob-image-keymap)
(eudc-bob-sound-keymap, eudc-bob-url-keymap, eudc-bob-mail-keymap):
* lisp/progmodes/etags-regen.el (etags-regen-mode-map):
* lisp/progmodes/octave.el (octave-help-mode-map):
* lisp/replace.el (multi-query-replace-map):
* lisp/simple.el (process-menu-mode-map, messages-buffer-mode-map):
* lisp/startup.el (splash-screen-keymap):
* lisp/tab-bar.el (tab-bar-mode-map):
* lisp/textmodes/ispell.el (ispell-minor-keymap):
* lisp/textmodes/tex-mode.el (latex-mode-map, plain-tex-mode-map):
* lisp/tree-widget.el (tree-widget-button-keymap):
* lisp/vc/vc-hooks.el (vc-mode-line-map): Use defvar-keymap.
2025-03-16 13:48:11 +01:00
Sean Whitton
db0bed7a68 New project-save-some-buffers command
* lisp/progmodes/project.el (project-save-some-buffers): New command.
(project-prefix-map): Bind it to C-x p C-x s.
* etc/NEWS: Announce the new command and binding.
2025-03-16 11:31:55 +08:00
Juri Linkov
f3925732bc Add the treesit 'list' thing to csharp/go/php/rust-ts-mode (bug#73404)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode): Add the
'list' and 'sentence' things to 'treesit-thing-settings'.
Set 'treesit-outline-predicate'.

* lisp/progmodes/go-ts-mode.el (go-ts-mode):
Add 'treesit-thing-settings' with the 'list' and 'sentence' things.

* lisp/progmodes/php-ts-mode.el (php-ts-mode):
Add the 'list' thing to 'treesit-thing-settings'.

* lisp/progmodes/rust-ts-mode.el (rust-ts-mode):
Add 'treesit-thing-settings' with the 'list' thing.
2025-03-15 20:37:46 +02:00
Stefan Kangas
679ad95a67 Recommend using 'keymap-global-set' in Commentaries
* lisp/bs.el, lisp/calculator.el, lisp/cedet/data-debug.el:
* lisp/help-at-pt.el, lisp/hilit-chg.el, lisp/mail/mspools.el:
* lisp/mh-e/mh-e.el, lisp/mouse-copy.el, lisp/mouse-drag.el:
* lisp/net/browse-url.el, lisp/net/webjump.el, lisp/printing.el:
* lisp/progmodes/cfengine.el, lisp/progmodes/ebnf2ps.el:
* lisp/ps-print.el, lisp/repeat.el, lisp/term/wyse50.el:
* lisp/term/x-win.el, lisp/vcursor.el, lisp/woman.el:
Recommend using 'keymap-global-set' instead of 'global-set-key'.
2025-03-15 04:06:31 +01:00
Stefan Kangas
2009ae8593 Use defvar-keymap in which-func.el
* lisp/progmodes/which-func.el (which-func-keymap): Use defvar-keymap.
(which-func-maxout): Change :type to natnum.
(which-func-format): Use substitute-command-keys.
2025-03-15 04:06:31 +01:00
john muhl
1528d31564 Simplify and improve indent rules in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (c-ts-common): Require it.
(lua-ts-mode): Set 'c-ts-common' variables.
(lua-ts--simple-indent-rules): Replace custom indent rules for
tables, arguments and parameters with
'c-ts-common-baseline-indent-rule'.
Improve consistency of indentation for IIFEs and nested functions.
(lua-ts--variable-declaration-continuation)
(lua-ts--variable-declaration-continuation-anchor): Reformat.
(lua-ts--comment-first-sibling-matcher)
(lua-ts--first-child-matcher, lua-ts--first-real-sibling-anchor)
(lua-ts--function-definition-p, lua-ts--g-g-g-parent)
(lua-ts--g-g-parent, lua-ts--nested-function-argument-matcher)
(lua-ts--nested-function-block-include-matcher)
(lua-ts--nested-function-block-matcher)
(lua-ts--nested-function-end-argument-matcher)
(lua-ts--nested-function-end-matcher)
(lua-ts--nested-function-last-function-matcher)
(lua-ts--top-level-function-call-matcher): Remove.
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
Update tests.  (Bug#76986)
2025-03-13 10:09:38 +02:00
Sean Whitton
2aef2951c0 ; Replace "Elisp" with "Lisp" or "Emacs Lisp" in some places
* configure.ac (libgccjit_not_found_err)
(libgccjit_dev_not_found_err):
* doc/lispref/elisp.texi (Top):
* doc/lispref/functions.texi (What Is a Function):
* doc/lispref/parsing.texi (Parsing Program Source)
(Tree-sitter C API):
* doc/misc/gnus.texi (The Gnus Registry):
* etc/TODO:
* lisp/auth-source.el (auth-source-search):
* lisp/cedet/semantic/bovine/el.el (emacs-lisp-mode):
* lisp/editorconfig.el
(editorconfig-get-local-variables-functions):
* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper):
* lisp/net/tramp-message.el (tramp-debug-font-lock-keywords):
* src/frame.c (do_switch_frame):
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-help-fns-examples-function-test): Say "Lisp"
not "Elisp".
* lisp/progmodes/peg.el (peg-translate-exp): Say "Emacs Lisp"
not "Elisp".
2025-03-12 10:24:22 +08:00
Sean Whitton
99852fb867 Merge from origin/emacs-30
894b0e3a2f ; Adapt comment in tramp.el
cc87717fa0 Add keyword placeholder to tramp.el
7d0d61d854 Rewrite ERT manual introduction
b2f124f2a8 ; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec
59d1aac49d Document return values of the various read-* functions
2025-03-12 10:09:09 +08:00
Sean Whitton
60c0524ad2 Fix capitalization ELisp -> Elisp
* configure.ac (libgccjit_not_found_err)
(libgccjit_dev_not_found_err):
* doc/emacs/buffers.texi (List Buffers):
* doc/lispref/elisp.texi (Tree-sitter C API):
* doc/lispref/functions.texi (What Is a Function):
* doc/lispref/parsing.texi (Parsing Program Source)
(Tree-sitter C API):
* doc/misc/gnus.texi (The Gnus Registry):
* etc/DEBUG:
* etc/NEWS:
* etc/NEWS.25:
* etc/NEWS.26:
* etc/NEWS.28:
* etc/NEWS.30:
* etc/TODO:
* lib-src/emacsclient.c (print_help_and_exit):
* lisp/auth-source.el (auth-source-search):
* lisp/cedet/semantic/bovine/el.el (emacs-lisp-mode):
* lisp/cedet/semantic/wisent/comp.el
(wisent-automaton-lisp-form):
* lisp/cedet/srecode/el.el (srecode-semantic-apply-tag-to-dict):
* lisp/editorconfig.el
(editorconfig-get-local-variables-functions):
* lisp/emacs-lisp/bindat.el (bindat-type):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
* lisp/emacs-lisp/cl-macs.el (cl--labels-convert):
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs)
(lisp-fill-paragraphs-as-doc-string):
* lisp/emacs-lisp/macroexp.el (macroexp--fgrep):
* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper):
* lisp/emacs-lisp/re-builder.el:
* lisp/erc/erc-button.el (erc-emacswiki-lisp-url):
* lisp/help-fns.el
(help-fns--describe-function-or-command-prompt):
* lisp/menu-bar.el (menu-bar-search-documentation-menu):
* lisp/net/tramp-message.el (tramp-debug-font-lock-keywords):
* lisp/org/org-capture.el (org-capture):
* lisp/org/org.el (org-category, org-todo):
* lisp/org/ox.el (org-export-async-start):
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
* lisp/progmodes/peg.el (peg-translate-exp):
* lisp/progmodes/ruby-ts-mode.el:
* lisp/woman.el (woman-mode, woman-parse-numeric-arg):
* src/chartab.c (map_char_table_for_charset):
* src/fns.c (extract_data_from_object):
* src/frame.c (do_switch_frame):
* src/keyboard.c (make_lispy_event):
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments):
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-help-fns-examples-function-test):
* test/manual/etags/c-src/emacs/src/keyboard.c
(make_lispy_event): Fix capitalization ELisp -> Elisp.
2025-03-12 09:38:33 +08:00
Stefan Kangas
ceee1a0ae7 ; Fix project-list-file on Emacs 26.1
* lisp/progmodes/project.el (project-list-file): Unbreak use of
'locate-user-emacs-file' on Emacs 26.1.
Problem reported by Dmitry Gutov <dmitry@gutov.dev>.
2025-03-11 21:26:51 +01:00
Yuan Fu
3b3170244d
Fix c-ts-common-baseline-indent-rule for lists (bug#76908)
* lisp/progmodes/c-ts-common.el:
(c-ts-common-baseline-indent-rule): Use the first non-comment
sibling rather than first sibling.
2025-03-11 02:36:11 -07:00
Stefan Kangas
672df0288b Bump python.el package version to 0.30
* lisp/progmodes/python.el: Bump package version to 0.30.
2025-03-11 01:15:41 +01:00
Stefan Kangas
46f9ebaec3 Make python.el compatible with Emacs 29.1
* lisp/progmodes/python.el (python--treesit-fontify-string): Don't
call treesit--compute-font-lock-level unless it is
fboundp.  (Bug#76873)
2025-03-11 01:14:35 +01:00
Harald Jörg
442d16266e ; cperl-mode.el: Improve docstring cperl-fontify-trailer
* lisp/progmodes/cperl-mode.el (cperl-fontify-trailer): Document
that this setting also affects indentation (Bug#76868).
2025-03-10 11:40:10 +01:00
Stefan Monnier
c4a2823166 (makefile-dependency-regex): Fix bug#76759
* lisp/progmodes/make-mode.el (makefile-dependency-regex):
Decompose the regexp to be more understandable, and then change
it so the target part can't accidentally match a TAB.

* test/lisp/progmodes/make-mode-tests.el (make-mode-tests--bug17400):
New test.
2025-03-09 22:07:39 -04:00
Stefan Kangas
3396f0e567 Use .eld for some relevant cache and data files
* lisp/bookmark.el (bookmark-default-file):
* lisp/net/nsm.el (nsm-settings-file):
* lisp/progmodes/project.el (project-list-file):
* lisp/saveplace.el (save-place-file): Rename files to have the file
suffix ".eld".  This change is backwards-compatible.
2025-03-09 18:24:21 +01:00
Harald Jörg
b2f124f2a8 ; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec
* lisp/progmodes/cperl-mode.el
(cperl-after-block-and-statement-beg): Recognize _ as part of a
Perl symbol.  Fixes Bug#76851

* test/lisp/progmodes/cperl-mode-resources/cperl-indents.erts
Two new test cases around the edges of Bug#76851
2025-03-09 16:26:51 +01:00
Eli Zaretskii
eb03969846 Merge from origin/emacs-30
35c7837c66 Fix TAGS regeneration with Universal Ctags
2025-03-09 07:33:14 -04:00
Eli Zaretskii
bcfa9692f0 Merge from origin/emacs-30
af8017b23f Explicitly document read-string return value
cf03c2b609 Improve docstrings of python.el import management
01bcc6961a ; Improve doc strings of Speedbar
bd9c76ab17 Avoid warnings about 'image-scaling-factor' in builds --w...
2025-03-09 07:33:13 -04:00
Ben Scuron
35c7837c66 Fix TAGS regeneration with Universal Ctags
* lisp/progmodes/etags-regen.el (etags-regen--append-tags): Move
the "-o" option to before the filename, as Ctags doesn't allow
it to follow the file name.  (Bug#76855)

Copyright-paperwork-exempt: yes
2025-03-09 08:19:01 +02:00
john muhl
2f1b1414f7 Use TS to support 'hs-minor-mode' in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Add list type to
'treesit-thing-settings'.
* lisp/progmodes/hideshow.el (hs-special-modes-alist):
Remove regular expression based implementation.
* test/lisp/progmodes/lua-ts-mode-resources/hide-show.lua: New file.
* test/lisp/progmodes/lua-ts-mode-tests.el (lua-ts-test-hideshow):
Add test.  (Bug#76693)
2025-03-08 20:50:59 +02:00
João Távora
d81cdf9fd2 Eglot: unbreak from Emacs 26.3 (two-arg setq-local)
* lisp/progmodes/eglot.el (eglot--hierarchy-1): Use two-arg setq-local
2025-03-08 05:15:57 +00:00
kobarity
cf03c2b609 Improve docstrings of python.el import management
Added notes that when adding import statements for a file that
does not belong to a project, it may take some time to find
candidate import statements in the default directory.

* lisp/progmodes/python.el (python-add-import)
(python-fix-imports): Improve docstring.  (Bug#74894)
2025-03-07 16:52:09 +02:00
Stefan Monnier
2dea3a0d34 (python-base-mode-map): Use it!
Rather than use `copy-keymap` between `python-mode-map` and
`python-ts-mode-map`, move the shared bindings to `python-base-mode-map`.

* lisp/progmodes/python.el (python-base-mode-map): Define it explicitly.
Move all the bindings of `python-mode-map` to it.
(python-mode-map, python-ts-mode-map): Inherit from it.
2025-03-06 23:23:08 -05:00
Juri Linkov
63cc542b94 Improve treesit settings for js/typescript/ruby-ts-mode (bug#73404)
* lisp/progmodes/js.el (js--treesit-list-nodes):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--list-nodes):
Replace leaf "string" with "template_string" and "template_substitution"
that can contain more nodes.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Add the 'sentence' thing to treesit-thing-settings.
2025-03-06 20:22:50 +02:00
Visuwesh
6aa60038ee Add new user option to exclude projects from being remembered
* lisp/progmodes/project.el (project-list-exclude): Add new user
option to exclude projects from being remembered.
(project-remember-project): Consider the user option above.
(project-switch-project): Use 'project-remember-project' instead.
* doc/emacs/maintaining.texi (Managing Projects): Mention the new user option.
* etc/NEWS: Announce the change.  (Bug#76587)
2025-03-06 04:49:33 +02:00
Juri Linkov
70d0da3fe0 Improve treesit settings for java-ts-mode (bug#73404, bug#76493)
* lisp/progmodes/java-ts-mode.el (java-ts-mode):
Add the 'list' thing to 'treesit-thing-settings'.
Set 'treesit-outline-predicate'.
2025-03-05 19:47:31 +02:00
Juri Linkov
68def672e6 Improve treesit settings for typescript/tsx-ts-mode (bug#73404)
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Add @font-lock-type-face
for 'internal_module' with 'identifier'.
(typescript-ts-mode--defun-type-regexp): New variable with
"internal_module" and "interface_declaration".
(typescript-ts-mode--defun-name): New function that uses
'js--treesit-defun-name' and adds "internal_module" and
"interface_declaration".
(typescript-ts-mode--simple-imenu-settings): New variable
like in 'js-ts-mode' with "Namespace" and "Interface" sections.
(typescript-ts-mode--outline-predicate): New variable.
(typescript-ts-base-mode): Set treesit-defun-type-regexp to
typescript-ts-mode--defun-type-regexp, treesit-defun-name-function
to typescript-ts-mode--defun-name, treesit-simple-imenu-settings
to typescript-ts-mode--simple-imenu-settings,
treesit-outline-predicate to typescript-ts-mode--outline-predicate.
Use js--regexp-opt-symbol for treesit-thing-settings.
(tsx-ts-mode): For 'sentence' thing use the same nodes as
js--treesit-sentence-nodes.  Use js--regexp-opt-symbol for
treesit-thing-settings.

* lisp/progmodes/js.el (js--treesit-sentence-nodes): Add
"jsx_opening_element" and "jsx_closing_element" like in html.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--outline-predicate): Add
outline headings for C++ "namespace_definition" and "class_specifier".
2025-03-05 19:44:44 +02:00
Po Lu
9daab9be34 Merge from savannah/emacs-30
7dcf9b71e6 ; Don't document package-x.el
a5fd518d52 ; Document spurious warnings on macOS 15
625ed68aea Fix the use of xref-window-local-history together with Xr...
8091772767 completing-read-multiple: Fix support for ":" as separator
38cc36a375 ; Improve docstring of cl-check-type
2025-03-04 14:32:33 +08:00
Juri Linkov
dbc0e5a52d Improve treesit settings for js-ts-mode (bug#73404)
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
Add 'class' alongside 'class_declaration'.
(js--treesit-defun-name): Add "variable_declaration"
alongside "lexical_declaration".
(js--treesit-valid-imenu-entry): Add "variable_declaration"
and provide the predicate to 'treesit-node-top-level'.
(js--treesit-sentence-nodes): Add "jsx_attribute" like in html-ts-mode
instead of jsx elements matched in 'js--treesit-list-nodes'.
(js--treesit-list-nodes): Add "jsx_element" and "jsx_self_closing_element"
instead of "_jsx_string".
(js--treesit-simple-imenu-settings): Move "method_definition" to separate
section "Method" from the "Class" section.  Add "variable_declaration"
to the "Variable" section.
(js-ts-mode--outline-predicate): New variable.
(js--treesit-defun-type-regexp): Add bos/eos.
(js--treesit-jsdoc-comment-regexp): Add bos/eos.
(js-ts-mode): Set treesit-outline-predicate to
'js-ts-mode--outline-predicate'.

* lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode--html-defun-name):
Remove unused function.
(mhtml-ts-mode): Use 'js-ts-mode--outline-predicate' in
'treesit-aggregated-outline-predicate'.

* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode--outline-predicate):
Use 'treesit-node-top-level' instead of 'treesit-parent-until'.
2025-03-03 20:38:40 +02:00
João Távora
07bbfea901 Eglot: fix invocation of neocmakelsp
* lisp/progmodes/eglot.el (eglot-server-programs): Fix invocation
of neocmakelsp
2025-03-02 22:22:15 +00:00
Felician Nemeth
18c81b76bc Eglot: implement additionalPropertiesSupport for showMessage
This feature was introduced in LSP v3.16.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#window_showMessageRequest

* lisp/progmodes/eglot.el (eglot-client-capabilities): Set
window/showMessage/messageActionItem/additionalPropertiesSupport to t.
(eglot-handle-request window/showMessageRequest): Return the whole
selected MessageActionItem, not just its title.

Co-authored-by: João Távora <joaotavora@gmail.com>
2025-03-02 22:22:09 +00:00
Stefan Kangas
1b77e94bcc ; Move python.el Maintainer header further up
This is more consistent with our common practices.
2025-03-02 18:53:27 +01:00
Stefan Kangas
538ab57dc5 Bump python.el package version to 0.29
* lisp/progmodes/python.el: Bump package version to 0.29.
2025-03-02 18:53:09 +01:00