From: Lars Ingebrigtsen Date: Mon, 29 Dec 2014 12:47:43 +0000 (+0100) Subject: Make eww rendering default to `window-width' again X-Git-Tag: emacs-25.0.90~2631^2~12^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c5a81fdb6fc2422807674c2d7b27f8333a3b9e12;p=emacs.git Make eww rendering default to `window-width' again * lisp/gnus/mm-decode.el (mm-shr): Bind `shr-width' to `fill-column' so that lines don't get overlong when responding. * lisp/net/eww.el (eww-mode): Truncate overlong lines for prettier display when resizing. * lisp/net/shr.el (shr-width): Default to using the window width when rendering. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d2aa9b96a0..82608b76b57 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2014-12-29 Lars Ingebrigtsen + + * net/eww.el (eww-mode): Truncate overlong lines for prettier + display when resizing. + + * net/shr.el (shr-width): Default to using the window width when + rendering. + 2014-12-29 Dmitry Gutov Unbreak jumping to an alias's definition. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 6f0ea0f57de..0007b15a76a 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2014-12-29 Lars Ingebrigtsen + + * mm-decode.el (mm-shr): Bind `shr-width' to `fill-column' so that + lines don't get overlong when responding. + 2014-12-18 Paul Eggert * registry.el (registry-db): Set default slot later. diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index f5b4d7cba88..3913ecc0b4e 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1814,6 +1814,7 @@ If RECURSIVE, search recursively." ;; Require since we bind its variables. (require 'shr) (let ((article-buffer (current-buffer)) + (shr-width fill-column) (shr-content-function (lambda (id) (let ((handle (mm-get-content-id id))) (when handle diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 9d787d34f49..b43dba589c2 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -705,6 +705,7 @@ the like." (setq-local tool-bar-map eww-tool-bar-map)) ;; desktop support (setq-local desktop-save-buffer 'eww-desktop-misc-data) + (setq truncate-lines t) (buffer-disable-undo) (setq buffer-read-only t)) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 26bb292bc41..6553fd3958c 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -78,11 +78,12 @@ If nil, don't draw horizontal table lines." :group 'shr :type 'character) -(defcustom shr-width fill-column +(defcustom shr-width nil "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." + :version "25.1" :type '(choice (integer :tag "Fixed width in characters") (const :tag "Use the width of the window" nil)) :group 'shr)