From: Richard M. Stallman Date: Sat, 22 Mar 1997 03:41:43 +0000 (+0000) Subject: (enriched-decode-foreground, enriched-decode-background): X-Git-Tag: emacs-20.1~2738 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ddb552454fda645e6ebabcc590282538d087c93;p=emacs.git (enriched-decode-foreground, enriched-decode-background): Make COLOR arg optional. Fix error messages. --- 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 ")) + ((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