aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2020-07-18 17:40:44 +0300
committerEli Zaretskii2020-07-18 17:40:44 +0300
commit58c7dc69db07130519ff2e1f818eb5422f6225d8 (patch)
treef9e3265dbf29506f69ef69baf82a8b01e136bf68
parent1cb14d0ce4acb83c29f4da493a1060e152dfef10 (diff)
downloademacs-58c7dc69db07130519ff2e1f818eb5422f6225d8.tar.gz
emacs-58c7dc69db07130519ff2e1f818eb5422f6225d8.zip
Fix documentation of a recent change in shr.el
* lisp/net/shr.el (shr-max-width, shr-width): Fix typo and wording of the doc strings. * etc/NEWS: Fix the wording of the 'shr-max-width's entry, and move it to the SHR section.
-rw-r--r--etc/NEWS18
-rw-r--r--lisp/net/shr.el25
2 files changed, 22 insertions, 21 deletions
diff --git a/etc/NEWS b/etc/NEWS
index b8cb22c7f74..7e6be008614 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -476,15 +476,17 @@ This is still the case by default, but if you customize
476'browse-url-mailto-function' or 'browse-url-handlers' to call some 476'browse-url-mailto-function' or 'browse-url-handlers' to call some
477other function, it will now be called instead of the default. 477other function, it will now be called instead of the default.
478 478
479** EWW
480
481+++ 479+++
482*** New variable 'shr-max-width' 480*** New variable 'shr-max-width'.
483This defaults to 120 characters, which means that even if you have 481If this variable is non-nil, and 'shr-width' is nil, then SHR will use
484very wide frames, HTML text will be rendered more narrowly, which 482the value of 'shr-max-width' to limit the width of the rendered HTML.
485usually leads to a more readable text. If nil, 'shr-width' is adhered 483The default is 120 characters, so even if you have very wide frames,
486to as before, and as that defaults to nil, the window width is always 484HTML text will be rendered more narrowly, which usually leads to a
487used. 485more readable text. Set this variable to nil to get the previous
486behavior of rendering as wide as the window-width allows. If
487'shr-width' is non-nil, it overrides this variable.
488
489** EWW
488 490
489--- 491---
490*** The command 'eww-follow-link' now supports custom mailto handlers. 492*** The command 'eww-follow-link' now supports custom mailto handlers.
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index d6bdb4c17e0..ddd81127213 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -95,11 +95,11 @@ If nil, don't draw horizontal table lines."
95 :type 'character) 95 :type 'character)
96 96
97(defcustom shr-width nil 97(defcustom shr-width nil
98 "Frame width to use for rendering. 98 "Window width to use for HTML rendering.
99May either be an integer specifying a fixed width in characters, 99May either be an integer specifying a fixed width in characters,
100or nil, meaning that the full width of the window should be used. 100or nil, meaning use the full width of the window.
101If `shr-use-fonts' is set, the mean character width is used to 101If `shr-use-fonts' is set, the value is interpreted as a multiple
102compute the pixel width, which is used instead. 102of the mean character width of the default face's font.
103 103
104Also see `shr-max-width'." 104Also see `shr-max-width'."
105 :version "25.1" 105 :version "25.1"
@@ -107,19 +107,18 @@ Also see `shr-max-width'."
107 (const :tag "Use the width of the window" nil))) 107 (const :tag "Use the width of the window" nil)))
108 108
109(defcustom shr-max-width 120 109(defcustom shr-max-width 120
110 "Maximum text width to use for rendering. 110 "Maximum text width to use for HTML rendering.
111May either be an intereger specifying a fixed width in characters, 111May either be an integer specifying a fixed width in characters,
112or nil, meaning that there is no maximum width. 112or nil, meaning that there is no width limit.
113 113
114If `shr-use-fonts' is set, the mean character width is used to 114If `shr-use-fonts' is set, the value of this variable is
115compute the pixel width, which is used instead. 115interpreted as a multiple of the mean character width of the
116default face's font.
116 117
117Also see `shr-width'. If `shr-width' is set, it overrides 118If `shr-width' is non-nil, it overrides this variable."
118`shr-max-width', and if `shr-width' is nil, the frame width is
119used to compute the width to use."
120 :version "28.1" 119 :version "28.1"
121 :type '(choice (integer :tag "Fixed width in characters") 120 :type '(choice (integer :tag "Fixed width in characters")
122 (const :tag "No maximum width" nil))) 121 (const :tag "No width limit" nil)))
123 122
124(defcustom shr-bullet "* " 123(defcustom shr-bullet "* "
125 "Bullet used for unordered lists. 124 "Bullet used for unordered lists.