]> git.notmuchmail.org Git - notmuch/commit
emacs: show: move the insertion of the header button to the top level
authorMark Walters <markwalters1009@gmail.com>
Mon, 10 Jun 2013 04:57:09 +0000 (05:57 +0100)
committerDavid Bremner <bremner@debian.org>
Wed, 12 Jun 2013 15:05:59 +0000 (00:05 +0900)
commit702210b84d7d31a5d386fae4490bd66b2ab57785
treeeb7713c32632640a85da721fb3f3746ff068e041
parent27768309cee7cc52dec9bbcf9468ce744f5af31d
emacs: show: move the insertion of the header button to the top level

Previously each of the part insertion handlers inserted the part
button themselves. Move this up into
notmuch-show-insert-bodypart. Since a small number of the handlers
modify the button (the encryption/signature ones) we need to pass the
header button as an argument into the individual part insertion
handlers. However, the declared-type argument was only used for the
text for the part buttons we can now omit it.

The patch is large but mostly simple. The only things of note are that
we let the text/plain handler applies notmuch-wash to the whole part
including the part button. In particular, notmuch-wash removes leading
blank lines from a text/plain part, but since the button is counted as
part of the part this does not happen with text/plain buttons that
have a button. This is probably a bug in notmuch-wash but changing it
does make several tests fail (that rely on this blank line) so, for
the moment, keep the old behaviour.
emacs/notmuch-show.el