Commit ffb54e99 authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

gnus-art.el (gnus-article-mode): Move binding of shr-put-image-function here...

gnus-art.el (gnus-article-mode): Move binding of shr-put-image-function here from gnus-article-prepare-display.
parent b9bdaf74
2011-05-10 Katsumi Yamaoka <yamaoka@jpl.org>
 
* gnus-art.el (gnus-article-mode): Move binding of
shr-put-image-function here from gnus-article-prepare-display.
* shr.el (shr-put-image-function): New variable.
(shr-image-fetched, shr-image-displayer, shr-tag-img): Funcall it.
(shr-put-image): Return scaled image.
......
......@@ -4418,6 +4418,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
(gnus-run-hooks 'gnus-article-menu-hook)))
(defvar bookmark-make-record-function)
(defvar shr-put-image-function)
(defun gnus-article-mode ()
"Major mode for displaying an article.
......@@ -4461,6 +4462,8 @@ commands:
;; Prevent Emacs 22 from displaying non-break space with `nobreak-space'
;; face.
(set (make-local-variable 'nobreak-char-display) nil)
;; Enable `gnus-article-remove-images' to delete images shr.el renders.
(set (make-local-variable 'shr-put-image-function) 'gnus-shr-put-image)
(setq cursor-in-non-selected-windows nil)
(gnus-set-default-directory)
(buffer-disable-undo)
......@@ -4656,8 +4659,6 @@ If ALL-HEADERS is non-nil, no headers are hidden."
(gnus-run-hooks 'gnus-article-prepare-hook)
t))))))
(defvar shr-put-image-function)
;;;###autoload
(defun gnus-article-prepare-display ()
"Make the current buffer look like a nice article."
......@@ -4671,7 +4672,6 @@ If ALL-HEADERS is non-nil, no headers are hidden."
(setq buffer-read-only nil
gnus-article-wash-types nil
gnus-article-image-alist nil)
(set (make-local-variable 'shr-put-image-function) 'gnus-shr-put-image)
(gnus-run-hooks 'gnus-tmp-internal-hook)
(when gnus-display-mime-function
(funcall gnus-display-mime-function))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment