mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-12 10:44:12 -08:00
Use proportional fonts in the Gnus headers by default
* lisp/gnus/gnus-art.el (gnus-header): Inherit from `variable-pitch'. (gnus--variable-pitch-p): New helper function. (gnus-article-treat-fold-headers): Fill using pixel filling.
This commit is contained in:
parent
9d17e346fe
commit
2d60566c87
2 changed files with 19 additions and 2 deletions
7
etc/NEWS
7
etc/NEWS
|
|
@ -366,6 +366,13 @@ the common "utm_" trackers from URLs.
|
|||
|
||||
** Gnus
|
||||
|
||||
---
|
||||
*** Gnus now uses a variable-pitch font in the headers by default.
|
||||
To get the monospace font back, you can put something like the
|
||||
following in your .gnus file:
|
||||
|
||||
(set-face-attribute 'gnus-header nil :inherit 'unspecified)
|
||||
|
||||
---
|
||||
*** New face 'gnus-header'.
|
||||
All other 'gnus-header-*' faces inherit from this face now.
|
||||
|
|
|
|||
|
|
@ -769,7 +769,7 @@ Obsolete; use the face `gnus-signature' for customizations instead."
|
|||
:group 'gnus-article-signature)
|
||||
|
||||
(defface gnus-header
|
||||
'((t nil))
|
||||
'((t :inherit variable-pitch))
|
||||
"Base face used for all Gnus header faces.
|
||||
All the other `gnus-header-' faces inherit from this face."
|
||||
:version "29.1"
|
||||
|
|
@ -2212,6 +2212,13 @@ unfolded."
|
|||
(replace-match " " t t))))
|
||||
(goto-char (point-max)))))))
|
||||
|
||||
(defun gnus--variable-pitch-p (face)
|
||||
(or (eq face 'variable-pitch)
|
||||
(let ((parent (face-attribute face :inherit)))
|
||||
(if (eq parent 'unspecified)
|
||||
nil
|
||||
(seq-some #'gnus--variable-pitch-p (ensure-list parent))))))
|
||||
|
||||
(defun gnus-article-treat-fold-headers ()
|
||||
"Fold message headers."
|
||||
(interactive nil gnus-article-mode gnus-summary-mode)
|
||||
|
|
@ -2219,7 +2226,10 @@ unfolded."
|
|||
(while (not (eobp))
|
||||
(save-restriction
|
||||
(mail-header-narrow-to-field)
|
||||
(mail-header-fold-field)
|
||||
(if (not (gnus--variable-pitch-p (get-text-property (point) 'face)))
|
||||
(mail-header-fold-field)
|
||||
(forward-char 1)
|
||||
(pixel-fill-region (point) (point-max) (pixel-fill-width)))
|
||||
(goto-char (point-max))))))
|
||||
|
||||
(defun gnus-treat-smiley ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue