summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-03-22 03:41:43 +0000
committerRichard M. Stallman <rms@gnu.org>1997-03-22 03:41:43 +0000
commit5127b93135fe62fa6fd0ef1361202a16c4709b69 (patch)
treeb7b3f2ac8d57720c31594fc8b3554a2e02f9f6ef
parent62d4c1a1e8609058d70ed5e2bd7c4e2b00cf961f (diff)
downloademacs-5127b93135fe62fa6fd0ef1361202a16c4709b69.tar.gz
(enriched-decode-foreground, enriched-decode-background):
Make COLOR arg optional. Fix error messages.
-rw-r--r--lisp/enriched.el20
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/enriched.el b/lisp/enriched.el
index 362a537d846..8cc47361bab 100644
--- a/lisp/enriched.el
+++ b/lisp/enriched.el
@@ -424,24 +424,28 @@ Return value is \(begin end name positive-p), or nil if none was found."
(if (looking-at "^\n")
(delete-char 1)))
-(defun enriched-decode-foreground (from to color)
+(defun enriched-decode-foreground (from to &optional color)
(let ((face (intern (concat "fg:" color))))
- (cond ((internal-find-face face))
+ (cond ((null color)
+ (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))
+ (message "Warning: color `%s' is not defined" color))
((make-face face)
- (message "Warning: Color \"%s\" can't be displayed." color)))
+ (message "Warning: color `%s' can't be displayed" color)))
(list from to 'face face)))
-(defun enriched-decode-background (from to color)
+(defun enriched-decode-background (from to &optional color)
(let ((face (intern (concat "bg:" color))))
- (cond ((internal-find-face face))
+ (cond ((null color)
+ (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))
+ (message "Warning: color `%s' is not defined" color))
((make-face face)
- (message "Warning: Color \"%s\" can't be displayed." color)))
+ (message "Warning: color `%s' can't be displayed" color)))
(list from to 'face face)))
;;; enriched.el ends here