From 6ef824d1e325f58aa9b451fabdebecf55994aab5 Mon Sep 17 00:00:00 2001 From: keiichi Date: Tue, 15 Jun 1999 05:28:34 +0000 Subject: [PATCH] (message-mime-charset-recover-by-ask): Don't use `error'. (message-mime-charset-recover-ask-y-or-n): Ditto. --- lisp/mess-lcl.el | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/lisp/mess-lcl.el b/lisp/mess-lcl.el index e99e6aa..b0d1ffb 100644 --- a/lisp/mess-lcl.el +++ b/lisp/mess-lcl.el @@ -164,16 +164,13 @@ then set this function to `message-encode-function'." (charsets-mime-charset-alist charsets-mime-charset-alist) message-locale-args) (message-locale-setup-mime-charset locale-list) - (if (catch 'mime-edit-error - (save-excursion - (mime-edit-pgp-enclose-buffer) - (mime-edit-translate-body) - )) - (error "Translation error!") - )) + (when (catch 'mime-edit-error + (save-excursion + (mime-edit-pgp-enclose-buffer) + (mime-edit-translate-body))) + (error "Translation error!"))) (end-of-invisible) - (run-hooks 'mime-edit-exit-hook) - ))) + (run-hooks 'mime-edit-exit-hook)))) ;;; ;;; Detect locale. @@ -290,13 +287,12 @@ then set this function to `message-encode-function'." default-mime-charset-for-write))) charsets)) (intern (downcase charset)) - (error "Canceled."))))))) + (throw 'message-sending-cancel t))))))) (defun message-mime-charset-recover-ask-y-or-n (default-charset charsets) - (or (y-or-n-p (format "MIME charset %s is selected. OK? " + (and (y-or-n-p (format "MIME charset %s is selected. OK? " default-charset)) - (error "Canceled.")) - default-charset) + default-charset)) (defun message-mime-charset-recover-ask-charset (default-charset charsets) (let ((alist (mapcar -- 1.7.10.4