emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110718: Manage face-remapping-alist


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110718: Manage face-remapping-alist properly in face-remap-add-relative.
Date: Mon, 29 Oct 2012 17:55:57 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110718
fixes bug: http://debbugs.gnu.org/12762
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Mon 2012-10-29 17:55:57 +0800
message:
  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.
modified:
  lisp/ChangeLog
  lisp/face-remap.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-29 01:12:53 +0000
+++ b/lisp/ChangeLog    2012-10-29 09:55:57 +0000
@@ -1,3 +1,8 @@
+2012-10-29  Chong Yidong  <address@hidden>
+
+       * 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  <address@hidden>
 
        * emacs-lisp/cl.el (defsetf): Doc fix.

=== modified file 'lisp/face-remap.el'
--- a/lisp/face-remap.el        2012-10-26 17:07:35 +0000
+++ b/lisp/face-remap.el        2012-10-29 09:55:57 +0000
@@ -132,7 +132,10 @@
     (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]