From cd05fca5f78048cb867be2d5f0857f6997f12ccc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 19 Feb 2023 11:04:57 +0200 Subject: [PATCH] ; Improve documentation of 'native-comp-enable-subr-trampolines' * doc/lispref/compile.texi (Native-Compilation Variables): Document the interpretation of non-absolute directory names that are the value of 'native-comp-enable-subr-trampolines'. --- doc/lispref/compile.texi | 18 ++++++++++-------- lisp/treesit.el | 5 +++++ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index cdbf64036da..6ae6755ad76 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -1120,16 +1120,18 @@ the trampoline generation, unless you know that all the trampolines needed by your Lisp programs are already compiled and accessible to Emacs. -The value of this variable can also be a string, in which case it is -interpreted as the name of a directory in which to store the generated -trampoline @file{*.eln} files, overriding the directories specified by +The value of this variable can also be a string, in which case it +specifies the name of a directory in which to store the generated +trampoline @file{*.eln} files, overriding the directories in @code{native-comp-eln-load-path}. This is useful if you want the trampolines to be generated as needed, but don't want to store them -under the user's @env{HOME} directory or the other public directories -where @file{*.eln} files are kept. However, unlike with directories -in @code{native-comp-eln-load-path}, the trampolines will be stored in -the directory given by the value of this variable, not in its -version-specific subdirectory. +under the user's @env{HOME} directory or in the other public +directories where @file{*.eln} files are kept. However, unlike with +directories in @code{native-comp-eln-load-path}, the trampolines will +be stored in the directory given by the value of this variable, not in +its version-specific subdirectory. If the name of this directory is +not absolute, it is interpreted relative to +@code{invocation-directory} (@pxref{System Environment}) If this variable is non-@code{nil}, and Emacs needs to produce a trampoline, but it cannot find any writable directory to store the diff --git a/lisp/treesit.el b/lisp/treesit.el index b71b5b486d5..297812f23f7 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1204,6 +1204,11 @@ See `treesit-simple-indent-presets'.") (cons 'grand-parent (lambda (_n parent &rest _) (treesit-node-start (treesit-node-parent parent)))) + (cons 'great-grand-parent + (lambda (_n parent &rest _) + (treesit-node-start + (treesit-node-parent + (treesit-node-parent parent))))) (cons 'parent-bol (lambda (_n parent &rest _) (save-excursion (goto-char (treesit-node-start parent)) -- 2.39.2