mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
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.
This commit is contained in:
parent
9de0639126
commit
63782f4023
2 changed files with 4 additions and 5 deletions
|
@ -1734,8 +1734,8 @@ TAG-CHANGES is a list of tag operations for `notmuch-tag'."
|
||||||
|
|
||||||
See `notmuch-tag' for information on the format of TAG-CHANGES."
|
See `notmuch-tag' for information on the format of TAG-CHANGES."
|
||||||
(interactive)
|
(interactive)
|
||||||
(setq tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
|
(let* ((tag-changes (notmuch-tag (notmuch-show-get-message-id) tag-changes))
|
||||||
(let* ((current-tags (notmuch-show-get-tags))
|
(current-tags (notmuch-show-get-tags))
|
||||||
(new-tags (notmuch-update-tags current-tags tag-changes)))
|
(new-tags (notmuch-update-tags current-tags tag-changes)))
|
||||||
(unless (equal current-tags new-tags)
|
(unless (equal current-tags new-tags)
|
||||||
(notmuch-show-set-tags new-tags))))
|
(notmuch-show-set-tags new-tags))))
|
||||||
|
|
|
@ -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
|
target-line: The line number to move to if the target thread does not
|
||||||
appear in the search results."
|
appear in the search results."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (null query)
|
(let* ((query (or query (notmuch-read-query "Notmuch search: ")))
|
||||||
(setq query (notmuch-read-query "Notmuch search: ")))
|
(buffer (get-buffer-create (notmuch-search-buffer-title query))))
|
||||||
(let ((buffer (get-buffer-create (notmuch-search-buffer-title query))))
|
|
||||||
(switch-to-buffer buffer)
|
(switch-to-buffer buffer)
|
||||||
(notmuch-search-mode)
|
(notmuch-search-mode)
|
||||||
;; Don't track undo information for this buffer
|
;; Don't track undo information for this buffer
|
||||||
|
|
Loading…
Reference in a new issue