From: yoichi Date: Thu, 3 Jun 2004 18:06:27 +0000 (+0000) Subject: 2004-06-04 Tsutomu OKADA X-Git-Tag: wl-2_11_30~23 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93d8ae6a61bf8ce7d15b6fc1236d5c92880a2c6c;p=elisp%2Fwanderlust.git 2004-06-04 Tsutomu OKADA * 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. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 996a72a..15877bb 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,13 @@ +2004-06-04 Tsutomu OKADA + + * 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 * wl-e21.el (wl-highlight-plugged-current-line): Change for diff --git a/wl/wl-draft.el b/wl/wl-draft.el index a736f84..9b245e0 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -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")) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 3215295..b88e529 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -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."