diff options
| author | Juri Linkov | 2025-01-28 21:07:16 +0200 |
|---|---|---|
| committer | Juri Linkov | 2025-01-28 21:07:16 +0200 |
| commit | 2e3b085d447bc2cd1a0e779145be9cab9a15d7af (patch) | |
| tree | e286ff6a611db4b3cbb7cb2d9095d6cb44e5980f /java | |
| parent | cd6aed5c9e905a8fc7608a172a689e99ff27fe25 (diff) | |
| download | emacs-2e3b085d447bc2cd1a0e779145be9cab9a15d7af.tar.gz emacs-2e3b085d447bc2cd1a0e779145be9cab9a15d7af.zip | |
Hideshow support for tree-sitter in hs-minor-mode (bug#75609)
* lisp/progmodes/hideshow.el (hs-inside-comment-p-func):
New buffer-local variable.
(hs-hide-block-at-point): Check if 'hs-block-end-regexp' is
a string or a function.
(hs-inside-comment-p): Move body to 'hs-inside-comment-p--default'.
Call 'hs-inside-comment-p-func' if it's a function.
(hs-inside-comment-p--default): New function with body from
'hs-inside-comment-p'.
(hs-hide-all): Don't use 'hs-block-start-regexp' when it's not a string.
(hs-minor-mode): Don't call 'hs-grok-mode-type' when
'hs-inside-comment-p-func' already has a buffer-local value.
* lisp/treesit.el (treesit-hs-block-end)
(treesit-hs-find-block-beginning, treesit-hs-find-next-block)
(treesit-hs-looking-at-block-start-p)
(treesit-hs-inside-comment-p): New functions.
(treesit-major-mode-setup): Set hs-minor-mode buffer-local variables.
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions