]> git.eshelyaron.com Git - emacs.git/commitdiff
Change the default of 'treesit-defun-tactic' for 'c-ts-mode'
authorEli Zaretskii <eliz@gnu.org>
Thu, 2 Feb 2023 18:21:02 +0000 (20:21 +0200)
committerEli Zaretskii <eliz@gnu.org>
Thu, 2 Feb 2023 18:21:02 +0000 (20:21 +0200)
* lisp/progmodes/c-ts-mode.el (c-ts-mode): Set
'treesit-defun-tactic' as appropriate for C.  (Bug#61208)

lisp/progmodes/c-ts-mode.el

index 195c23d28c91170b40321dd08ce66c05527d6f1b..9cbba92a19421aa048a7dfaa1dd4c9c50018e3e9 100644 (file)
@@ -793,6 +793,8 @@ in your configuration."
                 (c-ts-mode--get-indent-style 'c))
     ;; Font-lock.
     (setq-local treesit-font-lock-settings (c-ts-mode--font-lock-settings 'c))
+    ;; Navigation.
+    (setq-local treesit-defun-tactic 'top-level)
     (treesit-major-mode-setup)))
 
 ;;;###autoload