]> code.delx.au - gnu-emacs/blobdiff - lisp/enriched.el
(list-faces-display): Multiline case of previous fix.
[gnu-emacs] / lisp / enriched.el
index 10bbb23b4f2288f0116ccbeaba34b84621939c22..6bcfe144df3d1061bcb0ec5ae9398c22ebb32c8b 100644 (file)
 ;;; Set up faces & display table
 ;;;
 
-;; A slight cheat - all emacs's faces are fixed-width.  
-;; The idea is just to pick one that looks different from the default.
-(if (internal-find-face 'fixed)
-    nil
-  (make-face 'fixed)
-  (if window-system
-      (set-face-font 'fixed
-                    (car (or (x-list-fonts "*fixed-medium*" 
-                                           'default (selected-frame))
-                             (x-list-fonts "*fixed*" 
-                                           'default (selected-frame)))))))
-                             
-(if (internal-find-face 'excerpt)
-    nil
-  (make-face 'excerpt)
-  (if window-system
-      (make-face-italic 'excerpt nil t)))
+;; Emacs doesn't have a "fixed" face by default, since all faces currently
+;; have to be fixed-width.  So we just pick one that looks different from the
+;; default.
+(defface fixed
+  '((t (:bold t)))
+  "Face used for text that must be shown in fixed width.
+Currently, emacs can only display fixed-width fonts, but this may change.
+This face is used for text specifically marked as fixed-width, for example
+in text/enriched files."
+  :group 'enriched)
+
+(defface excerpt
+  '((t (:italic t)))
+  "Face used for text that is an excerpt from another document.
+This is used in enriched-mode for text explicitly marked as an excerpt."
+  :group 'enriched)
 
 (defconst enriched-display-table (or (copy-sequence standard-display-table)
                                     (make-display-table)))
@@ -438,8 +437,6 @@ Return value is \(begin end name positive-p), or nil if none was found."
           (message "Warning: no color specified for <x-color>"))
          ((internal-find-face face))
          ((and window-system (facemenu-get-face face)))
-         (window-system
-          (message "Warning: color `%s' is not defined" color))
          ((make-face face)
           (message "Warning: color `%s' can't be displayed" color)))
     (list from to 'face face)))
@@ -450,8 +447,6 @@ Return value is \(begin end name positive-p), or nil if none was found."
           (message "Warning: no color specified for <x-bg-color>"))
          ((internal-find-face face))
          ((and window-system (facemenu-get-face face)))
-         (window-system
-          (message "Warning: color `%s' is not defined" color))
          ((make-face face)
           (message "Warning: color `%s' can't be displayed" color)))
     (list from to 'face face)))