# HG changeset patch # User Richard M. Stallman # Date 804626509 0 # Node ID 1e12a802df2bbdfa92e174af5bc6c6276e82540d # Parent d1da7f16002c83d9891c7b57ced1db21a845d05a (describe-face): New function. (make-face-x-resource-internal): Give special meanings to font "names" `italic', `bold', and `bold-italic'. diff -r d1da7f16002c -r 1e12a802df2b lisp/faces.el --- 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,