2001-01-02 TAKAHASHI Kaoru <kaoru@kaisei.org>
+ * 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).
(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
(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))))
",")))
(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))