From: teranisi Date: Mon, 30 Oct 2000 03:25:46 +0000 (+0000) Subject: 2000-10-07 Yasushi Shoji X-Git-Tag: wl-2_4-root~53 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7e1121387a1aacf2c021d3f31424ed5808cb4491;p=elisp%2Fwanderlust.git 2000-10-07 Yasushi Shoji * wl-vars.el (wl-subject-prefix-regexp): New variable. * wl-draft.el (wl-draft-strip-subject-re): New function. * wl-draft.el (wl-draft-reply): Use it. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 6be9471..83bd518 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,11 @@ +2000-10-07 Yasushi Shoji + + * wl-vars.el (wl-subject-prefix-regexp): New variable. + + * wl-draft.el (wl-draft-strip-subject-re): New function. + + * wl-draft.el (wl-draft-reply): Use it. + 2000-10-30 Yuuichi Teranishi * wl-message.el (wl-mmelmo-message-redisplay): Use diff --git a/wl/wl-draft.el b/wl/wl-draft.el index f8db10f..1810203 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -275,6 +275,12 @@ the `wl-smtp-features' variable." (wl-draft-insert-message) (mail-position-on-field "To")) +(defun wl-draft-strip-subject-re (subject) + "Remove \"Re:\" from subject lines. Shamelessly copied from Gnus" + (if (string-match wl-subject-prefix-regexp subject) + (substring subject (match-end 0)) + subject)) + (defun wl-draft-reply (buf no-arg summary-buf) "" ;;;(save-excursion @@ -365,13 +371,8 @@ the `wl-smtp-features' variable." (nth 1 addr)))) cc))) (and subject wl-reply-subject-prefix - (let ((case-fold-search t)) - (not - (equal - (string-match (regexp-quote wl-reply-subject-prefix) - subject) - 0))) - (setq subject (concat wl-reply-subject-prefix subject))) + (setq subject (concat wl-reply-subject-prefix + (wl-draft-strip-subject-re subject)))) (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 e87d8a2..ce892a5 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1147,6 +1147,12 @@ Each elements are regexp of field-name." :group 'wl-pref :group 'wl-draft) +(defcustom wl-subject-prefix-regexp "^[ \t]*\\([Rr][Ee][:>][ \t]*\\)*[ \t]*" + "*Regexp matching \"Re: \" 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."