diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-11-24 22:01:21 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-11-25 11:17:00 +0100 |
commit | 7fea9c8415bd04100be7857a138ad03e5a7ec4aa (patch) | |
tree | feffdb49c0608789d3c3df517555564cb08e63fc /lisp/net/shr.el | |
parent | b469a0155140cf0c319963717cb43f2bf43864ec (diff) | |
download | emacs-7fea9c8415bd04100be7857a138ad03e5a7ec4aa.tar.gz emacs-7fea9c8415bd04100be7857a138ad03e5a7ec4aa.tar.bz2 emacs-7fea9c8415bd04100be7857a138ad03e5a7ec4aa.zip |
Define a face for shr text
* lisp/net/shr.el (shr-text): New face.
(shr-insert): Use it instead of hard-coding `variable-pitch'.
Diffstat (limited to 'lisp/net/shr.el')
-rw-r--r-- | lisp/net/shr.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 87bacd4fbf8..d59b0ed3629 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -162,6 +162,10 @@ cid: URL as the argument.") (defvar shr-put-image-function #'shr-put-image "Function called to put image and alt string.") +(defface shr-text '((t :inherit variable-pitch)) + "Face used for rendering text." + :version "29.1") + (defface shr-strike-through '((t :strike-through t)) "Face for <s> elements." :version "24.1") @@ -742,7 +746,7 @@ size, and full-buffer size." (when shr-use-fonts (put-text-property font-start (point) 'face - (or shr-current-font 'variable-pitch))))))))) + (or shr-current-font 'shr-text))))))))) (defun shr-fill-lines (start end) (if (<= shr-internal-width 0) |