diff options
author | Yuan Fu <casouri@gmail.com> | 2022-11-19 18:53:53 -0800 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2022-11-19 18:54:39 -0800 |
commit | f17ca55a0a3c9de1061285763cbf0bd3754f6718 (patch) | |
tree | 7c852f683916df9a2f3b0c49ab6946af196ee852 /doc/lispref/parsing.texi | |
parent | 4c5f1737c4815bd6d167108343a61da9a3882f32 (diff) | |
download | emacs-f17ca55a0a3c9de1061285763cbf0bd3754f6718.tar.gz emacs-f17ca55a0a3c9de1061285763cbf0bd3754f6718.tar.bz2 emacs-f17ca55a0a3c9de1061285763cbf0bd3754f6718.zip |
Remove treesit-settings
Remove it since we are using separate major modes for tree-sitter and
native variant now.
* doc/lispref/parsing.texi (Tree-sitter major modes): Update manual.
* lisp/treesit.el (treesit-settings): Remove option.
(treesit--setting-for-mode): Remove function.
(treesit-ready-p): Don't check for user preference in treesit-settings.
Diffstat (limited to 'doc/lispref/parsing.texi')
-rw-r--r-- | doc/lispref/parsing.texi | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi index 6a23b0feb33..bea358f2b0c 100644 --- a/doc/lispref/parsing.texi +++ b/doc/lispref/parsing.texi @@ -1661,6 +1661,7 @@ integration for a major mode. A major mode supporting tree-sitter features should roughly follow this pattern: +@c FIXME: Update this part once we settle on the exact format. @example @group (define-derived-mode woomy-mode prog-mode "Woomy" @@ -1679,26 +1680,19 @@ this pattern: @end example First, the major mode should use @code{treesit-ready-p} to determine -whether the user wants to activate tree-sitter features for the mode, -and whether tree-sitter can be activated in this mode. +whether tree-sitter can be activated in this mode. @defun treesit-ready-p mode language &optional quiet This function checks for conditions for activating tree-sitter. It -checks whether the user turned on tree-sitter for @var{mode} -(according to @code{treesit-settings}), whether Emacs was built with -tree-sitter, whether the buffer's size is not too large for -tree-sitter to handle it, and whether the language definition for -@var{language} is available on the system (@pxref{Language -Definitions}). - -When the user sets @var{mode} to @var{demand} in @code{treesit-settings}, -this function emits a warning if tree-sitter cannot be activated. If +checks whether Emacs was built with tree-sitter, whether the buffer's +size is not too large for tree-sitter to handle it, and whether the +language definition for @var{language} is available on the system +(@pxref{Language Definitions}). + +This function emits a warning if tree-sitter cannot be activated. If @var{quiet} is @code{message}, the warning is turned into a message; if @var{quiet} is @code{nil}, no warning or message is displayed. -If @var{mode} is nil, this function doesn't check user's preference in -@code{treesit-settings}. - If all the necessary conditions are met, this function returns non-@code{nil}; otherwise it returns @code{nil}. @end defun |