From: kaoru Date: Tue, 2 Jan 2001 14:13:03 +0000 (+0000) Subject: * wl-draft.el (wl-draft-reply-list-symbol): New function. X-Git-Tag: wl-2_4_1pre~12 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b43840a6d3697f1541084cb3195eec1bb256f77;p=elisp%2Fwanderlust.git * wl-draft.el (wl-draft-reply-list-symbol): New function. (wl-draft-reply): Use it. Fixed "No match field" error message. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 3d005bd..d08f1c0 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,8 @@ 2001-01-02 TAKAHASHI Kaoru + * wl-draft.el (wl-draft-reply-list-symbol): New function. + (wl-draft-reply): Use it. Fixed "No match field" error message. + * wl-draft.el (wl-draft-insert-from-field): Use (length "From: ") instead of magic-number 6. Use `not' instead of `null' for symbol `nil' check (not empty list). diff --git a/wl/wl-draft.el b/wl/wl-draft.el index d6126ac..452b1b8 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -256,6 +256,17 @@ (substring subject (match-end 0)) subject)) +(defun wl-draft-reply-list-symbol (from no-arg) + "Check FROM and NO-ARG, return symbol `wl-draft-reply-*-argument-list'. +Return symbol, not list. Use symbol-name" + (if (wl-address-user-mail-address-p from) + (if no-arg + 'wl-draft-reply-myself-without-argument-list + 'wl-draft-reply-myself-with-argument-list) + (if no-arg + 'wl-draft-reply-without-argument-list + 'wl-draft-reply-with-argument-list))) + (defun wl-draft-reply (buf no-arg summary-buf) "" ;;;(save-excursion @@ -273,12 +284,9 @@ (setq eword-lexical-analyzer mime-header-lexical-analyzer) (set-buffer buf) (setq from (wl-address-header-extract-address (std11-field-body "From"))) - (setq r-list - (if (wl-address-user-mail-address-p from) - (if no-arg wl-draft-reply-myself-without-argument-list - wl-draft-reply-myself-with-argument-list) - (if no-arg wl-draft-reply-without-argument-list - wl-draft-reply-with-argument-list))) + ;; symbol-name use in error message + (setq r-list-name (symbol-name (wl-draft-reply-list-symbol from no-arg))) + (setq r-list (symbol-value (wl-draft-reply-list-symbol from no-arg))) (catch 'done (while r-list (when (let ((condition (car (car r-list)))) @@ -314,7 +322,7 @@ ","))) (throw 'done nil)) (setq r-list (cdr r-list))) - (error "No match field: check your `wl-draft-reply-without-argument-list'")) + (error "No match field: check your `%s'" r-list-name)) (setq subject (std11-field-body "Subject")) (setq to (wl-parse-addresses to) cc (wl-parse-addresses cc))