mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Emacs] Use - as a word char in all Sass code.
This commit is contained in:
parent
0e0a36c233
commit
b9fff7f799
1 changed files with 7 additions and 8 deletions
|
@ -47,11 +47,6 @@ text nested beneath them.")
|
|||
|
||||
;; Font lock
|
||||
|
||||
(defconst sass-selector-syntax-table
|
||||
(let ((st (make-syntax-table)))
|
||||
(modify-syntax-entry ?- "w" st)
|
||||
st))
|
||||
|
||||
(defconst sass-selector-font-lock-keywords
|
||||
'(("&" 0 font-lock-constant-face)
|
||||
("\\.\\w+" 0 font-lock-type-face)
|
||||
|
@ -63,6 +58,11 @@ text nested beneath them.")
|
|||
("\\[\\([^]=]+\\)" (1 font-lock-variable-name-face)
|
||||
("[~|$^*]?=\\([^]=]+\\)" nil nil (1 font-lock-string-face)))))
|
||||
|
||||
(defconst sass-syntax-table
|
||||
(let ((st (make-syntax-table)))
|
||||
(modify-syntax-entry ?- "w" st)
|
||||
st))
|
||||
|
||||
(defconst sass-font-lock-keywords
|
||||
'((sass-highlight-line 1 nil nil t)))
|
||||
|
||||
|
@ -99,8 +99,7 @@ taken from `sass-line-keywords'."
|
|||
"Highlight a CSS selector starting at `point'
|
||||
and ending at `end-of-line'."
|
||||
(end-of-line)
|
||||
(let ((font-lock-keywords sass-selector-font-lock-keywords)
|
||||
(font-lock-syntax-table sass-selector-syntax-table))
|
||||
(let ((font-lock-keywords sass-selector-font-lock-keywords))
|
||||
(font-lock-fontify-region
|
||||
(point) (progn (end-of-line) (point))))
|
||||
t)
|
||||
|
@ -112,7 +111,7 @@ and ending at `end-of-line'."
|
|||
;;;###autoload
|
||||
(define-derived-mode sass-mode haml-mode "Sass"
|
||||
"Major mode for editing Sass files."
|
||||
(set-syntax-table (make-syntax-table))
|
||||
(set-syntax-table sass-syntax-table)
|
||||
(setq font-lock-extend-region-functions
|
||||
'(font-lock-extend-region-wholelines font-lock-extend-region-multiline))
|
||||
(setq font-lock-multiline nil)
|
||||
|
|
Loading…
Add table
Reference in a new issue