drop some unneeded eval-when-compile

This commit is contained in:
Mark Oteiza 2021-02-09 15:52:05 -05:00
parent 20c9d97e24
commit 0416fe454a

View File

@ -128,28 +128,25 @@
;;;###autoload ;;;###autoload
(defconst systemd-autoload-regexp (defconst systemd-autoload-regexp
(eval-when-compile
(rx (+? (any "a-zA-Z0-9-_.@\\")) "." (rx (+? (any "a-zA-Z0-9-_.@\\")) "."
(or "automount" "busname" "mount" "service" "slice" (or "automount" "busname" "mount" "service" "slice"
"socket" "swap" "target" "timer" "link" "netdev" "network") "socket" "swap" "target" "timer" "link" "netdev" "network")
string-end)) string-end)
"Regexp for file buffers in which to autoload `systemd-mode'.") "Regexp for file buffers in which to autoload `systemd-mode'.")
;;;###autoload ;;;###autoload
(defconst systemd-tempfn-autoload-regexp (defconst systemd-tempfn-autoload-regexp
(eval-when-compile
(rx ".#" (rx ".#"
(or (and (+? (any "a-zA-Z0-9-_.@\\")) "." (or (and (+? (any "a-zA-Z0-9-_.@\\")) "."
(or "automount" "busname" "mount" "service" "slice" (or "automount" "busname" "mount" "service" "slice"
"socket" "swap" "target" "timer" "link" "netdev" "network")) "socket" "swap" "target" "timer" "link" "netdev" "network"))
"override.conf") "override.conf")
(= 16 (char hex-digit)) string-end)) (= 16 (char hex-digit)) string-end)
"Regexp for temp file buffers in which to autoload `systemd-mode'.") "Regexp for temp file buffers in which to autoload `systemd-mode'.")
;;;###autoload ;;;###autoload
(defconst systemd-dropin-autoload-regexp (defconst systemd-dropin-autoload-regexp
(eval-when-compile (rx "/systemd/" (+? anything) ".d/" (+? (not (any ?/))) ".conf" string-end)
(rx "/systemd/" (+? anything) ".d/" (+? (not (any ?/))) ".conf" string-end))
"Regexp for dropin config file buffers in which to autoload `systemd-mode'.") "Regexp for dropin config file buffers in which to autoload `systemd-mode'.")
(defun systemd-get-value (start) (defun systemd-get-value (start)
@ -214,13 +211,12 @@ file, defaulting to the link under point, if any."
(defun systemd-file-network-p (filename) (defun systemd-file-network-p (filename)
"Return non-nil if FILENAME has a network-type extension, otherwise nil." "Return non-nil if FILENAME has a network-type extension, otherwise nil."
(string-match-p (eval-when-compile (string-match-p (rx "." (or "link" "netdev" "network") string-end)
(rx "." (or "link" "netdev" "network") string-end))
filename)) filename))
(defun systemd-file-nspawn-p (filename) (defun systemd-file-nspawn-p (filename)
"Return non-nil if FILENAME has an nspawn extension, otherwise nil." "Return non-nil if FILENAME has an nspawn extension, otherwise nil."
(string-match-p (eval-when-compile (rx ".nspawn" string-end)) filename)) (string-match-p (rx ".nspawn" string-end) filename))
(defun systemd-completion-table (&rest _ignore) (defun systemd-completion-table (&rest _ignore)
"Return a list of completion candidates." "Return a list of completion candidates."
@ -322,7 +318,7 @@ See `font-lock-keywords' and (info \"(elisp) Search-based Fontification\")."
(set-match-data res))))) (set-match-data res)))))
(defconst systemd-font-lock-keywords-1 (defconst systemd-font-lock-keywords-1
`((systemd-section-matcher 1 'font-lock-type-face) '((systemd-section-matcher 1 'font-lock-type-face)
(systemd-key-matcher 1 'font-lock-keyword-face)) (systemd-key-matcher 1 'font-lock-keyword-face))
"Minimal expressions to highlight in `systemd-mode'.") "Minimal expressions to highlight in `systemd-mode'.")