-
Notifications
You must be signed in to change notification settings - Fork 0
/
html.el
43 lines (35 loc) · 1.36 KB
/
html.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
;; Configure mmm-mode (C-c % C-b to reparce if submode is not
;; determined automatically)
(require 'mmm-mode)
(setq mmm-global-mode 'maybe)
;(setq mmm-submode-decoration-level 0)
;; Set up an mmm group for fancy html editing
(mmm-add-group 'fancy-html
'((html-css-attribute
:submode css-mode
:face mmm-declaration-submode-face
:front "style=\""
:back "\"")))
;; What features should be turned on in this html-mode?
(add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil html-js))
(add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil embedded-css))
(add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil fancy-html))
;; Minor modes
(add-hook 'html-mode-hook 'whitespace-mode)
;; Auto-fill and TT highlight
(add-hook 'html-mode-hook
'(lambda ()
(auto-fill-mode 1)
(highlight-regexp "\\[%\\(.\\|\n\\)*?%\\]"
'font-lock-preprocessor-face)))
;(setq html-mode-hook nil)
;; What files to invoke the new html-mode for?
(add-to-list 'auto-mode-alist '("\\.inc\\'" . html-mode))
(add-to-list 'auto-mode-alist '("\\.[sj]?html?\\'" . html-mode))
;; To avoid the "External entity HTML not found" error
;(setq sgml-warn-about-undefined-entities nil)
;; Configure css-mode
(autoload 'css-mode "css-mode")
(add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode))
(setq cssm-indent-function #'cssm-c-style-indenter)
(setq cssm-indent-level '2)