]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.el
emacs: Use 'when' instead of 'if' when there is no ELSE part
[notmuch] / test / test-lib.el
index a12333900801736843d6032db91f071647a0b056..6a39bbe2140995f9bb58cbfb2f6a9a68a0af14ef 100644 (file)
@@ -36,7 +36,7 @@
 
 ;; Work around a bug in emacs 23.1 and emacs 23.2 which prevents
 ;; noninteractive (kill-emacs) from emacsclient.
-(if (and (= emacs-major-version 23) (< emacs-minor-version 3))
+(when (and (= emacs-major-version 23) (< emacs-minor-version 3))
   (defadvice kill-emacs (before disable-yes-or-no-p activate)
     "Disable yes-or-no-p before executing kill-emacs"
     (defun yes-or-no-p (prompt) t)))
@@ -46,7 +46,7 @@
 ;; seems to be present in Emacs 23.1.
 ;; Running `list-processes' after `accept-process-output' seems to work
 ;; around this problem.
-(if (and (= emacs-major-version 23) (= emacs-minor-version 1))
+(when (and (= emacs-major-version 23) (= emacs-minor-version 1))
   (defadvice accept-process-output (after run-list-processes activate)
     "run list-processes after executing accept-process-output"
     (list-processes)))