]> code.delx.au - gnu-emacs/blobdiff - lisp/enriched.el
(popup-dialog-box): Don't quote nil and t in docstrings.
[gnu-emacs] / lisp / enriched.el
index 7d0c9fa70b866d8ced5aadbe455a48463d3d3571..e74cb6b8ba75f056f3f9a80619f3bbdd1eed427c 100644 (file)
@@ -1,6 +1,6 @@
 ;;; enriched.el --- read and save files in text/enriched format
 
-;; Copyright (c) 1994, 1995, 1996 Free Software Foundation, Inc.
+;; Copyright (c) 1994, 1995, 1996, 2002 Free Software Foundation, Inc.
 
 ;; Author: Boris Goldowsky <boris@gnu.org>
 ;; Keywords: wp, faces
@@ -347,10 +347,6 @@ which can be the value of the `face' text property."
         (list (list "x-bg-color" (cadr face))))
        ((listp face)
         (apply 'append (mapcar 'enriched-face-ans face)))
-       ((string-match "^fg:" (symbol-name face))
-        (list (list "x-color" (substring (symbol-name face) 3))))
-       ((string-match "^bg:" (symbol-name face))
-        (list (list "x-bg-color" (substring (symbol-name face) 3))))
        ((let* ((fg (face-attribute face :foreground))
                (bg (face-attribute face :background))
                (props (face-font face t))
@@ -436,28 +432,16 @@ Return value is \(begin end name positive-p), or nil if none was found."
       (delete-char 1)))
 
 (defun enriched-decode-foreground (from to &optional color)
-  (let ((face (intern (concat "fg:" color))))
-    (cond ((null color)
-          (message "Warning: no color specified for <x-color>"))
-         ((facep face))
-         ((and (display-color-p) (facemenu-get-face face))
-          (set-face-foreground face color))
-         ((make-face face)
-          (message "Warning: color `%s' can't be displayed" color)))
-    (list from to 'face face)))
+  (if color
+      (list from to 'face (list ':foreground color))
+    (message "Warning: no color specified for <x-color>")
+    nil))
 
 (defun enriched-decode-background (from to &optional color)
-  (let ((face (intern (concat "bg:" color))))
-    (cond ((null color)
-          (message "Warning: no color specified for <x-bg-color>"))
-         ((facep face))
-         ((and (display-color-p) (facemenu-get-face face))
-          (set-face-background face color))
-         ((make-face face)
-          (message "Warning: color `%s' can't be displayed" color)))
-    (list from to 'face face)))
-
-
+  (if color
+      (list from to 'face (list ':background color))
+    (message "Warning: no color specified for <x-bg-color>")
+    nil))
 \f
 ;;; Handling the `display' property.