Better support for anonymous faces in Enriched Text mode

* lisp/textmodes/enriched.el (enriched-face-ans): Support
:underline, :weight, and :slant in anonymous faces.  Suggested by
Madhu <enometh@meer.net>.
This commit is contained in:
Eli Zaretskii 2026-03-28 13:13:19 +03:00
parent d2a529d890
commit f6c1421d1b

View file

@ -390,6 +390,16 @@ which can be the value of the `face' text property."
(list (list "x-color" (cadr face))))
((and (listp face) (eq (car face) :background))
(list (list "x-bg-color" (cadr face))))
((and (listp face) (eq (car face) :underline))
(list (list "underline")))
((and (listp face)
(eq (car face) :weight)
(eq (cadr face) 'bold))
(list (list "bold")))
((and (listp face)
(eq (car face) :slant)
(memq (cadr face) '(italic oblique)))
(list (list "italic")))
((listp face)
(apply #'append (mapcar #'enriched-face-ans face)))
((let* ((fg (face-attribute face :foreground))