summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2000-10-27 01:46:13 +0000
committerMiles Bader <miles@gnu.org>2000-10-27 01:46:13 +0000
commit073f69e6f7eeafe53d19fb29d44eb5f2bedda38d (patch)
tree105c72ea2d0067c7b0956f94f6b23f26c6bbc6fe
parent4ddf0e64941018634f6133cc6e113c7b7dfdfea8 (diff)
downloademacs-073f69e6f7eeafe53d19fb29d44eb5f2bedda38d.tar.gz
(face-spec-choose): Change syntax so that the list of attribute-value
pairs is now the cdr of each clause, not the cadr. Detect old-style entries, and handle them. Use pop.
-rw-r--r--lisp/faces.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 8252d273f85..60e8e1a49c2 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1157,12 +1157,16 @@ If SPEC is nil, return nil."
(let ((tail spec)
result)
(while tail
- (let* ((entry (car tail))
- (display (nth 0 entry))
- (attrs (nth 1 entry)))
- (setq tail (cdr tail))
+ (let* ((entry (pop tail))
+ (display (car entry))
+ (attrs (cdr entry)))
(when (face-spec-set-match-display display frame)
- (setq result attrs tail nil))))
+ (setq result (if (listp (car attrs))
+ ;; Old-style entry, the attribute list is the
+ ;; first element.
+ (car attrs)
+ attrs)
+ tail nil))))
result))