comparison lisp/faces.el @ 31500:33b9a5b2a3bc

(face-spec-set): Only face-spec-reset-face when ATTRS is non-nil.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 08 Sep 2000 13:51:08 +0000
parents 159470ebe092
children a461cad7a942
comparison
equal deleted inserted replaced
31499:3bc3df2053c4 31500:33b9a5b2a3bc
1172 (defun face-spec-set (face spec &optional frame) 1172 (defun face-spec-set (face spec &optional frame)
1173 "Set FACE's attributes according to the first matching entry in SPEC. 1173 "Set FACE's attributes according to the first matching entry in SPEC.
1174 FRAME is the frame whose frame-local face is set. FRAME nil means 1174 FRAME is the frame whose frame-local face is set. FRAME nil means
1175 do it on all frames. See `defface' for information about SPEC." 1175 do it on all frames. See `defface' for information about SPEC."
1176 (let ((attrs (face-spec-choose spec frame))) 1176 (let ((attrs (face-spec-choose spec frame)))
1177 (face-spec-reset-face face frame) 1177 (when attrs
1178 (face-spec-reset-face face frame))
1178 (while attrs 1179 (while attrs
1179 (let ((attribute (car attrs)) 1180 (let ((attribute (car attrs))
1180 (value (car (cdr attrs)))) 1181 (value (car (cdr attrs))))
1181 ;; Support some old-style attribute names and values. 1182 ;; Support some old-style attribute names and values.
1182 (case attribute 1183 (case attribute