aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/ruby-ts-mode.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* Fix indentation of keyword argument arrays/hashes in ruby-modeAaron Jensen2025-11-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Check for ':' and '=>' as previous tokens, and handle symbols ending with ':' to properly indent keyword argument arrays and hashes when ruby-bracketed-args-indent is nil. * lisp/progmodes/ruby-ts-mode.el (ruby-ts--parent-call-or-bol): Handle arrays/hashes that are children of 'pair' nodes (keyword arguments) to ensure consistent indentation. * test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb: Add test cases for keyword argument arrays and hashes with both symbol-colon and hash-rocket syntax. When ruby-bracketed-args-indent is nil, arrays and hashes used as keyword argument values now indent by ruby-indent-level from the line start, matching the documented behavior and fixing inconsistent indentation (bug#74517). (https://lists.gnu.org/archive/html/emacs-devel/2025-11/msg00939.html)
* Check if treesit-major-mode-remap-alist is bound in ts-modes autoload formsJuri Linkov2025-10-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/c-ts-mode.el: * lisp/progmodes/cmake-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/dockerfile-ts-mode.el: * lisp/progmodes/elixir-ts-mode.el: * lisp/progmodes/go-ts-mode.el: * lisp/progmodes/heex-ts-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/lua-ts-mode.el: * lisp/progmodes/php-ts-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/rust-ts-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/typescript-ts-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/markdown-ts-mode.el: * lisp/textmodes/mhtml-ts-mode.el: * lisp/textmodes/toml-ts-mode.el: * lisp/textmodes/yaml-ts-mode.el: In autoload forms replace '(treesit-available-p)' with (boundp 'treesit-major-mode-remap-alist). Calling 'treesit-available-p' in loaddefs.el is too early since the tree-sitter library might not be loaded yet. Checking if 'treesit-major-mode-remap-alist' is bound is equivalent to checking if Emacs is compiled with tree-sitter support. (bug#79622)
* Silence byte-compile warnings when treesit is not availableJuri Linkov2025-08-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/c-ts-mode.el: * lisp/progmodes/cmake-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/dockerfile-ts-mode.el: * lisp/progmodes/elixir-ts-mode.el: * lisp/progmodes/go-ts-mode.el: * lisp/progmodes/heex-ts-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/lua-ts-mode.el: * lisp/progmodes/php-ts-mode.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/rust-ts-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/typescript-ts-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/markdown-ts-mode.el: * lisp/textmodes/mhtml-ts-mode.el: * lisp/textmodes/toml-ts-mode.el: * lisp/textmodes/yaml-ts-mode.el: Declare 'treesit-major-mode-remap-alist' and 'treesit-language-available-p' to silence warnings that are false alarms. Also improve docstrings.
* New user option 'treesit-enabled-modes' (bug#79180)Juri Linkov2025-08-141-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/treesit.el (treesit-enabled-modes): New user option. * src/treesit.c (treesit-major-mode-remap-alist): New variable. * lisp/progmodes/c-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/sh-script.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/mhtml-ts-mode.el: * lisp/textmodes/toml-ts-mode.el: Add ts-mode mapping to 'treesit-major-mode-remap-alist' for ts-modes that already have the corresponding non-ts mode association in 'auto-mode-alist'. * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode-maybe): * lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode-maybe): * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode-maybe): * lisp/progmodes/go-ts-mode.el (go-ts-mode-maybe) (go-mod-ts-mode-maybe, go-work-ts-mode-maybe): * lisp/progmodes/heex-ts-mode.el (heex-ts-mode-maybe): * lisp/progmodes/lua-ts-mode.el (lua-ts-mode-maybe): * lisp/progmodes/php-ts-mode.el (php-ts-mode-maybe): * lisp/progmodes/rust-ts-mode.el (rust-ts-mode-maybe): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode-maybe) (tsx-ts-mode-maybe): * lisp/textmodes/markdown-ts-mode.el (markdown-ts-mode-maybe): * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode-maybe): Add a wrapper function to 'auto-mode-alist' for ts-modes that have no corresponding non-ts mode. Also add a mapping to 'treesit-major-mode-remap-alist' for the case when a non-ts mode is installed from an external source to be able to customize it with 'treesit-enabled-modes'.
* Use keyword :commit with full hashes for treesit-language-source-alist.Juri Linkov2025-06-201-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/treesit.el (treesit-language-source-alist): Document the format that uses keywords. (treesit--install-language-grammar-1): Remove args 'revision', 'source-dir', 'cc', 'c++', 'commit'. Use 'args' to process the keywords, and use the remaining list as the previous list of arguments. (treesit--install-language-grammar-1): Let-bind 'treesit--install-language-grammar-full-clone' and 'treesit--install-language-grammar-blobless' to t when 'commit' is non-nil (bug#78542). * lisp/progmodes/c-ts-mode.el: * lisp/progmodes/cmake-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/dockerfile-ts-mode.el: * lisp/progmodes/elixir-ts-mode.el: * lisp/progmodes/go-ts-mode.el: * lisp/progmodes/heex-ts-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/php-ts-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/rust-ts-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/typescript-ts-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/html-ts-mode.el: * lisp/textmodes/markdown-ts-mode.el: * lisp/textmodes/toml-ts-mode.el: * lisp/textmodes/yaml-ts-mode.el: Use the keyword :commit with full hashes instead of tags in 'treesit-language-source-alist'. * lisp/treesit-x.el (define-treesit-generic-mode): Simplify the keyword :copy-queries. (gitattributes-generic-ts-mode, liquid-generic-ts-mode): Add keywords :commit and :copy-queries to :source. * admin/tree-sitter/treesit-admin.el (treesit-admin--unversioned-treesit-language-source-alist): Handle :revision and :commit as well. (treesit-admin--find-latest-compatible-revision): Process the keywords in the recipe.
* Improve elixir-ts--thing-settings.Juri Linkov2025-05-011-5/+6
| | | | | | | | | | | | | * 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.
* Lock tree-sitter language grammars to verified versions.Juri Linkov2025-04-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * admin/notes/tree-sitter/build-module/build.sh: Update org for toml/yaml. * admin/tree-sitter/treesit-admin.el (treesit-admin--builtin-language-sources): Add verified versions. * lisp/progmodes/c-ts-mode.el: Append language source to treesit-language-source-alist. (c-ts-mode, c++-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/cmake-ts-mode.el: Append language source to treesit-language-source-alist. (cmake-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/csharp-mode.el: Append language source to treesit-language-source-alist. (csharp-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/dockerfile-ts-mode.el: Append language source to treesit-language-source-alist. (dockerfile-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/elixir-ts-mode.el: Append language source to treesit-language-source-alist. (elixir-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/go-ts-mode.el: Append language source to treesit-language-source-alist. (go-ts-mode, go-mod-ts-mode, go-work-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/heex-ts-mode.el: Append language source to treesit-language-source-alist. (heex-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/java-ts-mode.el: Append language source to treesit-language-source-alist. (java-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/js.el: Append language source to treesit-language-source-alist. (js-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/json-ts-mode.el: Append language source to treesit-language-source-alist. (json-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/lua-ts-mode.el: Append language source to treesit-language-source-alist. (lua-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/php-ts-mode.el (php-ts-mode--language-source-alist): Update versions from comments in ts-modes. Append to treesit-language-source-alist. (php-ts-mode-install-parsers): Use treesit-language-source-alist directly. (php-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/ruby-ts-mode.el: Append language source to treesit-language-source-alist. (ruby-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/rust-ts-mode.el: Append language source to treesit-language-source-alist. (rust-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/sh-script.el: Append language source to treesit-language-source-alist. (bash-ts-mode): Use treesit-ensure-installed. * lisp/progmodes/typescript-ts-mode.el: Append language source to treesit-language-source-alist. (typescript-ts-mode, tsx-ts-mode): Use treesit-ensure-installed. * lisp/textmodes/css-mode.el: Append language source to treesit-language-source-alist. (css-ts-mode): Use treesit-ensure-installed. * lisp/textmodes/html-ts-mode.el: Append language source to treesit-language-source-alist. (html-ts-mode): Use treesit-ensure-installed. * lisp/textmodes/markdown-ts-mode.el: Append language source to treesit-language-source-alist. (markdown-ts-mode): Use treesit-ensure-installed. * lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode--language-source-alist): Append to treesit-language-source-alist. (mhtml-ts-mode-install-parsers): Use treesit-language-source-alist directly. (mhtml-ts-mode): Use treesit-ensure-installed. * lisp/textmodes/toml-ts-mode.el: Append language source to treesit-language-source-alist. (toml-ts-mode): Use treesit-ensure-installed. * lisp/textmodes/yaml-ts-mode.el: Append language source to treesit-language-source-alist. (yaml-ts-mode): Use treesit-ensure-installed. * test/infra/Dockerfile.emba: Add verified versions to treesit-language-source-alist.
* Fix treesit-forward-sexp/list navigation in the middle of a node.Juri Linkov2025-04-101-13/+8
| | | | | | | | | | | * lisp/treesit.el (treesit--forward-list-with-default): Check the thing 'sexp-default' (bug#76791). * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode): * lisp/progmodes/go-ts-mode.el (go-ts-mode): * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): * lisp/progmodes/sh-script.el (bash-ts-mode): Add the thing 'sexp-default' to 'treesit-thing-settings'.
* New command 'treesit-toggle-sexp-mode' (bug#76676).Juri Linkov2025-04-091-46/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/treesit.el (treesit-forward-sexp): Don't use 'treesit-sexp-type-regexp' reserved for list commands to override their default 'list' thing. (treesit-down-list, treesit-up-list): Use 'treesit-sexp-type-regexp' instead of 'list' when it's non-nil. (treesit-toggle-sexp-mode): New command. * lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings): Improve 'sexp' thing settings to exclude the top-level "translation_unit" that just moves to EOF and also "comment". * lisp/progmodes/elixir-ts-mode.el (elixir-ts--sexp-regexp): Remove. (elixir-ts--forward-sexp): Remove to use the default 'sexp' navigation. (elixir-ts--with-parens-0-p, elixir-ts--with-parens-1-p): New internal functions. (elixir-ts-mode): Add 'treesit-thing-settings' instead of 'forward-sexp-function' (bug#76788). * lisp/progmodes/heex-ts-mode.el (heex-ts--sexp-regexp): Remove. (heex-ts--forward-sexp): Remove to use the default 'sexp' navigation. (heex-ts--thing-settings): New variable. (heex-ts-mode): Use 'heex-ts--thing-settings' instead of 'forward-sexp-function'. * lisp/progmodes/java-ts-mode.el (java-ts-mode): Improve 'sexp' thing to use settings like in c-ts-mode. * lisp/progmodes/php-ts-mode.el (php-ts-mode): Improve 'sexp' thing settings to exclude the top-level "program" that just moves to EOF and also "comment". * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Improve 'sexp' thing to use settings like in c-ts-mode. * lisp/textmodes/css-mode.el (css--treesit-thing-settings): Add 'sexp' thing. Add "string_value" to 'text' thing. * lisp/textmodes/html-ts-mode.el (html-ts-mode--treesit-things-settings): Improve 'sexp' thing to use settings like in c-ts-mode. Add "doctype" to the 'list' thing.
* Fix capitalization ELisp -> ElispSean Whitton2025-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Improve treesit settings for js/typescript/ruby-ts-mode (bug#73404)Juri Linkov2025-03-061-0/+5
| | | | | | | | | | * 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.
* Fix treesit-outline related settingsJuri Linkov2025-02-121-49/+50
| | | | | | | | | | * lisp/treesit.el (treesit-outline-level): Use level 1 by default since treesit-outline--at-point now always returns the current node. * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Use 'bos' instead of 'bol'. Add "singleton_class" to 'treesit-outline-predicate'. Use new condition 'named' in 'treesit-outline-predicate' (bug#74963).
* Use the treesit thing 'list' with symbol property 'treesit-thing-symbol'Juri Linkov2025-01-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/parsing.texi (User-defined Things): Mention new functions 'treesit-forward-list', 'treesit-down-list', 'treesit-up-list', 'treesit-show-paren-data' that use the thing 'list' with the symbol property 'treesit-thing-symbol' (bug#73404). * lisp/treesit.el: Put the property 'treesit-thing-symbol' on the symbol 'list'. (treesit--forward-list-with-default, treesit-down-list) (treesit-up-list, treesit-navigate-thing) (treesit-show-paren-data--categorize, treesit-major-mode-setup): Replace 'sexp-list' with 'list'. * lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings): * lisp/progmodes/js.el (js-ts-mode): * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode) (tsx-ts-mode): * lisp/textmodes/html-ts-mode.el (html-ts-mode): Replace 'sexp-list' with 'list'. * src/treesit.c (treesit_traverse_validate_predicate) (treesit_traverse_match_predicate): Check if the 'pred' symbol has the property 'Qtreesit_thing_symbol'. (syms_of_treesit): New symbol 'Qtreesit_thing_symbol'.
* Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Add verified grammar version comment for tree-sitter modesYuan Fu2024-12-301-0/+9
| | | | | | | | | | | | | | | | | | * lisp/progmodes/c-ts-mode.el: * lisp/progmodes/cmake-ts-mode.el: * lisp/progmodes/dockerfile-ts-mode.el: * lisp/progmodes/elixir-ts-mode.el: * lisp/progmodes/go-ts-mode.el: * lisp/progmodes/heex-ts-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/lua-ts-mode.el: * lisp/progmodes/php-ts-mode.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/rust-ts-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/html-ts-mode.el: Add comments.
* ruby-ts--s-p-query: Put '_' syntax on ?! method definitionsDmitry Gutov2024-12-261-0/+3
| | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query): Put 'symbol' syntax on method definitions ending with [?!]. Reported in https://github.com/dgutov/robe/issues/149.
* ruby-ts-mode: Refine the forward-sexp improvementDmitry Gutov2024-12-261-1/+7
| | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--sexp-list-p): New function (bug#73404). (ruby-ts-mode): Use it in sexp-list thing definition.
* Add treesit thing 'sexp-list' to some ts-modes (bug#73404)Juri Linkov2024-12-191-0/+41
| | | | | | | | | * lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings): * lisp/progmodes/js.el (js-ts-mode): * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): * lisp/textmodes/html-ts-mode.el (html-ts-mode): Add 'sexp-list' to treesit-thing-settings. * lisp/progmodes/js.el (js--treesit-sexp-list-nodes): New variable.
* Make font-lock face variables obsoleteStefan Kangas2024-12-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using these variables as "another mechanism for changing face appearance" never really worked, since mode authors were free to use the face instead of the variable (i.e. quoting the symbol). This means that when users customized the variables, it would change its appearance only in some cases, which is a rather surprising interface. Indeed, it turns out that some modes have not always been consistent, and mixed using the variable and the face, increasing the confusion even further. Thus, the only thing users could rely on to always work was to leave the variables at their default value, and to customize the face. We now recommend customizing the face, and are obsoleting these variables. This will lead to some minor code-churn, but it is believed that it will be ultimately worth it. To fix existing Lisp code, you should typically only need to quote the symbol, as this commit shows. It might be the case that we will have to keep the obsolete variables, that have been with us since Emacs 19, around for a longer time-period than normal, to allow package authors to adapt. * lisp/font-lock.el (font-lock-comment-face) (font-lock-comment-delimiter-face, font-lock-string-face) (font-lock-doc-face, font-lock-doc-markup-face, font-lock-keyword-face) (font-lock-builtin-face, font-lock-function-name-face) (font-lock-variable-name-face, font-lock-type-face) (font-lock-constant-face, font-lock-warning-face) (font-lock-negation-char-face, font-lock-preprocessor-face): Make face variables obsolete in favor of customizing the faces directly instead. (Bug#71469) * doc/lispref/modes.texi (Faces for Font Lock): Don't document above obsolete variables. * lisp/cedet/data-debug.el (data-debug-insert-hash-table) (data-debug-insert-widget-properties, data-debug-insert-string) (data-debug-insert-number): * lisp/emacs-lisp/lisp-mode.el (elisp--font-lock-backslash) (lisp-font-lock-syntactic-face-function): * lisp/emacs-lisp/package.el (describe-package-1): * lisp/generic-x.el (rc-generic-mode, rul-generic-mode): * lisp/org/org-table.el (org-table-edit-formulas): * lisp/progmodes/cc-fonts.el (c-font-lock-invalid-single-quotes) (c-maybe-font-lock-wrong-style-comments, c-font-lock-declarators) (c-font-lock-c++-lambda-captures, c-font-lock-c++-modules): * lisp/progmodes/cperl-mode.el (cperl-find-sub-attrs) (cperl-look-at-leading-count, cperl-process-here-doc) (cperl-find-pods-heres): * lisp/progmodes/gdb-mi.el (gdb-init-1, gdb-update, gdb-running) (gdb-starting, gdb-stopped, gdb-internals) (gdb-breakpoints--add-breakpoint-row, gdb-locals-handler-custom) (gdb-registers-handler-custom, gdb-get-source-file): * lisp/progmodes/js.el (js--font-lock-keywords-1) (js--font-lock-keywords-2, js-font-lock-syntactic-face-function): * lisp/progmodes/lua-ts-mode.el (lua-ts--comment-font-lock): * lisp/progmodes/meta-mode.el (meta-indent-in-string-p): * lisp/progmodes/prolog.el (prolog-font-lock-keywords): * lisp/progmodes/python.el (python-font-lock-syntactic-face-function): * lisp/progmodes/ruby-ts-mode.el (ruby-ts--comment-font-lock): * lisp/progmodes/sh-script.el (sh-font-lock-syntactic-face-function): * lisp/textmodes/tex-mode.el (doctex-font-lock-syntactic-face-function): * test/lisp/faces-tests.el (faces--test-color-at-point): * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-extra-delimiters) (cperl-test-bug-47112, cperl-test-bug-65834, cperl-test-bug-66145) (cperl-test-bug-66161, cperl-test-bug-69604): * test/lisp/progmodes/python-tests.el (python-ts-mode-compound-keywords-face) (python-ts-mode-named-assignment-face-1) (python-ts-mode-assignment-face-2, python-ts-mode-nested-types-face-1) (python-ts-mode-union-types-face-1, python-ts-mode-union-types-face-2) (python-ts-mode-types-face-1, python-ts-mode-types-face-2) (python-ts-mode-types-face-3, python-ts-mode-isinstance-type-face-1) (python-ts-mode-isinstance-type-face-2) (python-ts-mode-isinstance-type-face-3) (python-ts-mode-superclass-type-face, python-ts-mode-class-patterns-face) (python-ts-mode-dotted-decorator-face-1) (python-ts-mode-dotted-decorator-face-2) (python-ts-mode-builtin-call-face) (python-ts-mode-interpolation-nested-string) (python-ts-mode-level-fontification-wo-interpolation) (python-ts-mode-disabled-string-interpolation) (python-ts-mode-interpolation-doc-string): * test/lisp/progmodes/ruby-mode-tests.el (ruby-heredoc-font-lock, ruby-heredoc-highlights-interpolations) (ruby-exit!-font-lock, ruby-regexp-interpolation-is-highlighted) (ruby-recognize-symbols-starting-with-at-character) (ruby-hash-character-not-interpolation) (ruby-interpolation-suppresses-quotes-inside) (ruby-interpolation-suppresses-one-double-quote) (ruby-interpolation-inside-percent-literal) (ruby-interpolation-inside-percent-literal-with-paren) (ruby-interpolation-inside-another-interpolation) (ruby-interpolation-inside-double-quoted-percent-literals) (ruby-no-interpolation-in-single-quoted-literals): Don't use above obsolete variables. * lisp/progmodes/cc-fonts.el (font-lock-constant-face): Don't declare now-unused variable.
* Declare tree-sitter functions with a new macroYuan Fu2024-12-121-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/c-ts-mode.el: * lisp/progmodes/cmake-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/dockerfile-ts-mode.el: * lisp/progmodes/elixir-ts-mode.el: * lisp/progmodes/go-ts-mode.el: * lisp/progmodes/heex-ts-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/lua-ts-mode.el: * lisp/progmodes/php-ts-mode.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/rust-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/python.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/c-ts-common.el: * lisp/progmodes/prog-mode.el: * lisp/progmodes/typescript-ts-mode.el: Use new macro. * lisp/treesit.el (treesit-declare-unavailable-functions): New macro.
* Merge from origin/emacs-30Eli Zaretskii2024-11-301-8/+36
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | afb34a3b239 ; Improve documentation of ':box' face attribute b38eb6da1d1 Fix docstring of c-ts-mode-indent-style 9fdb764898d Support PHP 8.4 and more reliable indentation (bug#74525) bda0bce9e43 Don't inadvertently reset frame scroll bar sizes (Bug#74435) 3f99cdaf26d Mention special variables in lexical binding documentation 0ef0f18f163 Allow to go back to using 'ruby-mode' after loading 'ruby... fc17e8727d4 Delete obsolete section in admin/notes/repo 3e396b2c5bb Improve documentation for 'while-let' 50b91ed458d Remove mention of treesit-defun-prefer-top-level (bug#74474) 03ae07291e8 Fix NS non-native fullscreen on initial frame load (bug#5... 8261d7224d3 Fix user options for listing and marking diary files # Conflicts: # lisp/progmodes/c-ts-mode.el
| * Allow to go back to using 'ruby-mode' after loading 'ruby-ts-mode'Eli Zaretskii2024-11-281-5/+36
| | | | | | | | | | | | | | | | * lisp/progmodes/ruby-ts-mode.el (major-mode-remap-defaults): Remap 'ruby-mode' to 'ruby-ts-mode'. Add commentary. * lisp/progmodes/ruby-mode.el (major-mode-remap-defaults): Remove any remappings of ruby-mode'. * lisp/progmodes/c-ts-mode.el: Fix a typo in a comment. (Bug#74339)
| * Remove mention of treesit-defun-prefer-top-level (bug#74474)Yuan Fu2024-11-241-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | treesit-defun-prefer-top-level is removed before Emacs 29 released and was replaced by treesit-defun-tactic. These statements that set it doesn't do anything other than introduce confusion, so we should remove them. * lisp/progmodes/c-ts-mode.el (c-ts-base-mode): * lisp/progmodes/js.el (js-ts-mode): * lisp/progmodes/php-ts-mode.el (php-ts-mode): * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): * lisp/progmodes/typescript-ts-mode.el: (typescript-ts-base-mode): Remove statements setting treesit-defun-prefer-top-level.
* | Set treesit-primary-parser for tree-sitter modesYuan Fu2024-10-141-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | I debated whether to do this, since technically speaking it's not needed for single-language modes. But ultimately it's better to be explicit and set a good example with builtin modes. * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode): * lisp/progmodes/csharp-mode.el (csharp-ts-mode): * lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode): * lisp/progmodes/go-ts-mode.el (go-ts-mode): (go-mod-ts-mode): * lisp/progmodes/heex-ts-mode.el (heex-ts-mode): * lisp/progmodes/json-ts-mode.el (json-ts-mode): * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): * lisp/progmodes/python.el (python-ts-mode): * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): * lisp/progmodes/rust-ts-mode.el (rust-ts-mode): * lisp/progmodes/sh-script.el: * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode): (tsx-ts-mode): * lisp/textmodes/css-mode.el (css-ts-mode): * lisp/textmodes/html-ts-mode.el (html-ts-mode): * lisp/textmodes/toml-ts-mode.el (toml-ts-mode): * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): Set treesit-primary-parser.
* Support the new option in ruby-ts-mode tooDmitry Gutov2024-09-021-0/+10
| | | | | | | | | | | | | * etc/NEWS: Describe it here. * lisp/progmodes/ruby-ts-mode.el (ruby-ts--parent-call-or-bol): Support the option ruby-bracketed-args-indent here too (bug#60321). * test/lisp/progmodes/ruby-ts-mode-tests.el: Include ruby-bracketed-args-indent.rb as test examples. * test/lisp/progmodes/ruby-mode-resources/ruby-bracketed-args-indent.rb: Extend examples for better regression testing.
* * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add 'text' (bug#67036).Juri Linkov2024-05-021-1/+16
| | | | | Add 'text' lambda to 'treesit-thing-settings' that should fall back to the default functions for sentence/sexp navigation.
* Add non-TS modes as extra parent of TS modes (bug#68246)Stefan Monnier2024-03-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Record the fact that TS modes are alternatives to the non-TS modes using the new `derived-mode-add-parents` functionality. Do the same for long standing similar issues with CPerl-mode. * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): * lisp/textmodes/toml-ts-mode.el (toml-ts-mode): * lisp/textmodes/html-ts-mode.el (html-ts-mode): * lisp/textmodes/css-mode.el (css-ts-mode): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode, tsx-ts-mode): * lisp/progmodes/sh-script.el (bash-ts-mode): * lisp/progmodes/rust-ts-mode.el (rust-ts-mode): * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): * lisp/progmodes/python.el (python-ts-mode): * lisp/progmodes/lua-ts-mode.el (lua-ts-mode): * lisp/progmodes/json-ts-mode.el (json-ts-mode): * lisp/progmodes/js.el (js-ts-mode): * lisp/progmodes/java-ts-mode.el (java-ts-mode): * lisp/progmodes/heex-ts-mode.el (heex-ts-mode): * lisp/progmodes/go-ts-mode.el (go-ts-mode, go-mod-ts-mode): * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode): * lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode): * lisp/progmodes/csharp-mode.el (csharp-ts-mode): * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode): * lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Add non-TS mode as extra parent. * lisp/progmodes/cperl-mode.el (cperl-mode): Add `perl-mode` as extra parent.
* (major-mode-remap(-defaults)): New var and function (bug#69191)Stefan Monnier2024-03-031-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While `major-mode-remap-alist` provides a way for users to indicate the major mode of their choice, we need a similar variable for the use of packages. This patch adds a new `major-mode-remap-defaults` and changes various packages to obey it or make use of it. I think it nicely cleans the regexp duplication between CC-mode and `c-ts-mode.el` and also makes it easier/cleaner for users to override the changes made by `*-ts-mode.el`. * lisp/files.el (major-mode-remap-defaults): New variable. (major-mode-remap): New function. (set-auto-mode-0): Use it. * doc/lispref/modes.texi (Auto Major Mode): Document them. * lisp/textmodes/tex-mode.el (tex--redirect-to-submode): Use `major-mode-remap`. (major-mode-remap-defaults): Set it to remap AUCTeX modes by default. * lisp/progmodes/ruby-ts-mode.el (auto-mode-alist): Leave it alone. (major-mode-remap-defaults): Set this one instead. * lisp/progmodes/c-ts-mode.el (c-or-c++-ts-mode): Use `major-mode-remap`. (auto-mode-alist): Leave it alone. (major-mode-remap-defaults): Set this one instead. * lisp/org/ox.el (org-export-to-buffer): Modernize docstring accordingly. * lisp/progmodes/cc-mode.el (c-or-c++-mode): * lisp/org/ox-latex.el (org-latex-export-as-latex): * lisp/org/ox-koma-letter.el (org-koma-letter-export-as-latex): * lisp/org/ox-beamer.el (org-beamer-export-as-latex): Use `major-mode-remap` when available.
* More changes for treesitter support of outline-minor-mode (bug#68824)Juri Linkov2024-02-131-0/+14
| | | | | | | | | | | * lisp/treesit.el (treesit-outline-level): Set NAMED arg of 'treesit-node-at' to t. Don't set IGNORE-MISSING arg of 'treesit-node-match-p' to t. * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add "singleton_method" to 'treesit-thing-settings'. Set 'treesit-outline-predicate'. Kill local variables 'outline-regexp' and 'outline-level'.
* Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | Merge from origin/emacs-29Eli Zaretskii2023-12-301-16/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 53031528725 Revert "Fix treesit-node-field-name and friends (bug#66674)" fa0bb88302b ; * src/buffer.c (syms_of_buffer) <default-directory>: Do... 44517037aed ; Fix typo ccf46acefd2 ; Fix last change. c86b039dffc ; * etc/DEBUG: Improve advice for debugging native-compil... 9afba605bbc Explain status "r" in `epa-list-keys` 62714221968 ; * lisp/dired.el (dired--make-directory-clickable): Refo... fcbb0044899 Fix mouse clicks on directory line in Dired be8a7155b48 Fix 'split-root-window-right' and 'split-root-window-below' eb19984c4db Mark icalendar.el as maintained by emacs-devel 03dc914fd37 ; Fix footnotes in ELisp Intro manual ceacf753958 Fix usage of `setq-default' and offer more suggestions 2701da0eee5 Fix python-ts-mode triple quote syntax (bug#67262) 683c7c96871 Increment parser timestamp when narrowing changes (bug#67... 8ae42c825e1 ruby-ts-mode: Fix indentation for string_array closer 9cfa498e0ab treesit-major-mode-setup: Use 'treesit--syntax-propertize... da2e440462b ruby-ts-mode: Fix an out-of-bounds error with heredoc at eob 6ea507296a7 Correctly refontify changed region in tree-sitter modes (...
| * ruby-ts-mode: Fix indentation for string_array closerDmitry Gutov2023-12-241-2/+3
| | | | | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): Fix indentation for string_array closer.
| * ruby-ts-mode: Fix an out-of-bounds error with heredoc at eobDmitry Gutov2023-12-241-2/+3
| | | | | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts--syntax-propertize): Fix an out-of-bounds error with heredoc at eob.
| * Correctly refontify changed region in tree-sitter modes (bug#66732)Yuan Fu2023-12-231-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have treesit--font-lock-notifier that should mark changed regions to be refontified, but it's called too late in the redsiplay & fontification pipeline. Here we add treesit--pre-redisplay that forces reparse and calls notifier functions in pre-redisplay-functions, which is early enough for the marking to take effect. Similarly, we force reparse in syntax-propertize-extend-region-functions so syntax-ppss will have the up-to-date syntax information when it scans the buffer text. We also record the lowest start position of the affected regions, and make sure next syntex-propertize starts from that position. * lisp/treesit.el (treesit--pre-redisplay-tick): (treesit--syntax-propertize-start): New variable. (treesit--syntax-propertize-notifier): (treesit--pre-redisplay): (treesit--pre-syntax-ppss): New functions. (treesit-major-mode-setup): Add hooks. * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Remove notifier. (ruby-ts--parser-after-change): Remove notifier function.
* | Revert "Silence warning when requiring ruby-ts-mode"Stefan Kangas2023-12-301-1/+1
| | | | | | | | | | | | | | | | This reverts commit bf81706988f6b1b9d6e8033c8227f0129e04ef03. We deliberately don't silence these warnings, so that a user who loads the mode without having the grammar installed sees the warning and realizes the problem in time to fix it.
* | Merge from origin/emacs-29Eli Zaretskii2023-12-091-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f361cc985d ; Minor copyedits in description of ':box' face property 46fe7a17f53 Fix dragging mode line on text terminals with a mouse (bu... 12daf386f37 ; * doc/lispref/processes.texi (Network): Fix wording and... 037d858dc1a (rust-ts-mode): Set electric-indent-chars dc9b733ab88 js-ts-mode: Highlight function parameters inside destruct... 4a72f13bdfb js-ts-mode: Highlight property shorthands in assignments 83ed9018ede (js--treesit-font-lock-settings): Highlight parameters in... ad0f87bb4c3 (js--treesit-font-lock-settings): Remove some duplicates 71c5f3694fd ; Another fix of doc string of 'message-mail-user-agent' ... 04a39353bae ; * lisp/gnus/message.el (message-mail-user-agent): Doc f... 82ddcf37ec6 ; * doc/lispref/files.texi (Changing Files): Fix last cha... 89068516b3e Don't claim to signal an error when deleting a nonexistin... 4fd254e1830 * lisp/indent.el (indent-rigidly): Improve prompt (bug#67... 5f923ff1a6a ; Fix typos a1f88963f5d rust-ts-mode--comment-docstring: Handle block doc comments a547b0e2e83 rust-ts-mode--comment-docstring: Fix/improve the previous...
| * ; Fix typosStefan Kangas2023-12-031-1/+1
| |
* | Merge from origin/emacs-29Eli Zaretskii2023-12-021-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | 5f882f4ee97 ; Fix doc string punctuation in ruby-ts-mode.el. 546a68925c9 Fix 'Info-goto-node-web' when NODE is given in various forms 7ff943044e9 Fix setting cursor when the window's op line has 'line-pr... 7f0bef47ddd Drop extra parenthesis in example code in Emacs Lisp Intr... fbaf113bf38 rust-ts-mode: appropriately fontify doc strings bd62bdbc680 Fix example code in Emacs Lisp Introduction manual c7e459132a9 Fix example in Emacs Lisp Intro manual a6e9c26c8f4 ; * doc/emacs/files.texi (Save Commands): Fix last change. f6a06ed6c5d Elisp manual: Mention 'write-region' for saving the buffer 4774a3abb4b Document, that PROCESS of signal-process can be a string ab126284081 Fix typescript-ts-mode indentation for switch statements
| * ; Fix doc string punctuation in ruby-ts-mode.el.Eli Zaretskii2023-12-021-2/+2
| |
| * Backport: Fix some tree-sitter :match regexpsBasil L. Contovounesios2023-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was originally installed on 2023-06-17 in the emacs-29 release branch and later reverted. This backport follows the Emacs 29.1 release (bug#64019). The shy groups were caught by modified versions of the GNU ELPA packages xr and relint: - https://github.com/mattiase/xr/pull/6 - https://github.com/mattiase/relint/pull/14 * lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query): Quote special character in regexp. * lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings): * lisp/progmodes/js.el (js--plain-method-re): (js--treesit-font-lock-settings): * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--font-lock-settings): Replace character alternative [\\d], which matches '\' or 'd', with the most likely intention [0-9]. Fix shy groups mistyped as optional colons. Remove unneeded numbered :match group in rust-ts-mode. (cherry picked from commit cd8d3f3379ec7179fac4bb8e9c40658be15a64f6)
| * Revert "Fix some tree-sitter :match regexps"Basil L. Contovounesios2023-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit 95091b77f0bbb2ae1aa94ef4a413626e7d434d58 of 2023-06-17, mistakenly pushed to emacs-29. The patch will be installed on master instead, and backported later, after Emacs 29.1 is released (bug#64019). Do not merge to master.
| * Fix some tree-sitter :match regexpsBasil L. Contovounesios2023-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shy groups were caught by modified versions of the GNU ELPA packages xr and relint: - https://github.com/mattiase/xr/pull/6 - https://github.com/mattiase/relint/pull/14 * lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query): Quote special character in regexp. * lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings): * lisp/progmodes/js.el (js--plain-method-re): (js--treesit-font-lock-settings): * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--font-lock-settings): Replace character alternative [\\d], which matches '\' or 'd', with the most likely intention [0-9]. Fix shy groups mistyped as optional colons. Remove unneeded numbered :match group in rust-ts-mode (bug#64019).
* | (ruby-ts-mode): Extend treesit-thing-settings moreDmitry Gutov2023-11-261-0/+3
| | | | | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add 'while', 'until' and 'for'.
* | (ruby-ts-mode): Also add 'self' and 'super' to thingsDmitry Gutov2023-11-261-0/+2
| | | | | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): (ruby-ts-mode): Also add 'self' and 'super'.
* | (ruby-ts-mode): Extend treesit-thing-settings (bug#67036)Dmitry Gutov2023-11-261-0/+3
| | | | | | | | | | | | | | * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add to 'treesit-thing-settings': 'singleton_class', 'else' and 'then'. The latter two help with navigation across elseif's a little, but not quite perfectly.
* | Silence warning when requiring ruby-ts-modeStefan Kangas2023-11-061-2/+2
| | | | | | | | | | * lisp/progmodes/ruby-ts-mode.el: Silence warning when requiring file without a treesitter grammar.
* | Obsolete treesit-block/sexp/sentence/text-type-regexpYuan Fu2023-09-011-38/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And replace them with treesit-thing-settings. * doc/lispref/positions.texi (List Motion): Remove mention of treesit-sexp/sentence-type-regexp. * lisp/progmodes/c-ts-mode.el (c-ts-base-mode) * lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode) * lisp/progmodes/java-ts-mode.el (java-ts-mode) * lisp/progmodes/js.el (js-ts-mode) * lisp/progmodes/json-ts-mode.el (json-ts-mode) * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode) * lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode) (tsx-ts-mode) * lisp/progmodes/heex-ts-mode.el (heex-ts-mode) * lisp/progmodes/sh-script.el (bash-ts-mode) * lisp/progmodes/prog-mode.el (prog-fill-reindent-defun) * lisp/textmodes/html-ts-mode.el (html-ts-mode): Replace treesit-sexp/sentence/text-type-regexp with treesit-thing-settings. * lisp/treesit.el (treesit-sexp-type-regexp) (treesit-sentence-type-regexp): Mark obsolete. (treesit-block-type-regexp): Remove. * lisp/treesit.el (treesit-forward-sexp) (treesit-transpose-sexps) (treesit-beginning-of-defun) (treesit-end-of-defun) (treesit-forward-sentence) (treesit-defun-at-point): Make use of treesit-thing-settings. (treesit-thing-definition) (treesit-thing-defined-p): New functions. (treesit-major-mode-setup): Replace treesit-sexp/sentence-type-regexp with treesit-thing-settings.
* | Fix some tree-sitter :match regexpsBasil L. Contovounesios2023-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was originally installed on 2023-06-17 in the emacs-29 release branch and later reverted. The intention is to backport it after Emacs 29.1 is released. The shy groups were caught by modified versions of the GNU ELPA packages xr and relint: - https://github.com/mattiase/xr/pull/6 - https://github.com/mattiase/relint/pull/14 * lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query): Quote special character in regexp. * lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings): * lisp/progmodes/js.el (js--plain-method-re): (js--treesit-font-lock-settings): * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings): * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--font-lock-settings): Replace character alternative [\\d], which matches '\' or 'd', with the most likely intention [0-9]. Fix shy groups mistyped as optional colons. Remove unneeded numbered :match group in rust-ts-mode (bug#64019).