diff options
| author | Katsumi Yamaoka | 2011-05-10 07:30:49 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-05-10 07:30:49 +0000 |
| commit | ffb54e99ad5c0c3529e22eec4d112d64977f81a3 (patch) | |
| tree | 13e785b0dcd98cddb672d0ec48c35e8e81f421d4 | |
| parent | b9bdaf749fb16229ef78c71a8cba2d4c37f4a6d9 (diff) | |
| download | emacs-ffb54e99ad5c0c3529e22eec4d112d64977f81a3.tar.gz emacs-ffb54e99ad5c0c3529e22eec4d112d64977f81a3.zip | |
gnus-art.el (gnus-article-mode): Move binding of shr-put-image-function here from gnus-article-prepare-display.
| -rw-r--r-- | lisp/gnus/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/gnus/gnus-art.el | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 1460896dd89..5f7cd9f546b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-05-10 Katsumi Yamaoka <yamaoka@jpl.org> | 1 | 2011-05-10 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 2 | ||
| 3 | * gnus-art.el (gnus-article-mode): Move binding of | ||
| 4 | shr-put-image-function here from gnus-article-prepare-display. | ||
| 5 | |||
| 3 | * shr.el (shr-put-image-function): New variable. | 6 | * shr.el (shr-put-image-function): New variable. |
| 4 | (shr-image-fetched, shr-image-displayer, shr-tag-img): Funcall it. | 7 | (shr-image-fetched, shr-image-displayer, shr-tag-img): Funcall it. |
| 5 | (shr-put-image): Return scaled image. | 8 | (shr-put-image): Return scaled image. |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 13531bf434e..5ba962d1d39 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -4418,6 +4418,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is | |||
| 4418 | (gnus-run-hooks 'gnus-article-menu-hook))) | 4418 | (gnus-run-hooks 'gnus-article-menu-hook))) |
| 4419 | 4419 | ||
| 4420 | (defvar bookmark-make-record-function) | 4420 | (defvar bookmark-make-record-function) |
| 4421 | (defvar shr-put-image-function) | ||
| 4421 | 4422 | ||
| 4422 | (defun gnus-article-mode () | 4423 | (defun gnus-article-mode () |
| 4423 | "Major mode for displaying an article. | 4424 | "Major mode for displaying an article. |
| @@ -4461,6 +4462,8 @@ commands: | |||
| 4461 | ;; Prevent Emacs 22 from displaying non-break space with `nobreak-space' | 4462 | ;; Prevent Emacs 22 from displaying non-break space with `nobreak-space' |
| 4462 | ;; face. | 4463 | ;; face. |
| 4463 | (set (make-local-variable 'nobreak-char-display) nil) | 4464 | (set (make-local-variable 'nobreak-char-display) nil) |
| 4465 | ;; Enable `gnus-article-remove-images' to delete images shr.el renders. | ||
| 4466 | (set (make-local-variable 'shr-put-image-function) 'gnus-shr-put-image) | ||
| 4464 | (setq cursor-in-non-selected-windows nil) | 4467 | (setq cursor-in-non-selected-windows nil) |
| 4465 | (gnus-set-default-directory) | 4468 | (gnus-set-default-directory) |
| 4466 | (buffer-disable-undo) | 4469 | (buffer-disable-undo) |
| @@ -4656,8 +4659,6 @@ If ALL-HEADERS is non-nil, no headers are hidden." | |||
| 4656 | (gnus-run-hooks 'gnus-article-prepare-hook) | 4659 | (gnus-run-hooks 'gnus-article-prepare-hook) |
| 4657 | t)))))) | 4660 | t)))))) |
| 4658 | 4661 | ||
| 4659 | (defvar shr-put-image-function) | ||
| 4660 | |||
| 4661 | ;;;###autoload | 4662 | ;;;###autoload |
| 4662 | (defun gnus-article-prepare-display () | 4663 | (defun gnus-article-prepare-display () |
| 4663 | "Make the current buffer look like a nice article." | 4664 | "Make the current buffer look like a nice article." |
| @@ -4671,7 +4672,6 @@ If ALL-HEADERS is non-nil, no headers are hidden." | |||
| 4671 | (setq buffer-read-only nil | 4672 | (setq buffer-read-only nil |
| 4672 | gnus-article-wash-types nil | 4673 | gnus-article-wash-types nil |
| 4673 | gnus-article-image-alist nil) | 4674 | gnus-article-image-alist nil) |
| 4674 | (set (make-local-variable 'shr-put-image-function) 'gnus-shr-put-image) | ||
| 4675 | (gnus-run-hooks 'gnus-tmp-internal-hook) | 4675 | (gnus-run-hooks 'gnus-tmp-internal-hook) |
| 4676 | (when gnus-display-mime-function | 4676 | (when gnus-display-mime-function |
| 4677 | (funcall gnus-display-mime-function)))) | 4677 | (funcall gnus-display-mime-function)))) |