gnus-art.el (gnus-article-mode): Move binding of shr-put-image-function here from...
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 10 May 2011 07:27:04 +0000 (07:27 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 10 May 2011 07:27:04 +0000 (07:27 +0000)
lisp/ChangeLog
lisp/gnus-art.el

index 49a4776..b9740bb 100644 (file)
@@ -1,5 +1,8 @@
 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.
index 13531bf..5ba962d 100644 (file)
@@ -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))))