From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/75477 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] Allow nil as shr-width value => full emacs window width Date: Thu, 30 Dec 2010 11:22:49 +0100 Message-ID: <87wrmrmufa.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1293704640 21486 80.91.229.12 (30 Dec 2010 10:24:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 30 Dec 2010 10:24:00 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M23828@lists.math.uh.edu Thu Dec 30 11:23:57 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PYFfn-0003jX-VO for ding-account@gmane.org; Thu, 30 Dec 2010 11:23:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PYFep-0002x1-51; Thu, 30 Dec 2010 04:22:55 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PYFem-0002wr-QJ for ding@lists.math.uh.edu; Thu, 30 Dec 2010 04:22:52 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PYFel-0006zQ-9y for ding@lists.math.uh.edu; Thu, 30 Dec 2010 04:22:52 -0600 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1PYFek-0001p2-IQ for ding@gnus.org; Thu, 30 Dec 2010 11:22:50 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 44C2378016B3 for ; Thu, 30 Dec 2010 11:22:50 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02026-05 for ; Thu, 30 Dec 2010 11:22:49 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad (tsdh.uni-koblenz.de [141.26.67.142]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 4DD4E78016AC for ; Thu, 30 Dec 2010 11:22:49 +0100 (CET) User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:75477 Archived-At: Hi all, this patch adds nil as possible customize option for `shr-width'. With that, rendering uses up the full emacs window width for rendering. Bye, Tassilo --- lisp/ChangeLog | 5 +++++ lisp/shr.el | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 417f737..6288501 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-12-30 Tassilo Horn + + * 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 * mml2015.el (mml2015-epg-sign, mml2015-epg-encrypt): Take care the diff --git a/lisp/shr.el b/lisp/shr.el index 1e95dde..c403c6d 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -74,8 +74,12 @@ fit these criteria." :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 @@ -111,6 +115,8 @@ cid: URL as the argument.") ;;;###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)) -- 1.7.3.4 Sent from my Emacs