mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-02 11:21:42 +00:00
Remove mention of treesit-defun-prefer-top-level (bug#74474)
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.
This commit is contained in:
parent
03ae07291e
commit
50b91ed458
@ -1254,9 +1254,6 @@ BEG and END are described in `treesit-range-rules'."
|
||||
`((c ,@c-ts-mode--thing-settings)
|
||||
(cpp ,@c-ts-mode--thing-settings)))
|
||||
|
||||
;; Nodes like struct/enum/union_specifier can appear in
|
||||
;; function_definitions, so we need to find the top-level node.
|
||||
(setq-local treesit-defun-prefer-top-level t)
|
||||
|
||||
;; When the code is in incomplete state, try to make a better guess
|
||||
;; about which node to indent against.
|
||||
@ -1346,6 +1343,9 @@ in your init files."
|
||||
;; Font-lock.
|
||||
(setq-local treesit-font-lock-settings (c-ts-mode--font-lock-settings 'c))
|
||||
;; Navigation.
|
||||
;;
|
||||
;; Nodes like struct/enum/union_specifier can appear in
|
||||
;; function_definitions, so we need to find the top-level node.
|
||||
(setq-local treesit-defun-tactic 'top-level)
|
||||
(treesit-major-mode-setup)
|
||||
|
||||
|
@ -3916,7 +3916,6 @@ See `treesit-thing-settings' for more information.")
|
||||
;; Indent.
|
||||
(setq-local treesit-simple-indent-rules js--treesit-indent-rules)
|
||||
;; Navigation.
|
||||
(setq-local treesit-defun-prefer-top-level t)
|
||||
(setq-local treesit-defun-type-regexp
|
||||
(rx (or "class_declaration"
|
||||
"method_definition"
|
||||
|
@ -1479,10 +1479,6 @@ Depends on `c-ts-common-comment-setup'."
|
||||
"statement")))
|
||||
(text ,(regexp-opt '("comment" "text"))))))
|
||||
|
||||
;; Nodes like struct/enum/union_specifier can appear in
|
||||
;; function_definitions, so we need to find the top-level node.
|
||||
(setq-local treesit-defun-prefer-top-level t)
|
||||
|
||||
;; Indent.
|
||||
(when (eq php-ts-mode-indent-style 'wordpress)
|
||||
(setq-local indent-tabs-mode t))
|
||||
|
@ -1198,9 +1198,6 @@ leading double colon is not added."
|
||||
(treesit-node-parent node))
|
||||
"interpolation"))))))))
|
||||
|
||||
;; AFAIK, Ruby can not nest methods
|
||||
(setq-local treesit-defun-prefer-top-level nil)
|
||||
|
||||
;; Imenu.
|
||||
(setq-local imenu-create-index-function #'ruby-ts--imenu)
|
||||
|
||||
|
@ -462,7 +462,6 @@ This mode is intended to be inherited by concrete major modes."
|
||||
|
||||
;; Comments.
|
||||
(c-ts-common-comment-setup)
|
||||
(setq-local treesit-defun-prefer-top-level t)
|
||||
|
||||
;; Electric
|
||||
(setq-local electric-indent-chars
|
||||
|
Loading…
Reference in New Issue
Block a user