diff options
author | Chong Yidong <cyd@gnu.org> | 2012-10-29 17:55:57 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-10-29 17:55:57 +0800 |
commit | 894b9dd938ca50ca24faf2e366631a9ab9cd79b7 (patch) | |
tree | 1a451459074a5488218c4a3607ee9b6dbe4935c1 /lisp/face-remap.el | |
parent | d55911cf1de25091a072642f8ef8dd3d1f4e47b8 (diff) | |
download | emacs-894b9dd938ca50ca24faf2e366631a9ab9cd79b7.tar.gz |
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
Diffstat (limited to 'lisp/face-remap.el')
-rw-r--r-- | lisp/face-remap.el | 5 |
1 files changed, 4 insertions, 1 deletions
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) |