[PATCH 3/3 v2] emacs: Don't insert a part header if it's the first part and text/*.
David Edmondson
dme at dme.org
Mon Jan 23 02:33:04 PST 2012
Previously this logic applied only to text/plain. Allow it for other
text/* parts as well.
---
This was not included in version 1 of the patch set.
emacs/notmuch-show.el | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 39f35ed..55e4e34 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -300,7 +300,9 @@ CONTENT-TYPE parts."
(defun notmuch-show-insert-part-header (nth content-type declared-type
&optional name comment
&rest button-parameters)
- (unless (notmuch-show-hidden-part-header content-type)
+ (unless (or (notmuch-show-hidden-part-header content-type)
+ (and (= nth 1)
+ (string-match "text/*" content-type)))
(apply #'insert-button
(concat "[ "
(if name (concat name ": ") "")
@@ -561,10 +563,7 @@ current buffer, if possible."
(defun notmuch-show-insert-part-text/plain (msg part content-type nth depth declared-type)
(let ((start (point)))
- ;; If this text/plain part is not the first part in the message,
- ;; insert a header to make this clear.
- (if (> nth 1)
- (notmuch-show-insert-part-header nth declared-type content-type (plist-get part :filename)))
+ (notmuch-show-insert-part-header nth declared-type content-type (plist-get part :filename))
(insert (notmuch-show-get-bodypart-content msg part nth))
(save-excursion
(save-restriction
--
1.7.8.3
More information about the notmuch
mailing list