font lock keywords: comments and sections
* let comments be prefixed with whitespace * match ignored "X-" section headers
This commit is contained in:
parent
5cb70eb684
commit
6fd29c5c85
@ -317,12 +317,12 @@ file, defaulting to the link under point, if any."
|
||||
(`post-completion (if (not (systemd-buffer-section-p)) (insert "=")))))
|
||||
|
||||
(defvar systemd-font-lock-keywords
|
||||
`(("^\\([#;]\\)\\(.*\\)$"
|
||||
`(("^[[:space:]]\\([#;]\\)\\(.*\\)$"
|
||||
(1 'font-lock-comment-delimiter-face)
|
||||
(2 'font-lock-comment-face))
|
||||
("\\\\$" 0 'font-lock-warning-face) ; line break
|
||||
;; sections
|
||||
("^\\(\\[\\(?:X-\\)?[[:upper:]][[:alnum:]]+\\]\\)"
|
||||
("^\\(\\[\\([[:upper:]][[:alnum:]]+\\|X-.*?\\)\\]\\)"
|
||||
1 'font-lock-type-face)
|
||||
;; keys
|
||||
("^\\([[:upper:]][[:alnum:]]+\\)="
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user