[PATCH] emacs: Don't use nconc on quoted list

Subject: [PATCH] emacs: Don't use nconc on quoted list

Date: Wed, 6 Jan 2016 22:28:45 +0100

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Michal Sojka


As pointed out by David Bremner, Elisp manual says "A common pitfall
is to use a quoted constant list as a non-last argument to ‘nconc’."
Since this was the case in recently added code, we fix it here.
---
 emacs/notmuch-mua.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 45a6daa..5462f54 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -322,8 +322,8 @@ modified. This function is notmuch addaptation of
   (notmuch-mua-pop-to-buffer (message-buffer-name "mail" to)
 			     (or switch-function (notmuch-mua-get-switch-function)))
   (let ((headers
-	 ;; The following sexp is copied from `message-mail'
-	 (nconc
+	 (append
+	  ;; The following is copied from `message-mail'
 	  `((To . ,(or to "")) (Subject . ,(or subject "")))
 	  ;; C-h f compose-mail says that headers should be specified as
 	  ;; (string . value); however all the rest of message expects
-- 
2.6.4


Thread: