]> git.notmuchmail.org Git - notmuch/commitdiff
Set message invisibility spec properties before inserting the body.
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Wed, 25 May 2011 22:10:13 +0000 (02:10 +0400)
committerCarl Worth <cworth@cworth.org>
Wed, 15 Jun 2011 14:07:32 +0000 (07:07 -0700)
This would allow body-inserting code (in particular, wash
button-inserting code) to use message invisibility specs.

emacs/notmuch-show.el

index 850fef34d9a12dbf0f640b2e357bed334feb1959..5436b3419f8f37ab199b4e01387be8df171fb821 100644 (file)
@@ -713,6 +713,9 @@ current buffer, if possible."
 
     (setq content-start (point-marker))
 
+    (plist-put msg :headers-invis-spec headers-invis-spec)
+    (plist-put msg :message-invis-spec message-invis-spec)
+
     ;; Set `headers-start' to point after the 'Subject:' header to be
     ;; compatible with the existing implementation. This just sets it
     ;; to after the first header.
@@ -750,10 +753,7 @@ current buffer, if possible."
     ;; message.
     (put-text-property message-start message-end :notmuch-message-extent (cons message-start message-end))
 
-    (plist-put msg :headers-invis-spec headers-invis-spec)
     (overlay-put (make-overlay headers-start headers-end) 'invisible headers-invis-spec)
-
-    (plist-put msg :message-invis-spec message-invis-spec)
     (overlay-put (make-overlay body-start body-end) 'invisible message-invis-spec)
 
     ;; Save the properties for this message. Currently this saves the