emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101275: gnus-html.el: We can't resca


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101275: gnus-html.el: We can't rescale if we don't have the article buffer in a window.
Date: Thu, 02 Sep 2010 00:13:51 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101275
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2010-09-02 00:13:51 +0000
message:
  gnus-html.el: We can't rescale if we don't have the article buffer in a 
window.
modified:
  lisp/gnus/gnus-html.el
=== modified file 'lisp/gnus/gnus-html.el'
--- a/lisp/gnus/gnus-html.el    2010-09-02 00:08:22 +0000
+++ b/lisp/gnus/gnus-html.el    2010-09-02 00:13:51 +0000
@@ -243,11 +243,12 @@
          nil)))))
 
 (defun gnus-html-rescale-image (image)
-  (if (not (fboundp 'imagemagick-types))
+  (if (or (not (fboundp 'imagemagick-types))
+         (not (get-buffer-window (current-buffer))))
       image
     (let* ((width (car (image-size image t)))
           (height (cdr (image-size image t)))
-          (edges (window-pixel-edges))
+          (edges (window-pixel-edges (get-buffer-window (current-buffer))))
           (window-width (truncate (* gnus-max-image-proportion
                                      (- (nth 2 edges) (nth 0 edges)))))
           (window-height (truncate (* gnus-max-image-proportion


reply via email to

[Prev in Thread] Current Thread [Next in Thread]