]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-tree.el
emacs: Use 'unless' instead of 'when' and 'not'
[notmuch] / emacs / notmuch-tree.el
index b1bb40b13ac469e5adc1f7d1ba2fecdd99694eb2..a5ae0edb1dec98908065379ad77a69cb9921d7be 100644 (file)
@@ -956,8 +956,8 @@ Complete list of currently available key bindings:
 \\{notmuch-tree-mode-map}"
   (setq notmuch-buffer-refresh-function #'notmuch-tree-refresh-view)
   (hl-line-mode 1)
-  (setq buffer-read-only t
-       truncate-lines t))
+  (setq buffer-read-only t)
+  (setq truncate-lines t))
 
 (defun notmuch-tree-process-sentinel (proc msg)
   "Add a message to let user know when \"notmuch tree\" exits."
@@ -1020,8 +1020,8 @@ the same as for the function notmuch-tree."
   (erase-buffer)
   (goto-char (point-min))
   (let* ((search-args (concat basic-query
-                             (if query-context
-                                 (concat " and (" query-context ")"))))
+                             (and query-context
+                                  (concat " and (" query-context ")"))))
         (message-arg (if unthreaded "--unthreaded" "--entire-thread")))
     (if (equal (car (process-lines notmuch-command "count" search-args)) "0")
        (setq search-args basic-query))
@@ -1063,10 +1063,10 @@ The arguments are:
   OPEN-TARGET: If TRUE open the target message in the message pane.
   UNTHREADED: If TRUE only show matching messages in an unthreaded view."
   (interactive)
-  (if (null query)
-      (setq query (notmuch-read-query (concat "Notmuch "
-                                             (if unthreaded "unthreaded " "tree ")
-                                             "view search: "))))
+  (unless query
+    (setq query (notmuch-read-query (concat "Notmuch "
+                                           (if unthreaded "unthreaded " "tree ")
+                                           "view search: "))))
   (let ((buffer (get-buffer-create (generate-new-buffer-name
                                    (or buffer-name
                                        (concat "*notmuch-"