From a9de7d29be745a0f5309833a4b6ead2391fd9de7 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sun, 20 Aug 2000 12:02:24 +0000 Subject: [PATCH] (face-attr-match-p): Don't return true if ATTRS are merely a subset of FACE's attributes. --- lisp/ChangeLog | 5 +++++ lisp/faces.el | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9410b899f99..ba953c47e81 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-08-20 Miles Bader + + * 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 * comint.el (comint-output-filter): Save the point with a marker, diff --git a/lisp/faces.el b/lisp/faces.el index 48ec17c3b85..906ae16c780 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1179,7 +1179,7 @@ do it on all frames. See `defface' for information about SPEC." (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 @@ -1188,14 +1188,15 @@ is used. If nil or omitted, use the selected 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)) -- 2.39.2