X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-hello.el;h=876d8ef17a668a80de3363d3d13a4cef3c7c866a;hb=a1b757c1ca111b25d3ce981942cdace04ee90429;hp=89e03c366fc8c02ae4b85e5cb4ac2e605663c1bb;hpb=caaa10876046096320f4e69053542eabe17e7e55;p=notmuch diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 89e03c36..876d8ef1 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -589,8 +589,8 @@ with `notmuch-hello-query-counts'." (mapc (lambda (elem) ;; (not elem) indicates an empty slot in the matrix. (when elem - (if (> column-indent 0) - (widget-insert (make-string column-indent ? ))) + (when (> column-indent 0) + (widget-insert (make-string column-indent ? ))) (let* ((name (plist-get elem :name)) (query (plist-get elem :query)) (oldest-first (cl-case (plist-get elem :sort-order) @@ -638,7 +638,7 @@ with `notmuch-hello-query-counts'." (dolist (window (window-list)) (let ((last-buf (window-parameter window 'notmuch-hello-last-buffer)) (cur-buf (window-buffer window))) - (when (not (eq last-buf cur-buf)) + (unless (eq last-buf cur-buf) ;; This window changed or is new. Update recorded buffer ;; for next time. (set-window-parameter window 'notmuch-hello-last-buffer cur-buf) @@ -652,7 +652,7 @@ with `notmuch-hello-query-counts'." ;; 24, we can't do it right here because something in this ;; hook's call stack overrides hello's point placement. (run-at-time nil nil #'notmuch-hello t)) - (when (null hello-buf) + (unless hello-buf ;; Clean up hook (remove-hook 'window-configuration-change-hook #'notmuch-hello-window-configuration-change)))) @@ -687,7 +687,6 @@ with `notmuch-hello-query-counts'." (define-key map (kbd "") 'widget-backward) map) "Keymap for \"notmuch hello\" buffers.") -(fset 'notmuch-hello-mode-map notmuch-hello-mode-map) (define-derived-mode notmuch-hello-mode fundamental-mode "notmuch-hello" "Major mode for convenient notmuch navigation. This is your entry portal into notmuch. @@ -890,8 +889,8 @@ Supports the following entries in OPTIONS as a plist: the same values as :filter. If :filter and :filter-count are specified, this will be used instead of :filter, not in conjunction with it." (widget-insert title ": ") - (if (and notmuch-hello-first-run (plist-get options :initially-hidden)) - (add-to-list 'notmuch-hello-hidden-sections title)) + (when (and notmuch-hello-first-run (plist-get options :initially-hidden)) + (add-to-list 'notmuch-hello-hidden-sections title)) (let ((is-hidden (member title notmuch-hello-hidden-sections)) (start (point))) (if is-hidden @@ -908,7 +907,7 @@ Supports the following entries in OPTIONS as a plist: (notmuch-hello-update)) "hide")) (widget-insert "\n") - (when (not is-hidden) + (unless is-hidden (let ((searches (apply 'notmuch-hello-query-counts query-list options))) (when (or (not (plist-get options :hide-if-empty)) searches)