Enable hs-minor-mode in xml buffers

This commit is contained in:
Jeremy Dormitzer 2021-05-12 11:03:59 -04:00
parent 59d48374b9
commit 7c3dab46d3

View File

@ -15,6 +15,7 @@
(shell-command-on-region start end "xmllint --format -" nil t)) (shell-command-on-region start end "xmllint --format -" nil t))
(t (sgml-pretty-print start end))))) (t (sgml-pretty-print start end)))))
(general-def nxml-mode-map "C-M-\\" #'xml-pretty-print) (general-def nxml-mode-map "C-M-\\" #'xml-pretty-print)
(add-hook 'nxml-mode-hook #'hs-minor-mode)
(add-to-list 'hs-special-modes-alist (add-to-list 'hs-special-modes-alist
'(nxml-mode '(nxml-mode
"<!--\\|<[^/>]*[^/]>" ;; regexp for start block "<!--\\|<[^/>]*[^/]>" ;; regexp for start block