summaryrefslogtreecommitdiff
path: root/lisp/face-remap.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-02-23 12:50:07 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-02-23 12:51:09 +0100
commit7b0b27971b583c09cbc524d2215546f5dfe4a0e1 (patch)
tree46a6a084e14fd435f288de2af0ef0a9611cd2d15 /lisp/face-remap.el
parent4f53789a0a8f219b9134546aa0b9b705bdf0086d (diff)
downloademacs-7b0b27971b583c09cbc524d2215546f5dfe4a0e1.tar.gz
Make face-remap-set-base work with a single face again
* lisp/face-remap.el (face-remap-set-base): Fix regression introduced by cece37cf09de9 (bug#46973).
Diffstat (limited to 'lisp/face-remap.el')
-rw-r--r--lisp/face-remap.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index eb4f6b9534c..50306a5e8a0 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -207,10 +207,12 @@ If SPECS is empty or a single face `eq' to FACE, call `face-remap-reset-base'
to use the normal definition of FACE as the base remapping; note that
this is different from SPECS containing a single value nil, which means
not to inherit from the global definition of FACE at all."
+ ;; Simplify the specs in the case where it's just a single face (and
+ ;; it's not a list with just a nil).
(while (and (consp specs) (not (null (car specs))) (null (cdr specs)))
(setq specs (car specs)))
(if (or (null specs)
- (and (eq (car specs) face) (null (cdr specs)))) ; default
+ (eq specs face)) ; default
;; Set entry back to default
(face-remap-reset-base face)
;; Set the base remapping