+2010-12-30 Tassilo Horn <tassilo@member.fsf.org>
+
+ * shr.el (shr-width, shr-insert-document): Allow nil as shr-width value
+ with the meaning of using the full emacs window width for rendering.
+
2010-12-27 Daiki Ueno <ueno@unixuser.org>
* mml2015.el (mml2015-epg-sign, mml2015-epg-encrypt): Take care the
:type 'character)
(defcustom shr-width fill-column
- "Frame width to use for rendering."
- :type 'integer
+ "Frame width to use for rendering.
+May either be an integer specifying a fixed width in characters,
+or nil, meaning that the full width of the window should be
+used."
+ :type '(choice (integer :tag "Fixed width in characters")
+ (const :tag "Use the width of the window" nil))
:group 'shr)
(defvar shr-content-function nil
;;;###autoload
(defun shr-insert-document (dom)
+ (unless (integerp shr-width)
+ (set (make-local-variable 'shr-width) (window-width)))
(setq shr-content-cache nil)
(let ((shr-state nil)
(shr-start nil))