unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: remove useless lexically bound variable
@ 2021-07-07  1:51 David Bremner
  2021-07-19 10:49 ` Jonas Bernoulli
  2021-07-19 11:36 ` David Bremner
  0 siblings, 2 replies; 3+ messages in thread
From: David Bremner @ 2021-07-07  1:51 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner

A let binding without a value is just an obfuscated way of saying
nil, especially if you are not going to mutate the variable.
---
 emacs/notmuch-tree.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index b288c05d..eb7ea941 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -1001,10 +1001,9 @@ message together with all its descendents."
 
 (defun notmuch-tree-insert-forest-thread (forest-thread)
   "Insert a single complete thread."
-  (let (tree-status)
-    ;; Reset at the start of each main thread.
-    (setq notmuch-tree-previous-subject nil)
-    (notmuch-tree-insert-thread forest-thread 0 tree-status)))
+  ;; Reset at the start of each main thread.
+  (setq notmuch-tree-previous-subject nil)
+  (notmuch-tree-insert-thread forest-thread 0 nil))
 
 (defun notmuch-tree-insert-forest (forest)
   "Insert a forest of threads.
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] emacs: remove useless lexically bound variable
  2021-07-07  1:51 [PATCH] emacs: remove useless lexically bound variable David Bremner
@ 2021-07-19 10:49 ` Jonas Bernoulli
  2021-07-19 11:36 ` David Bremner
  1 sibling, 0 replies; 3+ messages in thread
From: Jonas Bernoulli @ 2021-07-19 10:49 UTC (permalink / raw)
  To: David Bremner, notmuch; +Cc: David Bremner

+1 (I was gonna suggest the same change.)

David Bremner <david@tethera.net> writes:

> A let binding without a value is just an obfuscated way of saying
> nil, especially if you are not going to mutate the variable.
> ---
>  emacs/notmuch-tree.el | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
> index b288c05d..eb7ea941 100644
> --- a/emacs/notmuch-tree.el
> +++ b/emacs/notmuch-tree.el
> @@ -1001,10 +1001,9 @@ message together with all its descendents."
>  
>  (defun notmuch-tree-insert-forest-thread (forest-thread)
>    "Insert a single complete thread."
> -  (let (tree-status)
> -    ;; Reset at the start of each main thread.
> -    (setq notmuch-tree-previous-subject nil)
> -    (notmuch-tree-insert-thread forest-thread 0 tree-status)))
> +  ;; Reset at the start of each main thread.
> +  (setq notmuch-tree-previous-subject nil)
> +  (notmuch-tree-insert-thread forest-thread 0 nil))
>  
>  (defun notmuch-tree-insert-forest (forest)
>    "Insert a forest of threads.
> -- 
> 2.30.2
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] emacs: remove useless lexically bound variable
  2021-07-07  1:51 [PATCH] emacs: remove useless lexically bound variable David Bremner
  2021-07-19 10:49 ` Jonas Bernoulli
@ 2021-07-19 11:36 ` David Bremner
  1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2021-07-19 11:36 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> writes:

> A let binding without a value is just an obfuscated way of saying
> nil, especially if you are not going to mutate the variable.

applied to master

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-19 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07  1:51 [PATCH] emacs: remove useless lexically bound variable David Bremner
2021-07-19 10:49 ` Jonas Bernoulli
2021-07-19 11:36 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).