X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-show.el;h=c37479a52f043b506130aaa81c01383840920b32;hp=e6a5b31fee3c0f3d820d973d029204248429a6d0;hb=63342a3c06cca53720f8be2ae8c4cf2c66d137f1;hpb=e6e10b82c98fbb68db45a57d2167af6032934ebc diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index e6a5b31f..c37479a5 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -429,14 +429,15 @@ current buffer, if possible." (with-temp-buffer (let* ((charset (plist-get part :content-charset)) (handle (mm-make-handle (current-buffer) `(,content-type (charset . ,charset))))) - (if (and (mm-inlinable-p handle) - (mm-inlined-p handle)) - (let ((content (notmuch-show-get-bodypart-content msg part nth))) - (insert content) - (set-buffer display-buffer) - (mm-display-part handle) - t) - nil))))) + ;; If the user wants the part inlined, insert the content and + ;; test whether we are able to inline it (which includes both + ;; capability and suitability tests). + (when (mm-inlined-p handle) + (insert (notmuch-show-get-bodypart-content msg part nth)) + (when (mm-inlinable-p handle) + (set-buffer display-buffer) + (mm-display-part handle) + t)))))) (defvar notmuch-show-multipart/alternative-discouraged '(