Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
313:2905de29931f | 314:341dac730539 |
---|---|
144 (when (widget-apply (nth 1 att) :match answer) | 144 (when (widget-apply (nth 1 att) :match answer) |
145 (setq result (cons (nth 0 att) (cons answer result))))))) | 145 (setq result (cons (nth 0 att) (cons answer result))))))) |
146 (error nil))) | 146 (error nil))) |
147 result)) | 147 result)) |
148 | 148 |
149 (defsubst custom-face-get-spec (symbol) | |
150 (or (get symbol 'customized-face) | |
151 (get symbol 'saved-face) | |
152 (get symbol 'face-defface-spec) | |
153 ;; Attempt to construct it. | |
154 (list (list t (face-custom-attributes-get | |
155 symbol (selected-frame)))))) | |
156 | |
149 (defun custom-set-face-bold (face value &optional frame) | 157 (defun custom-set-face-bold (face value &optional frame) |
150 "Set the bold property of FACE to VALUE." | 158 "Set the bold property of FACE to VALUE." |
151 (if value | 159 (if value |
152 (make-face-bold face frame) | 160 (make-face-bold face frame) |
153 (make-face-unbold face frame))) | 161 (make-face-unbold face frame))) |
212 "Return the name of the font family of FACE." | 220 "Return the name of the font family of FACE." |
213 (let* ((font (apply 'face-font-name face args)) | 221 (let* ((font (apply 'face-font-name face args)) |
214 ;; Gag | 222 ;; Gag |
215 (fontobj (font-create-object font))) | 223 (fontobj (font-create-object font))) |
216 (font-family fontobj))) | 224 (font-family fontobj))) |
225 | |
226 (defun custom-set-face-update-spec (face display plist) | |
227 "Customize the FACE for display types matching DISPLAY, merging | |
228 in the new items from PLIST" | |
229 (let ((spec (face-spec-update-all-matching (custom-face-get-spec face) | |
230 display plist))) | |
231 (put face 'customized-face spec) | |
232 (face-spec-set face spec))) | |
217 | 233 |
218 ;;; Initializing. | 234 ;;; Initializing. |
219 | 235 |
220 ;;;###autoload | 236 ;;;###autoload |
221 (defun custom-set-faces (&rest args) | 237 (defun custom-set-faces (&rest args) |