From: Lars Ingebrigtsen Date: Wed, 11 Aug 2021 20:29:38 +0000 (+0200) Subject: Allow using a single anonymous face in enriced-mode X-Git-Tag: emacs-28.0.90~1548 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3b5f8ab0d06f6c39aaa716b6279c2ceb4bfc5b14;p=emacs.git Allow using a single anonymous face in enriced-mode * lisp/format.el (format-annotate-single-property-change): Allow using a single anonymous face (bug#33682). --- diff --git a/lisp/format.el b/lisp/format.el index 1e87d252844..71cf885d417 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -1013,6 +1013,12 @@ either strings, or lists of the form (PARAMETER VALUE)." prop-alist (car old) nil)) close) old (cdr old))) + ;; If the font is on the format (:background "red"), + ;; then we have a single face. We're assuming a list of + ;; faces, so transform. + (when (and (listp new) + (keywordp (car new))) + (setq new (list new))) (while new (setq open (append (cdr (format-annotate-atomic-property-change