Mercurial > emacs
comparison lisp/mail/rmail.el @ 10640:937cc7f2a790
(rmail-reply-regexp): New var.
(rmail-reply): Delete text matching rmail-reply-regexp.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 03 Feb 1995 04:21:05 +0000 |
parents | 027b0964b8a7 |
children | cd968ab6a0eb |
comparison
equal
deleted
inserted
replaced
10639:dc32b19de050 | 10640:937cc7f2a790 |
---|---|
1 ;;; rmail.el --- main code of "RMAIL" mail reader for Emacs. | 1 ;;; rmail.el --- main code of "RMAIL" mail reader for Emacs. |
2 | 2 |
3 ;; Copyright (C) 1985,86,87,88,93,94 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1985,86,87,88,93,94,95 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Maintainer: FSF | 5 ;; Maintainer: FSF |
6 ;; Keywords: mail | 6 ;; Keywords: mail |
7 | 7 |
8 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
119 "If non nil, a filter function for new messages in RMAIL. | 119 "If non nil, a filter function for new messages in RMAIL. |
120 Called with region narrowed to the message, including headers.") | 120 Called with region narrowed to the message, including headers.") |
121 | 121 |
122 (defvar rmail-reply-prefix "Re: " | 122 (defvar rmail-reply-prefix "Re: " |
123 "String to prepend to Subject line when replying to a message.") | 123 "String to prepend to Subject line when replying to a message.") |
124 | |
125 ;; Some mailers use "Re(2):" or "Re^2:" or "Re: Re:". | |
126 ;; This pattern should catch all the common variants. | |
127 (defvar rmail-reply-regexp "\\`\\(Re\\(([0-9]+)\\|\\^[0-9]+\\)?: *\\)*" | |
128 "Regexp to delete from Subject line before inserting rmail-reply-prefix.") | |
124 | 129 |
125 (defvar rmail-display-summary nil | 130 (defvar rmail-display-summary nil |
126 "If non nil, the summary buffer is always displayed.") | 131 "If non nil, the summary buffer is always displayed.") |
127 | 132 |
128 (defvar rmail-mode-map nil) | 133 (defvar rmail-mode-map nil) |
1973 (t "")) | 1978 (t "")) |
1974 message-id (cond (resent-reply-to | 1979 message-id (cond (resent-reply-to |
1975 (mail-fetch-field "resent-message-id" t)) | 1980 (mail-fetch-field "resent-message-id" t)) |
1976 ((mail-fetch-field "message-id")))))) | 1981 ((mail-fetch-field "message-id")))))) |
1977 (and (stringp subject) | 1982 (and (stringp subject) |
1978 (or (string-match (concat "\\`" (regexp-quote rmail-reply-prefix)) | 1983 (setq subject |
1979 subject) | 1984 (concat rmail-reply-prefix |
1980 (setq subject (concat rmail-reply-prefix subject)))) | 1985 (if (string-match rmail-reply-regexp subject) |
1986 (substring subject (match-end 0)) | |
1987 subject)))) | |
1981 (rmail-start-mail nil | 1988 (rmail-start-mail nil |
1982 (mail-strip-quoted-names reply-to) | 1989 (mail-strip-quoted-names reply-to) |
1983 subject | 1990 subject |
1984 (rmail-make-in-reply-to-field from date message-id) | 1991 (rmail-make-in-reply-to-field from date message-id) |
1985 (if just-sender | 1992 (if just-sender |