Mercurial > emacs
changeset 12460:1e12a802df2b
(describe-face): New function.
(make-face-x-resource-internal): Give special meanings
to font "names" `italic', `bold', and `bold-italic'.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 01 Jul 1995 19:21:49 +0000 |
parents | d1da7f16002c |
children | 578abe49e2d3 |
files | lisp/faces.el |
diffstat | 1 files changed, 25 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/faces.el Sat Jul 01 05:02:09 1995 +0000 +++ b/lisp/faces.el Sat Jul 01 19:21:49 1995 +0000 @@ -383,8 +383,18 @@ ) (if fn (condition-case () - (set-face-font face fn frame) - (error (message "font `%s' not found for face `%s'" fn name)))) + (cond ((string= fn "italic") + (make-face-italic face)) + ((string= fn "bold") + (make-face-bold face)) + ((string= fn "bold-italic") + (make-face-bold-italic face)) + (t + (set-face-font face fn frame))) + (error + (if (member fn '("italic" "bold" "bold-italic")) + (message "no %s version found for face `%s'" fn name) + (message "font `%s' not found for face `%s'" fn name))))) (if fg (condition-case () (set-face-foreground face fg frame) @@ -886,6 +896,19 @@ (while faces (copy-face (car faces) (car faces) frame disp-frame) (setq faces (cdr faces))))))) + +(defun describe-face (face) + "Display the properties of face FACE." + (interactive (list (read-face-name "Describe face: "))) + (with-output-to-temp-buffer "*Help*" + (princ "Properties of face `") + (princ (face-name face)) + (princ "':") (terpri) + (princ "Foreground: ") (princ (face-foreground face)) (terpri) + (princ "Background: ") (princ (face-background face)) (terpri) + (princ " Font: ") (princ (face-font face)) (terpri) + (princ "Underlined: ") (princ (if (face-underline-p face) "yes" "no")) (terpri) + (princ " Stipple: ") (princ (or (face-stipple face) "none")))) ;;; Make the standard faces. ;;; The C code knows the default and modeline faces as faces 0 and 1,