+2000-08-20 Miles Bader <miles@gnu.org>
+
+ * faces.el (face-attr-match-p): Don't return true if ATTRS are
+ merely a subset of FACE's attributes.
+
2000-08-19 Miles Bader <miles@gnu.org>
* comint.el (comint-output-filter): Save the point with a marker,
(defun face-attr-match-p (face attrs &optional frame)
- "Value is non-nil if attributes of FACE match values in plist ATTRS.
+ "Return t if attributes of FACE match values in plist ATTRS.
Optional parameter FRAME is the frame whose definition of FACE
is used. If nil or omitted, use the selected frame."
(unless frame
(match t))
(while (and match (not (null list)))
(let* ((attr (car (car list)))
- (specified-value (plist-get attrs attr))
+ (specified-value
+ (if (plist-member attrs attr)
+ (plist-get attrs attr)
+ 'unspecified))
(value-now (face-attribute face attr frame)))
- (when specified-value
- (setq match (equal specified-value value-now)))
+ (setq match (equal specified-value value-now))
(setq list (cdr list))))
match))
-
(defun face-spec-match-p (face spec &optional frame)
"Return t if FACE, on FRAME, matches what SPEC says it should look like."
(face-attr-match-p face (face-spec-choose spec frame) frame))