mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 16:20:17 -08:00
hideshow: Rework previous changes
* doc/emacs/programs.texi (Hideshow): * etc/NEWS: Fix doc. * lisp/progmodes/hideshow.el: Update Commentary Header. (hs-modes-alist): Remove. (hs--get-mode-value, hs-grok-mode-type): Rework. * lisp/treesit.el (treesit-major-mode-setup): * lisp/emacs-lisp/lisp-mode.el: * lisp/nxml/nxml-mode.el: * lisp/progmodes/cc-mode.el: * lisp/progmodes/f90.el: * lisp/progmodes/fortran.el: * lisp/progmodes/hideshow.el: * lisp/progmodes/icon.el: * lisp/progmodes/js.el: * lisp/progmodes/lua-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/verilog-mode.el: * lisp/progmodes/vhdl-mode.el: * lisp/textmodes/bibtex.el: * lisp/textmodes/mhtml-mode.el: * lisp/textmodes/sgml-mode.el: * lisp/treesit.el: Fix and rework previous changes.
This commit is contained in:
parent
2c41bfabbc
commit
cc589d7003
18 changed files with 228 additions and 243 deletions
|
|
@ -306,7 +306,7 @@ This is used by `mhtml--pre-command'.")
|
|||
(flyspell-generic-progmode-verify)
|
||||
t)))
|
||||
|
||||
;; Support for hideshow.el (see `hs-modes-alist').
|
||||
;; Support for hideshow.el (see `hs-forward-sexp-func').
|
||||
(defun mhtml-forward (arg)
|
||||
"Move point forward past a structured expression.
|
||||
If point is on a tag, move to the end of the tag.
|
||||
|
|
@ -329,6 +329,9 @@ the rules from `css-mode'."
|
|||
(setq-local syntax-propertize-function #'mhtml-syntax-propertize)
|
||||
(setq-local font-lock-fontify-region-function
|
||||
#'mhtml--submode-fontify-region)
|
||||
(setq-local hs-block-start-regexp "{\\|<[^/>]*?")
|
||||
(setq-local hs-block-end-regexp "}\\|</[^/>]*[^/]>")
|
||||
(setq-local hs-forward-sexp-func #'mhtml-forward)
|
||||
|
||||
;; Attach this to both pre- and post- hooks just in case it ever
|
||||
;; changes a key binding that might be accessed from the menu bar.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue