]> git.eshelyaron.com Git - emacs.git/commit
Extend `hs-special-modes-alist' for languages such as Python
authorkobarity <kobarity@gmail.com>
Thu, 25 Aug 2022 12:28:22 +0000 (14:28 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 25 Aug 2022 12:28:22 +0000 (14:28 +0200)
commit74d0304ad446dbad6fed887784ffbc3d0fdb59fd
tree24d19b5b0bf6fffc140bf50302aecf3dc35e153f
parent0ce30e92958538bb16bbefa1460580853fe82371
Extend `hs-special-modes-alist' for languages such as Python

* lisp/progmodes/hideshow.el (hs-special-modes-alist): Add
elements FIND-BLOCK-BEGINNING-FUNC, FIND-NEXT-BLOCK-FUNC, and
LOOKING-AT-BLOCK-START-P-FUNC.
(hs-find-block-beginning-func): New variable to hold
FIND-BLOCK-BEGINNING-FUNC.
(hs-find-next-block-func): New variable to hold
FIND-NEXT-BLOCK-FUNC.
(hs-looking-at-block-start-p-func): New variable to hold
LOOKING-AT-BLOCK-START-P-FUNC.
(hs-grok-mode-type): Set new variables from
`hs-special-modes-alist'.
(hs-find-next-block): New function.
(Misc.): Update callers of the above functions.

* test/lisp/progmodes/hideshow-tests.el: New test file (bug#56635).
lisp/progmodes/hideshow.el