]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-lib.el
emacs: Use 'when' instead of 'if' when there is no ELSE part
[notmuch] / emacs / notmuch-lib.el
index 98056eb6558737bdec0bd64ba6fc031915ddf2f9..da48bb86602dda774ea9f8bdb9725f13e7a48908 100644 (file)
@@ -664,11 +664,11 @@ MSG (if it isn't already)."
 ;; first loading gnus-art, which defines it, resulting in a
 ;; void-variable error.  Hence, we advise `mm-shr' to ensure gnus-art
 ;; is loaded.
-(if (>= emacs-major-version 24)
-    (defadvice mm-shr (before load-gnus-arts activate)
-      (require 'gnus-art nil t)
-      (ad-disable-advice 'mm-shr 'before 'load-gnus-arts)
-      (ad-activate 'mm-shr)))
+(when (>= emacs-major-version 24)
+  (defadvice mm-shr (before load-gnus-arts activate)
+    (require 'gnus-art nil t)
+    (ad-disable-advice 'mm-shr 'before 'load-gnus-arts)
+    (ad-activate 'mm-shr)))
 
 (defun notmuch-mm-display-part-inline (msg part content-type process-crypto)
   "Use the mm-decode/mm-view functions to display a part in the