aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1997-07-21 19:06:57 +0000
committerRichard M. Stallman <[email protected]>1997-07-21 19:06:57 +0000
commit8d86541f8d67af2f4572aff8821a992fd118df14 (patch)
treeec059bfcaa0a22ef03b3d40d90df12231129b6d6 /lisp
parentb1b7afc798b9020d1d3e4d4dbd459acec8c85510 (diff)
(fixed, excerpt): Define with defface. No longer
queries X server to find a "fixed" font; that was too slow and didn't work for everyone.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/enriched.el33
1 files changed, 16 insertions, 17 deletions
diff --git a/lisp/enriched.el b/lisp/enriched.el
index 10bbb23b4f..fdae2ac830 100644
--- a/lisp/enriched.el
+++ b/lisp/enriched.el
@@ -59,23 +59,22 @@
;;; 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)))