summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2010-10-13 11:55:48 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2010-10-13 11:55:48 +0000
commitd0e0de31a6628cd38c69f555aebab0a49ff64418 (patch)
treedc3f958558dcd63da687334aac870af0568702c7 /lisp
parent68d9bf4b702c6cb2616b1061b34e2d50d4ffe9a3 (diff)
downloademacs-d0e0de31a6628cd38c69f555aebab0a49ff64418.tar.gz
shr: make shr-width a defcustom, use it in shr-tag-img.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/shr.el10
2 files changed, 12 insertions, 4 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index c90dc7c77c2..a568a530927 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-13 Julien Danjou <julien@danjou.info>
+
+ * shr.el (shr-width): Make shr-width a defcustom with default to
+ fill-column.
+ (shr-tag-img): Use shr-width rather than fill-column.
+
2010-10-13 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-dired.el (gnus-dired-attach): Silence XEmacs 21.5 when compiling.
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index 03c0ec84d5d..8a0e814bca3 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -68,14 +68,16 @@ fit these criteria."
:group 'shr
:type 'char)
+(defcustom shr-width fill-column
+ "Frame width to use for rendering."
+ :type 'integer
+ :group 'shr)
+
(defvar shr-content-function nil
"If bound, this should be a function that will return the content.
This is used for cid: URLs, and the function is called with the
cid: URL as the argument.")
-(defvar shr-width 70
- "Frame width to use for rendering.")
-
;;; Internal variables.
(defvar shr-folding-mode nil)
@@ -404,7 +406,7 @@ Return a string with image data."
(when width
;; Check that width is not larger than max width, otherwise ignore
;; align
- (let ((max-width (* fill-column (frame-char-width)))
+ (let ((max-width (* shr-width (frame-char-width)))
(width (string-to-number width)))
(when (< width max-width)
(let ((align (cdr (assq :align cont))))