Mercurial > hg > xemacs-beta
diff lisp/cus-face.el @ 314:341dac730539 r21-0b55
Import from CVS: tag r21-0b55
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:44:22 +0200 |
parents | c9fe270a4101 |
children | 19dcec799385 |
line wrap: on
line diff
--- a/lisp/cus-face.el Mon Aug 13 10:43:56 2007 +0200 +++ b/lisp/cus-face.el Mon Aug 13 10:44:22 2007 +0200 @@ -146,6 +146,14 @@ (error nil))) result)) +(defsubst custom-face-get-spec (symbol) + (or (get symbol 'customized-face) + (get symbol 'saved-face) + (get symbol 'face-defface-spec) + ;; Attempt to construct it. + (list (list t (face-custom-attributes-get + symbol (selected-frame)))))) + (defun custom-set-face-bold (face value &optional frame) "Set the bold property of FACE to VALUE." (if value @@ -215,6 +223,14 @@ (fontobj (font-create-object font))) (font-family fontobj))) +(defun custom-set-face-update-spec (face display plist) + "Customize the FACE for display types matching DISPLAY, merging + in the new items from PLIST" + (let ((spec (face-spec-update-all-matching (custom-face-get-spec face) + display plist))) + (put face 'customized-face spec) + (face-spec-set face spec))) + ;;; Initializing. ;;;###autoload