aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-07-01 19:21:49 +0000
committerRichard M. Stallman1995-07-01 19:21:49 +0000
commit19deb21efeb9fca0a97e9d33dad19c1eb827c689 (patch)
treefd55d881993f9d44210c2e7b746dafaa51848b20
parent24a9ec1bc475cad3f343f82ee2de19c5b0a36506 (diff)
downloademacs-19deb21efeb9fca0a97e9d33dad19c1eb827c689.tar.gz
emacs-19deb21efeb9fca0a97e9d33dad19c1eb827c689.zip
(describe-face): New function.
(make-face-x-resource-internal): Give special meanings to font "names" `italic', `bold', and `bold-italic'.
-rw-r--r--lisp/faces.el27
1 files changed, 25 insertions, 2 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index 990886afd9f..8025a085543 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -383,8 +383,18 @@ If the face already exists, it is unmodified."
383 ) 383 )
384 (if fn 384 (if fn
385 (condition-case () 385 (condition-case ()
386 (set-face-font face fn frame) 386 (cond ((string= fn "italic")
387 (error (message "font `%s' not found for face `%s'" fn name)))) 387 (make-face-italic face))
388 ((string= fn "bold")
389 (make-face-bold face))
390 ((string= fn "bold-italic")
391 (make-face-bold-italic face))
392 (t
393 (set-face-font face fn frame)))
394 (error
395 (if (member fn '("italic" "bold" "bold-italic"))
396 (message "no %s version found for face `%s'" fn name)
397 (message "font `%s' not found for face `%s'" fn name)))))
388 (if fg 398 (if fg
389 (condition-case () 399 (condition-case ()
390 (set-face-foreground face fg frame) 400 (set-face-foreground face fg frame)
@@ -886,6 +896,19 @@ selected frame."
886 (while faces 896 (while faces
887 (copy-face (car faces) (car faces) frame disp-frame) 897 (copy-face (car faces) (car faces) frame disp-frame)
888 (setq faces (cdr faces))))))) 898 (setq faces (cdr faces)))))))
899
900(defun describe-face (face)
901 "Display the properties of face FACE."
902 (interactive (list (read-face-name "Describe face: ")))
903 (with-output-to-temp-buffer "*Help*"
904 (princ "Properties of face `")
905 (princ (face-name face))
906 (princ "':") (terpri)
907 (princ "Foreground: ") (princ (face-foreground face)) (terpri)
908 (princ "Background: ") (princ (face-background face)) (terpri)
909 (princ " Font: ") (princ (face-font face)) (terpri)
910 (princ "Underlined: ") (princ (if (face-underline-p face) "yes" "no")) (terpri)
911 (princ " Stipple: ") (princ (or (face-stipple face) "none"))))
889 912
890;;; Make the standard faces. 913;;; Make the standard faces.
891;;; The C code knows the default and modeline faces as faces 0 and 1, 914;;; The C code knows the default and modeline faces as faces 0 and 1,