aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Mark Walters <markwalters1009@gmail.com>2012-03-25 00:43:28 +0000
committerGravatar David Bremner <bremner@debian.org>2012-03-30 21:19:50 -0300
commitf57ef643026540d6eb20179ccc92e54445a9d21a (patch)
treef8c067b8b4dc0114eb554d66525ec5c1b09aeff4 /emacs
parent46e73fe5394e344db7cf1297a3d86ef5f0444798 (diff)
emacs: content-type comparison should be case insensitive.
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.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-lib.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index c146748a..a754de77 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -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
'(