]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: content-type comparison should be case insensitive.
authorMark Walters <markwalters1009@gmail.com>
Sun, 25 Mar 2012 00:43:28 +0000 (00:43 +0000)
committerDavid Bremner <bremner@debian.org>
Sat, 31 Mar 2012 00:19:50 +0000 (21:19 -0300)
The function notmuch-match-content-type was comparing content types
case sensitively. Fix it so it tests case insensitively.

This fixes a bug where emacs would not include any body when replying
to a message with content-type TEXT/PLAIN.

emacs/notmuch-lib.el

index c146748ac2935206377a8418bfc6a5cf5b105fd2..a754de77ce00689be5050836883eddfe3ccac70b 100644 (file)
@@ -185,8 +185,9 @@ the user hasn't set this variable with the old or new value."
        (st2 (notmuch-split-content-type t2)))
     (if (or (string= (cadr st1) "*")
            (string= (cadr st2) "*"))
-       (string= (car st1) (car st2))
-      (string= t1 t2))))
+       ;; Comparison of content types should be case insensitive.
+       (string= (downcase (car st1)) (downcase (car st2)))
+      (string= (downcase t1) (downcase t2)))))
 
 (defvar notmuch-multipart/alternative-discouraged
   '(