diff options
| author | Eli Zaretskii | 2020-07-18 17:40:44 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2020-07-18 17:40:44 +0300 |
| commit | 58c7dc69db07130519ff2e1f818eb5422f6225d8 (patch) | |
| tree | f9e3265dbf29506f69ef69baf82a8b01e136bf68 | |
| parent | 1cb14d0ce4acb83c29f4da493a1060e152dfef10 (diff) | |
| download | emacs-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/NEWS | 18 | ||||
| -rw-r--r-- | lisp/net/shr.el | 25 |
2 files changed, 22 insertions, 21 deletions
| @@ -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 |
| 477 | other function, it will now be called instead of the default. | 477 | other 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'. |
| 483 | This defaults to 120 characters, which means that even if you have | 481 | If this variable is non-nil, and 'shr-width' is nil, then SHR will use |
| 484 | very wide frames, HTML text will be rendered more narrowly, which | 482 | the value of 'shr-max-width' to limit the width of the rendered HTML. |
| 485 | usually leads to a more readable text. If nil, 'shr-width' is adhered | 483 | The default is 120 characters, so even if you have very wide frames, |
| 486 | to as before, and as that defaults to nil, the window width is always | 484 | HTML text will be rendered more narrowly, which usually leads to a |
| 487 | used. | 485 | more readable text. Set this variable to nil to get the previous |
| 486 | behavior 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. |
| 99 | May either be an integer specifying a fixed width in characters, | 99 | May either be an integer specifying a fixed width in characters, |
| 100 | or nil, meaning that the full width of the window should be used. | 100 | or nil, meaning use the full width of the window. |
| 101 | If `shr-use-fonts' is set, the mean character width is used to | 101 | If `shr-use-fonts' is set, the value is interpreted as a multiple |
| 102 | compute the pixel width, which is used instead. | 102 | of the mean character width of the default face's font. |
| 103 | 103 | ||
| 104 | Also see `shr-max-width'." | 104 | Also 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. |
| 111 | May either be an intereger specifying a fixed width in characters, | 111 | May either be an integer specifying a fixed width in characters, |
| 112 | or nil, meaning that there is no maximum width. | 112 | or nil, meaning that there is no width limit. |
| 113 | 113 | ||
| 114 | If `shr-use-fonts' is set, the mean character width is used to | 114 | If `shr-use-fonts' is set, the value of this variable is |
| 115 | compute the pixel width, which is used instead. | 115 | interpreted as a multiple of the mean character width of the |
| 116 | default face's font. | ||
| 116 | 117 | ||
| 117 | Also see `shr-width'. If `shr-width' is set, it overrides | 118 | If `shr-width' is non-nil, it overrides this variable." |
| 118 | `shr-max-width', and if `shr-width' is nil, the frame width is | ||
| 119 | used 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. |