From 894b9dd938ca50ca24faf2e366631a9ab9cd79b7 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 29 Oct 2012 17:55:57 +0800 Subject: [PATCH] Manage face-remapping-alist properly in face-remap-add-relative. * face-remap.el (face-remap-add-relative): Handle the case where a face-remapping-alist entry is a cons cell. Fixes: debbugs:12762 --- lisp/ChangeLog | 5 +++++ lisp/face-remap.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 76cc7e52863..093d392d7d3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-10-29 Chong Yidong + + * face-remap.el (face-remap-add-relative): Handle the case where a + face-remapping-alist entry is a cons cell (Bug#12762). + 2012-10-29 Glenn Morris * emacs-lisp/cl.el (defsetf): Doc fix. diff --git a/lisp/face-remap.el b/lisp/face-remap.el index baf1eeb389d..903c12a787e 100644 --- a/lisp/face-remap.el +++ b/lisp/face-remap.el @@ -132,7 +132,10 @@ other than the normal definition of FACE via `face-remap-set-base'." (when (null entry) (setq entry (list face face)) ; explicitly merge with global def (push entry face-remapping-alist)) - (setcdr entry (face-remap-order (cons specs (cdr entry)))) + (let ((faces (cdr entry))) + (if (symbolp faces) + (setq faces (list faces))) + (setcdr entry (face-remap-order (cons specs faces)))) (cons face specs))) (defun face-remap-remove-relative (cookie) -- 2.39.2