X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=af1d44b67fafce58a669b76eccb299d8139c5d2a;hb=1126732eced3f13f7934c5b152eb4ed018789502;hp=5436b3419f8f37ab199b4e01387be8df171fb821;hpb=7524b0650ef70508e3adfdb7a139076a8cd083e9;p=notmuch diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 5436b341..af1d44b6 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -96,7 +96,7 @@ same as that of the previous message." notmuch-wash-excerpt-citations)) ;; Mostly useful for debugging. -(defcustom notmuch-show-all-multipart/alternative-parts nil +(defcustom notmuch-show-all-multipart/alternative-parts t "Should all parts of multipart/alternative parts be shown?" :group 'notmuch :type 'boolean) @@ -753,7 +753,10 @@ current buffer, if possible." ;; message. (put-text-property message-start message-end :notmuch-message-extent (cons message-start message-end)) - (overlay-put (make-overlay headers-start headers-end) 'invisible headers-invis-spec) + (let ((headers-overlay (make-overlay headers-start headers-end)) + (invis-specs (list headers-invis-spec message-invis-spec))) + (overlay-put headers-overlay 'invisible invis-specs) + (overlay-put headers-overlay 'priority 10)) (overlay-put (make-overlay body-start body-end) 'invisible message-invis-spec) ;; Save the properties for this message. Currently this saves the @@ -992,20 +995,11 @@ All currently available key bindings: (add-to-invisibility-spec spec)))) (defun notmuch-show-message-visible (props visible-p) - (if visible-p - ;; When making the message visible, the headers may or not be - ;; visible. So we check that property separately. - (let ((headers-visible (plist-get props :headers-visible))) - (notmuch-show-element-visible props headers-visible :headers-invis-spec) - (notmuch-show-element-visible props t :message-invis-spec)) - (notmuch-show-element-visible props nil :headers-invis-spec) - (notmuch-show-element-visible props nil :message-invis-spec)) - + (notmuch-show-element-visible props visible-p :message-invis-spec) (notmuch-show-set-prop :message-visible visible-p props)) (defun notmuch-show-headers-visible (props visible-p) - (if (plist-get props :message-visible) - (notmuch-show-element-visible props visible-p :headers-invis-spec)) + (notmuch-show-element-visible props visible-p :headers-invis-spec) (notmuch-show-set-prop :headers-visible visible-p props)) ;; Functions for setting and getting attributes of the current