]> code.delx.au - gnu-emacs/commitdiff
Manage face-remapping-alist properly in face-remap-add-relative.
authorChong Yidong <cyd@gnu.org>
Mon, 29 Oct 2012 09:55:57 +0000 (17:55 +0800)
committerChong Yidong <cyd@gnu.org>
Mon, 29 Oct 2012 09:55:57 +0000 (17:55 +0800)
* 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
lisp/face-remap.el

index 76cc7e52863b2b1763c104fd288e440cb0df2ace..093d392d7d3f659d32d717da9ef299c04a1e64f4 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-29  Chong Yidong  <cyd@gnu.org>
+
+       * 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  <rgm@gnu.org>
 
        * emacs-lisp/cl.el (defsetf): Doc fix.
index baf1eeb389dce71b0d11d5f323cc13e6334964e1..903c12a787e9d62c761aac16128ad91dd61cdc51 100644 (file)
@@ -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)