# HG changeset patch # User Richard M. Stallman # Date 859002103 0 # Node ID 2d0b382efa268566970d265ee24af94cd84c7e30 # Parent 30a9faea2a54c03d5456ad973f3dd2ea604af28f (enriched-decode-foreground, enriched-decode-background): Make COLOR arg optional. Fix error messages. diff -r 30a9faea2a54 -r 2d0b382efa26 lisp/enriched.el --- a/lisp/enriched.el Sat Mar 22 03:40:55 1997 +0000 +++ b/lisp/enriched.el Sat Mar 22 03:41:43 1997 +0000 @@ -424,24 +424,28 @@ (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 ")) + ((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 ")) + ((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