]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Eliminate duplicate From header in replies.
authorCarl Worth <cworth@cworth.org>
Thu, 28 Oct 2010 01:44:05 +0000 (18:44 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 28 Oct 2010 01:44:05 +0000 (18:44 -0700)
The original code was intended to work, but clearly wasn't tested. Use
mail-header (as in existing code) to extract a header from a header alist.

This fixes the duplicate-from-line bug that is exercised by the test
just added to the test suite.

emacs/notmuch-mua.el

index ddaec676f4232b614920c7c0d66d88cb42d6b7d2..dc7b386f23c32abbba3a8e8ad8966764ce9d0c8c 100644 (file)
@@ -126,7 +126,7 @@ list."
       (when (not (string= "" user-agent))
        (push (cons "User-Agent" user-agent) other-headers))))
 
-  (unless (assoc "From" other-headers)
+  (unless (mail-header 'from other-headers)
     (push (cons "From" (concat
                        (notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))