aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch.el
diff options
context:
space:
mode:
authorGravatar David Bremner <bremner@debian.org>2013-06-02 11:57:01 -0300
committerGravatar David Bremner <bremner@debian.org>2013-06-02 20:38:17 -0300
commit63782f4023680dd08c88024b50e5e48dfa3f50cd (patch)
tree2a32c16f0a6e7da3e4b9be237cdf861be7001afe /emacs/notmuch.el
parent9de0639126091fa0e48cfde69e3f6044d167a76a (diff)
emacs: replace setq + let with let*
I found several places where a setq is immediately followed by a let or a let*. This seems to be the pessimal combination, with the implicit scope of the setq combined with the extra indentation of the let. I combined these cases into a single let* which I think is easier to read.
Diffstat (limited to 'emacs/notmuch.el')
-rw-r--r--emacs/notmuch.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index af107e28..edb5a1c7 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -904,9 +904,8 @@ Other optional parameters are used as follows:
target-line: The line number to move to if the target thread does not
appear in the search results."
(interactive)
- (if (null query)
- (setq query (notmuch-read-query "Notmuch search: ")))
- (let ((buffer (get-buffer-create (notmuch-search-buffer-title query))))
+ (let* ((query (or query (notmuch-read-query "Notmuch search: ")))
+ (buffer (get-buffer-create (notmuch-search-buffer-title query))))
(switch-to-buffer buffer)
(notmuch-search-mode)
;; Don't track undo information for this buffer