diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
commit | 07fcbb558d797272b9f43547da60beda485873a3 (patch) | |
tree | 77d5da14e9f9d9d8b1d877c70c01296fd3893796 /lisp/gnus/mm-view.el | |
parent | c9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff) | |
parent | fb81c8c3adf8633f2f617c82f6019aef630860c7 (diff) | |
download | emacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz |
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'lisp/gnus/mm-view.el')
-rw-r--r-- | lisp/gnus/mm-view.el | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 3e36d6724ea..2ec75a0bc59 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -418,16 +418,18 @@ This is only used if `mm-inline-large-images' is set to (fundamental-mode) (goto-char (point-min))) -(defvar gnus-original-article-buffer) -(defvar gnus-article-prepare-hook) -(defvar gnus-displaying-mime) +(defvar mm-inline-message-prepare-function nil + "Function called by `mm-inline-message' to do client specific setup. +It is called with one parameter -- the charset.") (defun mm-inline-message (handle) + "Insert HANDLE (a message/rfc822 part) into the current buffer. +This function will call `mm-inline-message-prepare-function' +after inserting the part." (let ((b (point)) (bolp (bolp)) (charset (mail-content-type-get - (mm-handle-type handle) 'charset)) - gnus-displaying-mime handles) + (mm-handle-type handle) 'charset))) (when (and charset (stringp charset)) (setq charset (intern (downcase charset))) @@ -437,16 +439,8 @@ This is only used if `mm-inline-large-images' is set to (save-restriction (narrow-to-region b b) (mm-insert-part handle) - (let (gnus-article-mime-handles - ;; disable prepare hook - gnus-article-prepare-hook - (gnus-newsgroup-charset - (unless (eq charset 'gnus-decoded) ;; mm-uu might set it. - (or charset gnus-newsgroup-charset)))) - (let ((gnus-original-article-buffer (mm-handle-buffer handle))) - (run-hooks 'gnus-article-decode-hook)) - (gnus-article-prepare-display) - (setq handles gnus-article-mime-handles)) + (when mm-inline-message-prepare-function + (funcall mm-inline-message-prepare-function charset)) (goto-char (point-min)) (unless bolp (insert "\n")) @@ -454,9 +448,6 @@ This is only used if `mm-inline-large-images' is set to (unless (bolp) (insert "\n")) (insert "----------\n\n") - (when handles - (setq gnus-article-mime-handles - (mm-merge-handles gnus-article-mime-handles handles))) (mm-handle-set-undisplayer handle (let ((beg (point-min-marker)) |