diff options
| author | Yuan Fu | 2022-10-09 20:54:19 -0700 |
|---|---|---|
| committer | Yuan Fu | 2022-10-09 20:54:19 -0700 |
| commit | aaaa4ca77e440499ec852069efaea42410ebe30b (patch) | |
| tree | 98bb9161edae31c2814b550409023dd3187b34d0 | |
| parent | bb8376145abadd901b0d8f7f586bef658e2b333c (diff) | |
| download | emacs-aaaa4ca77e440499ec852069efaea42410ebe30b.tar.gz emacs-aaaa4ca77e440499ec852069efaea42410ebe30b.zip | |
Add :version tag for new tree-sitter custom options
* lisp/progmodes/python.el (python-use-tree-sitter): Add version tag.
* lisp/treesit.el (treesit):
(treesit-max-buffer-size): Add version tag.
| -rw-r--r-- | lisp/progmodes/python.el | 3 | ||||
| -rw-r--r-- | lisp/treesit.el | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index d87789fd773..a0466707e60 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -290,7 +290,8 @@ | |||
| 290 | "If non-nil, `python-mode' tries to use tree-sitter. | 290 | "If non-nil, `python-mode' tries to use tree-sitter. |
| 291 | Currently `python-mode' uses tree-sitter for font-locking, imenu, | 291 | Currently `python-mode' uses tree-sitter for font-locking, imenu, |
| 292 | and movement functions." | 292 | and movement functions." |
| 293 | :type 'boolean) | 293 | :type 'boolean |
| 294 | :version "29.1") | ||
| 294 | 295 | ||
| 295 | (defcustom python-interpreter "python" | 296 | (defcustom python-interpreter "python" |
| 296 | "Python interpreter for noninteractive use. | 297 | "Python interpreter for noninteractive use. |
diff --git a/lisp/treesit.el b/lisp/treesit.el index 7132f1d5ee6..f2e7f478b3f 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el | |||
| @@ -34,11 +34,13 @@ | |||
| 34 | (defgroup treesit | 34 | (defgroup treesit |
| 35 | nil | 35 | nil |
| 36 | "Tree-sitter is an incremental parser." | 36 | "Tree-sitter is an incremental parser." |
| 37 | :group 'tools) | 37 | :group 'tools |
| 38 | :version "29.1") | ||
| 38 | 39 | ||
| 39 | (defcustom treesit-max-buffer-size (* 4 1024 1024) | 40 | (defcustom treesit-max-buffer-size (* 4 1024 1024) |
| 40 | "Maximum buffer size for enabling tree-sitter parsing." | 41 | "Maximum buffer size for enabling tree-sitter parsing (in bytes)." |
| 41 | :type 'integer) | 42 | :type 'integer |
| 43 | :version "29.1") | ||
| 42 | 44 | ||
| 43 | (defun treesit-available-p () | 45 | (defun treesit-available-p () |
| 44 | "Return non-nil if tree-sitter features are available." | 46 | "Return non-nil if tree-sitter features are available." |