diff options
Diffstat (limited to 'lisp/gnus/mm-decode.el')
-rw-r--r-- | lisp/gnus/mm-decode.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 3fdcdba45c0..ae6bb71dfc7 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -791,6 +791,14 @@ MIME-Version header before proceeding." (autoload 'mailcap-parse-mailcaps "mailcap") (autoload 'mailcap-mime-info "mailcap") +(defun mm-head-p (&optional point) + "Return non-nil if point is in the article header." + (let ((point (or point (point)))) + (save-excursion + (goto-char point) + (and (not (re-search-backward "^$" nil t)) + (re-search-forward "^$" nil t))))) + (defun mm-display-part (handle &optional no-default force) "Display the MIME part represented by HANDLE. Returns nil if the part is removed; inline if displayed inline; @@ -824,6 +832,10 @@ external if displayed external." 'inline) ((and (mm-inlinable-p ehandle) (mm-inlined-p ehandle)) + (when force + (if (mm-head-p) + (re-search-forward "^$" nil t) + (forward-line 1))) (mm-display-inline handle) 'inline) ((or method @@ -1883,7 +1895,7 @@ If RECURSIVE, search recursively." handle `(lambda () (let ((inhibit-read-only t)) - (delete-region ,(copy-marker (point-min) t) + (delete-region ,(point-min-marker) ,(point-max-marker)))))))) (defvar shr-map) |