* wl-draft.el (wl-draft-reply-list-symbol): New function.
authorkaoru <kaoru>
Tue, 2 Jan 2001 14:13:03 +0000 (14:13 +0000)
committerkaoru <kaoru>
Tue, 2 Jan 2001 14:13:03 +0000 (14:13 +0000)
(wl-draft-reply): Use it.  Fixed "No match field" error message.

wl/ChangeLog
wl/wl-draft.el

index 3d005bd..d08f1c0 100644 (file)
@@ -1,5 +1,8 @@
 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).
index d6126ac..452b1b8 100644 (file)
       (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))