Variable: hs-special-modes-alist
hs-special-modes-alist is a variable defined in hideshow.el.gz.
Value
((f90-mode
"^[ 0-9]*\\(\\(\\(\\(?:\\sw\\|\\s_\\)+[ ]*:[ ]*\\)?\\(do\\|select[ ]*\\(case\\|type\\)\\|if[ ]*(\\(.*\\|.*\n\\([^if]*\\([^i].\\|.[^f]\\|.\\_>\\)\\)\\)\\_<then\\|\\(where\\|forall\\)[ ]*(.*)[ ]*\\(!\\|$\\)\\)\\)\\|\\(?:type\\|class\\)[ ,]\\([^id(!\n\"& ]\\|i[^s!\n\"& ]\\|d[^e!\n\"& ]\\|de[^f!\n\"& ]\\|def[^a!\n\"& ]\\|\\(?:is\\|default\\)\\(?:\\sw\\|\\s_\\)\\)\\|program\\|\\(?:abstract[ ]*\\)?interface\\|\\(?:sub\\)?module\\|function\\|subroutine\\|enum[^e]\\|associate\\|block\\|critical\\)[ ]*"
"^[ 0-9]*\\_<end[ ]*\\(associate\\|block\\|critical\\|do\\|enum\\|f\\(?:orall\\|unction\\)\\|i\\(?:f\\|nterface\\)\\|module\\|program\\|s\\(?:elect\\|ub\\(?:\\(?:modul\\|routin\\)e\\)\\)\\|\\(?:typ\\|wher\\)e\\)\\_>"
"!" f90-end-of-block nil)
(fortran-mode
"^[ 0-9]*\\(\\(\\(\\sw+[ ]*:[ ]*\\)?\\(if[ ]*(\\(.*\\|.*\n\\([^if]*\\([^i].\\|.[^f]\\|.\\>\\)\\)\\)\\<then\\|do\\|select[ ]*case\\|where\\)\\)\\|\\(?:function\\|interface\\|map\\|program\\|s\\(?:\\(?:tructur\\|ubroutin\\)e\\)\\|union\\)\\|block[ ]*data\\)[ ]*"
"^[ 0-9]*\\<end[ ]*\\(block[ ]*data\\|select[ ]*case\\|\\(?:do\\|function\\|i\\(?:f\\|nterface\\)\\|map\\|program\\|s\\(?:\\(?:tructur\\|ubroutin\\)e\\)\\|union\\|where\\)\\|!\\|$\\)"
"^[cC*!]" fortran-end-of-block nil)
(c-mode "{" "}" "/[*/]" nil nil) (c-ts-mode "{" "}" "/[*/]" nil nil)
(c++-mode "{" "}" "/[*/]" nil nil)
(c++-ts-mode "{" "}" "/[*/]" nil nil)
(bibtex-mode ("@\\S(*\\(\\s(\\)" 1))
(java-mode "{" "}" "/[*/]" nil nil)
(java-ts-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil)
(js-ts-mode "{" "}" "/[*/]" nil)
(lua-ts-mode "{\\|\\[\\[" "}\\|\\]\\]" "--" nil)
(mhtml-mode "{\\|<[^/>]*?" "}\\|</[^/>]*[^/]>" "<!--" mhtml-forward
nil))
Documentation
Alist for initializing the hideshow variables for different modes.
Each element has the form
(MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC
FIND-BLOCK-BEGINNING-FUNC FIND-NEXT-BLOCK-FUNC
LOOKING-AT-BLOCK-START-P-FUNC).
If non-nil, hideshow will use these values as regexps to define blocks and comments, respectively for major mode MODE.
START, END and COMMENT-START are regular expressions. A block is defined as text surrounded by START and END.
As a special case, START may be a list of the form (COMPLEX-START
MDATA-SELECTOR), where COMPLEX-START is a regexp with multiple parts and
MDATA-SELECTOR an integer that specifies which sub-match is the proper
place to adjust point, before calling hs-forward-sexp-func. Point
is adjusted to the beginning of the specified match. For example,
see the hs-special-modes-alist entry for bibtex-mode.
For some major modes, forward-sexp does not work properly. In those
cases, FORWARD-SEXP-FUNC specifies another function to use instead.
See the documentation for hs-adjust-block-beginning to see what is the
use of ADJUST-BEG-FUNC.
See the documentation for hs-find-block-beginning-func to see
what is the use of FIND-BLOCK-BEGINNING-FUNC.
See the documentation for hs-find-next-block-func to see what
is the use of FIND-NEXT-BLOCK-FUNC.
See the documentation for hs-looking-at-block-start-p-func to
see what is the use of LOOKING-AT-BLOCK-START-P-FUNC.
If any of the elements is left nil or omitted, hideshow tries to guess appropriate values. The regexps should not contain leading or trailing whitespace. Case does not matter.
Probably introduced at or before Emacs version 21.1.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/hideshow.el.gz
;;;###autoload
(defvar hs-special-modes-alist
;; FIXME: Currently the check is made via
;; (assoc major-mode hs-special-modes-alist) so it doesn't pay attention
;; to the mode hierarchy.
(mapcar #'purecopy
'((c-mode "{" "}" "/[*/]" nil nil)
(c-ts-mode "{" "}" "/[*/]" nil nil)
(c++-mode "{" "}" "/[*/]" nil nil)
(c++-ts-mode "{" "}" "/[*/]" nil nil)
(bibtex-mode ("@\\S(*\\(\\s(\\)" 1))
(java-mode "{" "}" "/[*/]" nil nil)
(java-ts-mode "{" "}" "/[*/]" nil nil)
(js-mode "{" "}" "/[*/]" nil)
(js-ts-mode "{" "}" "/[*/]" nil)
(lua-ts-mode "{\\|\\[\\[" "}\\|\\]\\]" "--" nil)
(mhtml-mode "{\\|<[^/>]*?" "}\\|</[^/>]*[^/]>" "<!--" mhtml-forward nil)
;; Add more support here.
))
"Alist for initializing the hideshow variables for different modes.
Each element has the form
(MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC
FIND-BLOCK-BEGINNING-FUNC FIND-NEXT-BLOCK-FUNC
LOOKING-AT-BLOCK-START-P-FUNC).
If non-nil, hideshow will use these values as regexps to define blocks
and comments, respectively for major mode MODE.
START, END and COMMENT-START are regular expressions. A block is
defined as text surrounded by START and END.
As a special case, START may be a list of the form (COMPLEX-START
MDATA-SELECTOR), where COMPLEX-START is a regexp with multiple parts and
MDATA-SELECTOR an integer that specifies which sub-match is the proper
place to adjust point, before calling `hs-forward-sexp-func'. Point
is adjusted to the beginning of the specified match. For example,
see the `hs-special-modes-alist' entry for `bibtex-mode'.
For some major modes, `forward-sexp' does not work properly. In those
cases, FORWARD-SEXP-FUNC specifies another function to use instead.
See the documentation for `hs-adjust-block-beginning' to see what is the
use of ADJUST-BEG-FUNC.
See the documentation for `hs-find-block-beginning-func' to see
what is the use of FIND-BLOCK-BEGINNING-FUNC.
See the documentation for `hs-find-next-block-func' to see what
is the use of FIND-NEXT-BLOCK-FUNC.
See the documentation for `hs-looking-at-block-start-p-func' to
see what is the use of LOOKING-AT-BLOCK-START-P-FUNC.
If any of the elements is left nil or omitted, hideshow tries to guess
appropriate values. The regexps should not contain leading or trailing
whitespace. Case does not matter.")