summaryrefslogtreecommitdiff
path: root/doc/emacs/files.texi
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2023-01-29 15:22:20 +0200
committerEli Zaretskii <eliz@gnu.org>2023-01-29 15:22:20 +0200
commit197f994384cb37ae4ae7a771815bbe565d4ae242 (patch)
treeb7fb96de9388bff1ff129cc098d1a6a9b4d5ae19 /doc/emacs/files.texi
parentb73539832d9c4e802925cb8f261a13473da383b3 (diff)
downloademacs-197f994384cb37ae4ae7a771815bbe565d4ae242.tar.gz
emacs-197f994384cb37ae4ae7a771815bbe565d4ae242.tar.bz2
emacs-197f994384cb37ae4ae7a771815bbe565d4ae242.zip
Document tree-sitter features in the user manual
* lisp/progmodes/c-ts-mode.el (c-ts-mode-map): Bind "C-c .", for consistency with CC mode. * lisp/treesit.el (treesit-font-lock-level): Doc fix. * doc/emacs/programs.texi (C Indent, Custom C Indent): Document the indentation features of 'c-ts-mode'. (Moving by Defuns): Document 'treesit-defun-tactic'. * doc/emacs/files.texi (Visiting): Document 'treesit-max-buffer-size'. * doc/emacs/display.texi (Traditional Font Lock) (Parser-based Font Lock): New subsections. * doc/emacs/emacs.texi (Top): Update top-level menu.
Diffstat (limited to 'doc/emacs/files.texi')
-rw-r--r--doc/emacs/files.texi11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 6d666831612..c0e702da947 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -215,6 +215,17 @@ by the integers that Emacs can represent (@pxref{Buffers}). If you
try, Emacs displays an error message saying that the maximum buffer
size has been exceeded.
+@vindex treesit-max-buffer-size
+ If you try to visit a file whose major mode (@pxref{Major Modes})
+uses the tree-sitter parsing library, Emacs will display a warning if
+the file's size in bytes is larger than the value of the variable
+@code{treesit-max-buffer-size}. The default value is 40 megabytes for
+64-bit Emacs and 15 megabytes for 32-bit Emacs. This avoids the
+danger of having Emacs run out of memory by preventing the activation
+of major modes based on tree-sitter in such large buffers, because a
+typical tree-sitter parser needs about 10 times as much memory as the
+text it parses.
+
@cindex wildcard characters in file names
@vindex find-file-wildcards
If the file name you specify contains shell-style wildcard