move systemd-font-lock-keywords
This commit is contained in:
parent
070e15e4c0
commit
9fc054586d
44
systemd.el
44
systemd.el
@ -89,28 +89,6 @@
|
||||
(?? (= 16 (char hex-digit))) string-end))
|
||||
"Regexp for temp file buffers in which to autoload `systemd-mode'.")
|
||||
|
||||
(defvar systemd-font-lock-keywords
|
||||
`(("^\\([#;]\\)\\(.*\\)$"
|
||||
(1 'font-lock-comment-delimiter-face)
|
||||
(2 'font-lock-comment-face))
|
||||
("\\\\$" 0 'font-lock-warning-face) ; line break
|
||||
;; sections
|
||||
("^\\(\\[[[:upper:]][[:alnum:]]+\\]\\)"
|
||||
1 'font-lock-type-face)
|
||||
;; keys
|
||||
("^\\([[:upper:]][[:alnum:]]+\\)="
|
||||
1 'font-lock-keyword-face)
|
||||
;; boolean arguments
|
||||
("=\\(1\\|yes\\|true\\|on\\|0\\|no\\|false\\|off\\)$"
|
||||
1 'font-lock-constant-face)
|
||||
;; specifiers
|
||||
("%[nNpPiIfcrRtuUhsmbHv%]" 0 'font-lock-constant-face)
|
||||
;; exec prefixes
|
||||
("=\\(-@\\|@-\\|[@-]\\)"
|
||||
1 'font-lock-negation-char-face))
|
||||
"Default expressions to highlight in `systemd-mode'.
|
||||
See systemd.unit(5) for details on unit file syntax.")
|
||||
|
||||
(defun systemd-get-value (start)
|
||||
"Return the value of the key whose value begins at position START.
|
||||
Lines ending in a backslash are concatenated with the next
|
||||
@ -169,6 +147,28 @@ file, defaulting to the link under point, if any."
|
||||
(interactive)
|
||||
(systemd-doc-man "systemd.directives(7)"))
|
||||
|
||||
(defvar systemd-font-lock-keywords
|
||||
`(("^\\([#;]\\)\\(.*\\)$"
|
||||
(1 'font-lock-comment-delimiter-face)
|
||||
(2 'font-lock-comment-face))
|
||||
("\\\\$" 0 'font-lock-warning-face) ; line break
|
||||
;; sections
|
||||
("^\\(\\[[[:upper:]][[:alnum:]]+\\]\\)"
|
||||
1 'font-lock-type-face)
|
||||
;; keys
|
||||
("^\\([[:upper:]][[:alnum:]]+\\)="
|
||||
1 'font-lock-keyword-face)
|
||||
;; boolean arguments
|
||||
("=\\(1\\|yes\\|true\\|on\\|0\\|no\\|false\\|off\\)$"
|
||||
1 'font-lock-constant-face)
|
||||
;; specifiers
|
||||
("%[nNpPiIfcrRtuUhsmbHv%]" 0 'font-lock-constant-face)
|
||||
;; exec prefixes
|
||||
("=\\(-@\\|@-\\|[@-]\\)"
|
||||
1 'font-lock-negation-char-face))
|
||||
"Default expressions to highlight in `systemd-mode'.
|
||||
See systemd.unit(5) for details on unit file syntax.")
|
||||
|
||||
(defvar systemd-mode-syntax-table
|
||||
(let ((table (make-syntax-table)))
|
||||
(modify-syntax-entry ?\' "." table)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user