diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-08-05 18:57:59 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-08-05 18:57:59 +0200 |
commit | 4adf7b924c0f0122ccdc6cdd589fcd4296941a3e (patch) | |
tree | 0ceefb8388f60fdefa1cd5a0917822479868ad38 | |
parent | Use static-if in XEmacs compat function (diff) | |
download | ebuild-mode-4adf7b924c0f0122ccdc6cdd589fcd4296941a3e.tar.gz ebuild-mode-4adf7b924c0f0122ccdc6cdd589fcd4296941a3e.tar.bz2 ebuild-mode-4adf7b924c0f0122ccdc6cdd589fcd4296941a3e.zip |
More static-if
* ebuild-mode.el (ebuild-mode, ebuild-run-command)
(ebuild-mode-get-completion-function, ebuild-mode-run-pkgdev)
(ebuild-mode-run-pkgcheck, ebuild-repo-mode, find-file-hook):
Use static-if.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ebuild-mode.el | 14 |
2 files changed, 14 insertions, 7 deletions
@@ -1,3 +1,10 @@ +2024-08-05 Ulrich Müller <ulm@gentoo.org> + + * ebuild-mode.el (ebuild-mode, ebuild-run-command) + (ebuild-mode-get-completion-function, ebuild-mode-run-pkgdev) + (ebuild-mode-run-pkgcheck, ebuild-repo-mode, find-file-hook): + Use static-if. + 2024-07-03 Ulrich Müller <ulm@gentoo.org> * ebuild-mode.el (ebuild-mode-time-string): Use static-if. diff --git a/ebuild-mode.el b/ebuild-mode.el index e8cf385..70e79c4 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -426,7 +426,7 @@ of the elements." ;; outside an ebuild repository (ebuild-repo-mode 1) (sh-set-shell "bash") - (if (featurep 'xemacs) + (static-if (featurep 'xemacs) (easy-menu-add ebuild-mode-menu)) (setq fill-column 72) (setq tab-width 4) @@ -472,7 +472,7 @@ If nil, `compilation-mode' will be used.") process-environment)) ;;(compilation-mode-hook (lambda () (setq truncate-lines t))) (compilation-buffer-name-function (lambda (_mode) "*ebuild*"))) - (if (featurep 'xemacs) + (static-if (featurep 'xemacs) (compile shell-command) (compile shell-command ebuild-log-buffer-mode)))) @@ -490,7 +490,7 @@ must be non-nil for this to have any effect." (cond ((null mode) #'try-completion) ((eq mode t) #'all-completions) ((eq mode 'lambda) - (if (fboundp 'test-completion) + (static-if (fboundp 'test-completion) #'test-completion ;; XEmacs 21.4 doesn't have test-completion (lambda (&rest args) @@ -551,7 +551,7 @@ Like `compile', but with autocompletion for pkgdev." (let ((process-environment (append ebuild-mode-process-environment process-environment)) (compilation-buffer-name-function (lambda (_mode) "*pkgdev*"))) - (if (featurep 'xemacs) + (static-if (featurep 'xemacs) (compile command) (compile command ebuild-log-buffer-mode)))) @@ -566,7 +566,7 @@ Like `compile', but with autocompletion for pkgcheck." (let ((process-environment (append ebuild-mode-process-environment process-environment)) (compilation-buffer-name-function (lambda (_mode) "*pkgcheck*"))) - (if (featurep 'xemacs) + (static-if (featurep 'xemacs) (compile command) (compile command ebuild-log-buffer-mode)))) @@ -848,7 +848,7 @@ for the format of the tag line.") (if (ignore-errors (check-coding-system 'utf-8-unix)) ;; utf-8-unix doesn't exist in XEmacs 21.4 (setq buffer-file-coding-system 'utf-8-unix)) - (if (not (featurep 'xemacs)) + (static-if (not (featurep 'xemacs)) (add-hook 'write-contents-functions #'ebuild-repo-mode-before-save t t) ;; make-local-hook gives a byte-compiler warning in GNU Emacs @@ -960,7 +960,7 @@ in a Gentoo profile." ;;;###autoload (add-hook ;; XEmacs 21.5 doesn't have find-file-hook - (if (boundp 'find-file-hook) 'find-file-hook 'find-file-hooks) + (static-if (boundp 'find-file-hook) 'find-file-hook 'find-file-hooks) #'ebuild-repo-mode-maybe-enable) (provide 'ebuild-mode) |