2004-06-04 Tsutomu OKADA <tsutomu.okada@furuno.co.jp>
authoryoichi <yoichi>
Thu, 3 Jun 2004 18:06:27 +0000 (18:06 +0000)
committeryoichi <yoichi>
Thu, 3 Jun 2004 18:06:27 +0000 (18:06 +0000)
* wl-vars.el (wl-subject-re-prefix-regexp): Renamed from
`wl-subject-prefix-regexp'.
(wl-subject-forward-prefix-regexp): New variable.
* wl-draft.el (wl-draft-strip-subject-regexp): Renamed from
`wl-draft-strip-subject-re' and take regexp as argument.
(wl-draft-forward): Use it.
(wl-draft-reply): Ditto.

wl/ChangeLog
wl/wl-draft.el
wl/wl-vars.el

index 996a72a..15877bb 100644 (file)
@@ -1,3 +1,13 @@
+2004-06-04  Tsutomu OKADA  <tsutomu.okada@furuno.co.jp>
+
+       * wl-vars.el (wl-subject-re-prefix-regexp): Renamed from
+       `wl-subject-prefix-regexp'.
+       (wl-subject-forward-prefix-regexp): New variable.
+       * wl-draft.el (wl-draft-strip-subject-regexp): Renamed from
+       `wl-draft-strip-subject-re' and take regexp as argument.
+       (wl-draft-forward): Use it.
+       (wl-draft-reply): Ditto.
+
 2004-05-30  ARISAWA Akihiro  <ari@mbf.sphere.ne.jp>
 
        * wl-e21.el (wl-highlight-plugged-current-line): Change for
index a736f84..9b245e0 100644 (file)
@@ -258,16 +258,19 @@ e.g.
         (select-window (get-buffer-window summary-buf)))
     (wl-draft (list (cons 'To "")
                    (cons 'Subject
-                         (concat wl-forward-subject-prefix original-subject))
+                         (concat wl-forward-subject-prefix
+                                 (wl-draft-strip-subject-regexp
+                                  original-subject
+                                  wl-subject-forward-prefix-regexp)))
                    (cons 'References references))
              nil nil nil nil parent-folder))
   (goto-char (point-max))
   (wl-draft-insert-message)
   (mail-position-on-field "To"))
 
-(defun wl-draft-strip-subject-re (subject)
-  "Remove \"Re:\" from SUBJECT string. Shamelessly copied from Gnus."
-  (if (string-match wl-subject-prefix-regexp subject)
+(defun wl-draft-strip-subject-regexp (subject regexp)
+  "Remove REGEXP from SUBJECT string."
+  (if (string-match regexp subject)
       (substring subject (match-end 0))
     subject))
 
@@ -363,8 +366,9 @@ Reply to author if WITH-ARG is non-nil."
             cc)))
     (and wl-reply-subject-prefix
         (setq subject (concat wl-reply-subject-prefix
-                              (wl-draft-strip-subject-re
-                               (or subject "")))))
+                              (wl-draft-strip-subject-regexp
+                               (or subject "")
+                               wl-subject-re-prefix-regexp))))
     (setq in-reply-to (std11-field-body "Message-Id"))
     (setq references (nconc
                      (std11-field-bodies '("References" "In-Reply-To"))
index 3215295..b88e529 100644 (file)
@@ -1740,12 +1740,18 @@ This variable overwhelm `wl-message-ignored-field-list' settings."
   :group 'wl-pref
   :group 'wl-draft)
 
-(defcustom wl-subject-prefix-regexp "^[ \t]*\\([Rr][Ee][:>][ \t]*\\)*[ \t]*"
+(defcustom wl-subject-re-prefix-regexp "^[ \t]*\\([Rr][Ee][:>][ \t]*\\)*[ \t]*"
   "*Regexp matching \"Re: \" in the subject line."
   :type 'regexp
   :group 'wl-draft
   :group 'wl-pref)
 
+(defcustom wl-subject-forward-prefix-regexp "^[ \t]*\\(\\([Ff][Oo][Rr][Ww][Aa][Rr][Dd]\\|[Ff][Ww][Dd]\\|[Ff][Ww]\\)[:>][ \t]*\\)*[ \t]*"
+  "*Regexp matching \"Forward: \", \"Fwd: \", or \"Fw: \" in the subject line."
+  :type 'regexp
+  :group 'wl-draft
+  :group 'wl-pref)
+
 (defcustom wl-folder-many-unsync-threshold 70
   "*Folders which contains messages more than this number are highlighted
 with wl-highlight-folder-many-face."