branch: elpa/systemd commit 378eb3642c66918cf3202d1d6669a9048619f0ef Author: Mark Oteiza <mvote...@udel.edu> Commit: Mark Oteiza <mvote...@udel.edu>
nix some quotes. use some rx --- systemd.el | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/systemd.el b/systemd.el index 4022a9d..ce299bf 100644 --- a/systemd.el +++ b/systemd.el @@ -220,24 +220,24 @@ 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 - ("^\\(\\[\\([[:upper:]][[:alnum:]]+\\|X-.*?\\)\\]\\)" - 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)) + (eval-when-compile + `(("^[[:space:]]*?\\([#;]\\)\\(.*\\)$" + (1 font-lock-comment-delimiter-face) + (2 font-lock-comment-face)) + ("\\\\$" 0 font-lock-warning-face) ; line break + ;; sections + ("^\\(\\[\\([[:upper:]][[:alnum:]]+\\|X-.*?\\)\\]\\)" + 1 font-lock-type-face) + ;; keys + ("^\\([[:upper:]][[:alnum:]]+\\)=" + 1 font-lock-keyword-face) + ;; boolean arguments + (,(rx "=" (group (or "yes" "true" "on" "0" "no" "false" "off")) eol) + 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.")