summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/mail/mbox-trunk-annotations/rmail.el.annotation4286
-rw-r--r--lisp/mail/mbox-trunk-annotations/rmailedit.el.annotation164
-rw-r--r--lisp/mail/mbox-trunk-annotations/rmailkwd.el.annotation290
-rw-r--r--lisp/mail/mbox-trunk-annotations/rmailmsc.el.annotation67
-rw-r--r--lisp/mail/mbox-trunk-annotations/rmailout.el.annotation420
-rw-r--r--lisp/mail/mbox-trunk-annotations/rmailsort.el.annotation250
-rw-r--r--lisp/mail/mbox-trunk-annotations/rmailsum.el.annotation1706
7 files changed, 7183 insertions, 0 deletions
diff --git a/lisp/mail/mbox-trunk-annotations/rmail.el.annotation b/lisp/mail/mbox-trunk-annotations/rmail.el.annotation
new file mode 100644
index 00000000000..ca937834658
--- /dev/null
+++ b/lisp/mail/mbox-trunk-annotations/rmail.el.annotation
@@ -0,0 +1,4286 @@
+1.348 (pj 15-Jul-01): ;;; rmail.el --- main code of "RMAIL" mail reader for Emacs
+1.12 (eric 30-May-92):
+1.407 (ttn 06-Aug-05): ;; Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998,
+1.444 (miles 08-Jan-08): ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+1.440 (gm 12-Oct-07): ;; Free Software Foundation, Inc.
+1.18 (eric 22-Jul-92):
+1.13 (eric 16-Jul-92): ;; Maintainer: FSF
+1.15 (eric 17-Jul-92): ;; Keywords: mail
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; This file is part of GNU Emacs.
+1.1 (roland 13-May-91):
+1.454 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify
+1.1 (roland 13-May-91): ;; it under the terms of the GNU General Public License as published by
+1.454 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or
+1.454 (gm 06-May-08): ;; (at your option) any later version.
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; GNU Emacs is distributed in the hope that it will be useful,
+1.1 (roland 13-May-91): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+1.1 (roland 13-May-91): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+1.1 (roland 13-May-91): ;; GNU General Public License for more details.
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; You should have received a copy of the GNU General Public License
+1.454 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+1.1 (roland 13-May-91):
+1.348 (pj 15-Jul-01): ;;; Commentary:
+1.348 (pj 15-Jul-01):
+1.13 (eric 16-Jul-92): ;;; Code:
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; Souped up by shane@mit-ajax based on ideas of rlk@athena.mit.edu
+1.1 (roland 13-May-91): ;; New features include attribute and keyword support, message
+1.1 (roland 13-May-91): ;; selection by dispatch table, summary by attributes and keywords,
+1.1 (roland 13-May-91): ;; expunging by dispatch table, sticky options for file commands.
+1.1 (roland 13-May-91):
+1.39 (rms 09-Mar-93): ;; Extended by Bob Weiner of Motorola
+1.39 (rms 09-Mar-93): ;; New features include: rmail and rmail-summary buffers remain
+1.39 (rms 09-Mar-93): ;; synchronized and key bindings basically operate the same way in both
+1.39 (rms 09-Mar-93): ;; buffers, summary by topic or by regular expression, rmail-reply-prefix
+1.39 (rms 09-Mar-93): ;; variable, and a bury rmail buffer (wipe) command.
+1.39 (rms 09-Mar-93): ;;
+1.39 (rms 09-Mar-93):
+1.1 (roland 13-May-91): (require 'mail-utils)
+1.349 (eliz 16-Sep-01): (eval-when-compile (require 'mule-util)) ; for detect-coding-with-priority
+1.39 (rms 09-Mar-93):
+1.414 (lektu 29-Aug-05): (defvar deleted-head)
+1.414 (lektu 29-Aug-05): (defvar font-lock-fontified)
+1.414 (lektu 29-Aug-05): (defvar mail-abbrev-syntax-table)
+1.414 (lektu 29-Aug-05): (defvar mail-abbrevs)
+1.414 (lektu 29-Aug-05): (defvar messages-head)
+1.414 (lektu 29-Aug-05): (defvar rmail-use-spam-filter)
+1.414 (lektu 29-Aug-05): (defvar rsf-beep)
+1.414 (lektu 29-Aug-05): (defvar rsf-sleep-after-message)
+1.414 (lektu 29-Aug-05): (defvar total-messages)
+1.423 (eliz 25-Mar-06): (defvar tool-bar-map)
+1.414 (lektu 29-Aug-05):
+1.39 (rms 09-Mar-93): ; These variables now declared in paths.el.
+1.1 (roland 13-May-91): ;(defvar rmail-spool-directory "/usr/spool/mail/"
+1.1 (roland 13-May-91): ; "This is the name of the directory used by the system mailer for\n\
+1.200 (rms 12-Oct-96): ;delivering new mail. Its name should end with a slash.")
+1.1 (roland 13-May-91): ;(defvar rmail-file-name
+1.1 (roland 13-May-91): ; (expand-file-name "~/RMAIL")
+1.1 (roland 13-May-91): ; "")
+1.1 (roland 13-May-91):
+1.219 (rms 03-May-97): (defgroup rmail nil
+1.219 (rms 03-May-97): "Mail reader for Emacs."
+1.219 (rms 03-May-97): :group 'mail)
+1.219 (rms 03-May-97):
+1.219 (rms 03-May-97): (defgroup rmail-retrieve nil
+1.219 (rms 03-May-97): "Rmail retrieval options."
+1.219 (rms 03-May-97): :prefix "rmail-"
+1.219 (rms 03-May-97): :group 'rmail)
+1.219 (rms 03-May-97):
+1.219 (rms 03-May-97): (defgroup rmail-files nil
+1.219 (rms 03-May-97): "Rmail files."
+1.219 (rms 03-May-97): :prefix "rmail-"
+1.219 (rms 03-May-97): :group 'rmail)
+1.219 (rms 03-May-97):
+1.219 (rms 03-May-97): (defgroup rmail-headers nil
+1.219 (rms 03-May-97): "Rmail header options."
+1.219 (rms 03-May-97): :prefix "rmail-"
+1.219 (rms 03-May-97): :group 'rmail)
+1.219 (rms 03-May-97):
+1.219 (rms 03-May-97): (defgroup rmail-reply nil
+1.219 (rms 03-May-97): "Rmail reply options."
+1.219 (rms 03-May-97): :prefix "rmail-"
+1.219 (rms 03-May-97): :group 'rmail)
+1.219 (rms 03-May-97):
+1.219 (rms 03-May-97): (defgroup rmail-summary nil
+1.219 (rms 03-May-97): "Rmail summary options."
+1.219 (rms 03-May-97): :prefix "rmail-"
+1.219 (rms 03-May-97): :prefix "rmail-summary-"
+1.219 (rms 03-May-97): :group 'rmail)
+1.219 (rms 03-May-97):
+1.219 (rms 03-May-97): (defgroup rmail-output nil
+1.219 (rms 03-May-97): "Output message to a file."
+1.219 (rms 03-May-97): :prefix "rmail-output-"
+1.219 (rms 03-May-97): :prefix "rmail-"
+1.219 (rms 03-May-97): :group 'rmail)
+1.219 (rms 03-May-97):
+1.337 (gerd 07-May-01): (defgroup rmail-edit nil
+1.337 (gerd 07-May-01): "Rmail editing."
+1.337 (gerd 07-May-01): :prefix "rmail-edit-"
+1.337 (gerd 07-May-01): :group 'rmail)
+1.337 (gerd 07-May-01):
+1.395 (eliz 15-Jan-05): (defgroup rmail-obsolete nil
+1.395 (eliz 15-Jan-05): "Rmail obsolete customization variables."
+1.395 (eliz 15-Jan-05): :group 'rmail)
+1.219 (rms 03-May-97):
+1.259 (kwzh 08-Apr-98): (defcustom rmail-movemail-program nil
+1.397 (rms 18-Mar-05): "If non-nil, the file name of the `movemail' program."
+1.259 (kwzh 08-Apr-98): :group 'rmail-retrieve
+1.286 (schwab 18-Sep-98): :type '(choice (const nil) string))
+1.110 (rms 13-Jul-94):
+1.219 (rms 03-May-97): (defcustom rmail-pop-password nil
+1.397 (rms 18-Mar-05): "*Password to use when reading mail from POP server.
+1.397 (rms 18-Mar-05): Please use `rmail-remote-password' instead."
+1.219 (rms 03-May-97): :type '(choice (string :tag "Password")
+1.219 (rms 03-May-97): (const :tag "Not Required" nil))
+1.395 (eliz 15-Jan-05): :group 'rmail-obsolete)
+1.219 (rms 03-May-97):
+1.219 (rms 03-May-97): (defcustom rmail-pop-password-required nil
+1.407 (ttn 06-Aug-05): "*Non-nil if a password is required when reading mail from a POP server.
+1.397 (rms 18-Mar-05): Please use rmail-remote-password-required instead."
+1.219 (rms 03-May-97): :type 'boolean
+1.395 (eliz 15-Jan-05): :group 'rmail-obsolete)
+1.395 (eliz 15-Jan-05):
+1.395 (eliz 15-Jan-05): (defcustom rmail-remote-password nil
+1.397 (rms 18-Mar-05): "*Password to use when reading mail from a remote server.
+1.397 (rms 18-Mar-05): This setting is ignored for mailboxes whose URL already contains a password."
+1.395 (eliz 15-Jan-05): :type '(choice (string :tag "Password")
+1.395 (eliz 15-Jan-05): (const :tag "Not Required" nil))
+1.395 (eliz 15-Jan-05): :set-after '(rmail-pop-password)
+1.395 (eliz 15-Jan-05): :set #'(lambda (symbol value)
+1.396 (kfstorm 09-Feb-05): (set-default symbol
+1.395 (eliz 15-Jan-05): (if (and (not value)
+1.395 (eliz 15-Jan-05): (boundp 'rmail-pop-password)
+1.395 (eliz 15-Jan-05): rmail-pop-password)
+1.395 (eliz 15-Jan-05): rmail-pop-password
+1.395 (eliz 15-Jan-05): value))
+1.395 (eliz 15-Jan-05): (setq rmail-pop-password nil))
+1.395 (eliz 15-Jan-05): :group 'rmail-retrieve
+1.396 (kfstorm 09-Feb-05): :version "22.1")
+1.395 (eliz 15-Jan-05):
+1.395 (eliz 15-Jan-05): (defcustom rmail-remote-password-required nil
+1.395 (eliz 15-Jan-05): "*Non-nil if a password is required when reading mail from a remote server."
+1.395 (eliz 15-Jan-05): :type 'boolean
+1.395 (eliz 15-Jan-05): :set-after '(rmail-pop-password-required)
+1.395 (eliz 15-Jan-05): :set #'(lambda (symbol value)
+1.396 (kfstorm 09-Feb-05): (set-default symbol
+1.395 (eliz 15-Jan-05): (if (and (not value)
+1.395 (eliz 15-Jan-05): (boundp 'rmail-pop-password-required)
+1.395 (eliz 15-Jan-05): rmail-pop-password-required)
+1.395 (eliz 15-Jan-05): rmail-pop-password-required
+1.395 (eliz 15-Jan-05): value))
+1.395 (eliz 15-Jan-05): (setq rmail-pop-password-required nil))
+1.395 (eliz 15-Jan-05): :group 'rmail-retrieve
+1.396 (kfstorm 09-Feb-05): :version "22.1")
+1.183 (rms 26-Apr-96):
+1.256 (kwzh 06-Apr-98): (defcustom rmail-movemail-flags nil
+1.257 (kwzh 06-Apr-98): "*List of flags to pass to movemail.
+1.257 (kwzh 06-Apr-98): Most commonly used to specify `-g' to enable GSS-API authentication
+1.257 (kwzh 06-Apr-98): or `-k' to enable Kerberos authentication."
+1.260 (schwab 14-Apr-98): :type '(repeat string)
+1.262 (done 20-Apr-98): :group 'rmail-retrieve
+1.262 (done 20-Apr-98): :version "20.3")
+1.256 (kwzh 06-Apr-98):
+1.395 (eliz 15-Jan-05): (defvar rmail-remote-password-error "invalid usercode or password\\|
+1.395 (eliz 15-Jan-05): unknown user name or bad password\\|Authentication failed\\|MU_ERR_AUTH_FAILURE"
+1.395 (eliz 15-Jan-05): "Regular expression matching incorrect-password POP or IMAP server error
+1.395 (eliz 15-Jan-05): messages.
+1.230 (rms 25-Jul-97): If you get an incorrect-password error that this expression does not match,
+1.230 (rms 25-Jul-97): please report it with \\[report-emacs-bug].")
+1.230 (rms 25-Jul-97):
+1.395 (eliz 15-Jan-05): (defvar rmail-encoded-remote-password nil)
+1.284 (rms 05-Aug-98):
+1.219 (rms 03-May-97): (defcustom rmail-preserve-inbox nil
+1.397 (rms 18-Mar-05): "*Non-nil means leave incoming mail in the user's inbox--don't delete it."
+1.219 (rms 03-May-97): :type 'boolean
+1.219 (rms 03-May-97): :group 'rmail-retrieve)
+1.205 (rms 21-Jan-97):
+1.395 (eliz 15-Jan-05): (defcustom rmail-movemail-search-path nil
+1.395 (eliz 15-Jan-05): "*List of directories to search for movemail (in addition to `exec-path')."
+1.395 (eliz 15-Jan-05): :group 'rmail-retrieve
+1.395 (eliz 15-Jan-05): :type '(repeat (directory)))
+1.395 (eliz 15-Jan-05):
+1.442 (dann 25-Nov-07): (declare-function mail-position-on-field "sendmail" (field &optional soft))
+1.442 (dann 25-Nov-07): (declare-function mail-text-start "sendmail" ())
+1.442 (dann 25-Nov-07): (declare-function rmail-update-summary "rmailsum" (&rest ignore))
+1.442 (dann 25-Nov-07):
+1.395 (eliz 15-Jan-05): (defun rmail-probe (prog)
+1.397 (rms 18-Mar-05): "Determine what flavor of movemail PROG is.
+1.397 (rms 18-Mar-05): We do this by executing it with `--version' and analyzing its output."
+1.395 (eliz 15-Jan-05): (with-temp-buffer
+1.395 (eliz 15-Jan-05): (let ((tbuf (current-buffer)))
+1.395 (eliz 15-Jan-05): (buffer-disable-undo tbuf)
+1.395 (eliz 15-Jan-05): (call-process prog nil tbuf nil "--version")
+1.395 (eliz 15-Jan-05): (if (not (buffer-modified-p tbuf))
+1.395 (eliz 15-Jan-05): ;; Should not happen...
+1.395 (eliz 15-Jan-05): nil
+1.395 (eliz 15-Jan-05): (goto-char (point-min))
+1.395 (eliz 15-Jan-05): (cond
+1.395 (eliz 15-Jan-05): ((looking-at ".*movemail: invalid option")
+1.395 (eliz 15-Jan-05): 'emacs) ;; Possibly...
+1.395 (eliz 15-Jan-05): ((looking-at "movemail (GNU Mailutils .*)")
+1.395 (eliz 15-Jan-05): 'mailutils)
+1.395 (eliz 15-Jan-05): (t
+1.395 (eliz 15-Jan-05): ;; FIXME:
+1.395 (eliz 15-Jan-05): 'emacs))))))
+1.395 (eliz 15-Jan-05):
+1.395 (eliz 15-Jan-05): (defun rmail-autodetect ()
+1.438 (schwab 20-Aug-07): "Determine the file name of the `movemail' program and return its flavor.
+1.397 (rms 18-Mar-05): If `rmail-movemail-program' is non-nil, use it.
+1.397 (rms 18-Mar-05): Otherwise, look for `movemail' in the directories in
+1.397 (rms 18-Mar-05): `rmail-movemail-search-path', those in `exec-path', and `exec-directory'."
+1.395 (eliz 15-Jan-05): (if rmail-movemail-program
+1.395 (eliz 15-Jan-05): (rmail-probe rmail-movemail-program)
+1.395 (eliz 15-Jan-05): (catch 'scan
+1.395 (eliz 15-Jan-05): (dolist (dir (append rmail-movemail-search-path exec-path
+1.395 (eliz 15-Jan-05): (list exec-directory)))
+1.395 (eliz 15-Jan-05): (when (and dir (file-accessible-directory-p dir))
+1.452 (gm 20-Feb-08): ;; Previously, this didn't have to work on Windows, because
+1.452 (gm 20-Feb-08): ;; rmail-insert-inbox-text before r1.439 fell back to using
+1.452 (gm 20-Feb-08): ;; (expand-file-name "movemail" exec-directory) and just
+1.452 (gm 20-Feb-08): ;; assuming it would work.
+1.452 (gm 20-Feb-08): ;; http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-02/msg00087.html
+1.452 (gm 20-Feb-08): (let ((progname (expand-file-name
+1.452 (gm 20-Feb-08): (concat "movemail"
+1.452 (gm 20-Feb-08): (if (memq system-type '(ms-dos windows-nt))
+1.452 (gm 20-Feb-08): ".exe")) dir)))
+1.395 (eliz 15-Jan-05): (when (and (not (file-directory-p progname))
+1.395 (eliz 15-Jan-05): (file-executable-p progname))
+1.395 (eliz 15-Jan-05): (let ((x (rmail-probe progname)))
+1.395 (eliz 15-Jan-05): (when x
+1.395 (eliz 15-Jan-05): (setq rmail-movemail-program progname)
+1.395 (eliz 15-Jan-05): (throw 'scan x))))))))))
+1.395 (eliz 15-Jan-05):
+1.395 (eliz 15-Jan-05): (defvar rmail-movemail-variant-in-use nil
+1.395 (eliz 15-Jan-05): "The movemail variant currently in use. Known variants are:
+1.395 (eliz 15-Jan-05):
+1.395 (eliz 15-Jan-05): `emacs' Means any implementation, compatible with the native Emacs one.
+1.395 (eliz 15-Jan-05): This is the default;
+1.395 (eliz 15-Jan-05): `mailutils' Means GNU mailutils implementation, capable of handling full
+1.435 (ttn 09-Jun-07): mail URLs as the source mailbox.")
+1.395 (eliz 15-Jan-05):
+1.395 (eliz 15-Jan-05): ;;;###autoload
+1.395 (eliz 15-Jan-05): (defun rmail-movemail-variant-p (&rest variants)
+1.395 (eliz 15-Jan-05): "Return t if the current movemail variant is any of VARIANTS.
+1.395 (eliz 15-Jan-05): Currently known variants are 'emacs and 'mailutils."
+1.395 (eliz 15-Jan-05): (when (not rmail-movemail-variant-in-use)
+1.395 (eliz 15-Jan-05): ;; Autodetect
+1.395 (eliz 15-Jan-05): (setq rmail-movemail-variant-in-use (rmail-autodetect)))
+1.395 (eliz 15-Jan-05): (not (null (member rmail-movemail-variant-in-use variants))))
+1.395 (eliz 15-Jan-05):
+1.439 (gm 22-Aug-07): ;; Call for effect, to set rmail-movemail-program (if not set by the
+1.439 (gm 22-Aug-07): ;; user), and rmail-movemail-variant-in-use. Used by various functions.
+1.439 (gm 22-Aug-07): ;; I'm not sure if M-x rmail is the only entry point to this package.
+1.439 (gm 22-Aug-07): ;; If so, this can be moved there.
+1.439 (gm 22-Aug-07): (rmail-movemail-variant-p)
+1.439 (gm 22-Aug-07):
+1.1 (roland 13-May-91): ;;;###autoload
+1.219 (rms 03-May-97): (defcustom rmail-dont-reply-to-names nil "\
+1.356 (pmr-sav 19-Mar-02): *A regexp specifying addresses to prune from a reply message.
+1.356 (pmr-sav 19-Mar-02): A value of nil means exclude your own email address as an address
+1.283 (rms 28-Jul-98): plus whatever is specified by `rmail-default-dont-reply-to-names'."
+1.219 (rms 03-May-97): :type '(choice regexp (const :tag "Your Name" nil))
+1.219 (rms 03-May-97): :group 'rmail-reply)
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;;;###autoload
+1.384 (uid65627 16-Feb-04): (defvar rmail-default-dont-reply-to-names "\\`info-" "\
+1.384 (uid65627 16-Feb-04): A regular expression specifying part of the default value of the
+1.384 (uid65627 16-Feb-04): variable `rmail-dont-reply-to-names', for when the user does not set
+1.1 (roland 13-May-91): `rmail-dont-reply-to-names' explicitly. (The other part of the default
+1.356 (pmr-sav 19-Mar-02): value is the user's email address and name.)
+1.53 (rms 30-Jun-93): It is useful to set this variable in the site customization file.")
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;;;###autoload
+1.328 (gerd 29-Jan-01): (defcustom rmail-ignored-headers
+1.399 (rms 17-Apr-05): (concat "^via:\\|^mail-from:\\|^origin:\\|^references:\\|^sender:"
+1.328 (gerd 29-Jan-01): "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:"
+1.328 (gerd 29-Jan-01): "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:"
+1.328 (gerd 29-Jan-01): "\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:"
+1.371 (jpw 15-May-03): "\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:\\|^face:"
+1.408 (rms 09-Aug-05): "\\|^x-mailer:\\|^delivered-to:\\|^lines:"
+1.328 (gerd 29-Jan-01): "\\|^content-transfer-encoding:\\|^x-coding-system:"
+1.328 (gerd 29-Jan-01): "\\|^return-path:\\|^errors-to:\\|^return-receipt-to:"
+1.328 (gerd 29-Jan-01): "\\|^precedence:\\|^list-help:\\|^list-post:\\|^list-subscribe:"
+1.328 (gerd 29-Jan-01): "\\|^list-id:\\|^list-unsubscribe:\\|^list-archive:"
+1.413 (rms 15-Aug-05): "\\|^content-length:\\|^nntp-posting-date:\\|^user-agent"
+1.413 (rms 15-Aug-05): "\\|^importance:\\|^envelope-to:\\|^delivery-date\\|^openpgp:"
+1.421 (rms 11-Mar-06): "\\|^mbox-line:\\|^cancel-lock:\\|^DomainKey-Signature:"
+1.413 (rms 15-Aug-05): "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:"
+1.413 (rms 15-Aug-05):
+1.413 (rms 15-Aug-05): "\\|^x-.*:")
+1.302 (rms 05-Apr-99): "*Regexp to match header fields that Rmail should normally hide.
+1.413 (rms 15-Aug-05): \(See also `rmail-nonignored-headers', which overrides this regexp.)
+1.413 (rms 15-Aug-05): This variable is used for reformatting the message header,
+1.413 (rms 15-Aug-05): which normally happens once for each message,
+1.413 (rms 15-Aug-05): when you view the message for the first time in Rmail.
+1.413 (rms 15-Aug-05): To make a change in this variable take effect
+1.413 (rms 15-Aug-05): for a message that you have already viewed,
+1.413 (rms 15-Aug-05): go to that message and type \\[rmail-toggle-header] twice."
+1.413 (rms 15-Aug-05): :type 'regexp
+1.413 (rms 15-Aug-05): :group 'rmail-headers)
+1.413 (rms 15-Aug-05):
+1.413 (rms 15-Aug-05): (defcustom rmail-nonignored-headers "^x-spam-status:"
+1.413 (rms 15-Aug-05): "*Regexp to match X header fields that Rmail should show.
+1.413 (rms 15-Aug-05): This regexp overrides `rmail-ignored-headers'; if both this regexp
+1.413 (rms 15-Aug-05): and that one match a certain header field, Rmail shows the field.
+1.448 (bastien1 10-Feb-08): If this is nil, ignore all header fields in `rmail-ignored-headers'.
+1.413 (rms 15-Aug-05):
+1.302 (rms 05-Apr-99): This variable is used for reformatting the message header,
+1.302 (rms 05-Apr-99): which normally happens once for each message,
+1.302 (rms 05-Apr-99): when you view the message for the first time in Rmail.
+1.302 (rms 05-Apr-99): To make a change in this variable take effect
+1.302 (rms 05-Apr-99): for a message that you have already viewed,
+1.302 (rms 05-Apr-99): go to that message and type \\[rmail-toggle-header] twice."
+1.448 (bastien1 10-Feb-08): :type '(choice (const nil) (regexp))
+1.219 (rms 03-May-97): :group 'rmail-headers)
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;;;###autoload
+1.219 (rms 03-May-97): (defcustom rmail-displayed-headers nil
+1.150 (rms 14-Apr-95): "*Regexp to match Header fields that Rmail should display.
+1.150 (rms 14-Apr-95): If nil, display all header fields except those matched by
+1.219 (rms 03-May-97): `rmail-ignored-headers'."
+1.219 (rms 03-May-97): :type '(choice regexp (const :tag "All"))
+1.219 (rms 03-May-97): :group 'rmail-headers)
+1.150 (rms 14-Apr-95):
+1.150 (rms 14-Apr-95): ;;;###autoload
+1.330 (rms 06-Mar-01): (defcustom rmail-retry-ignored-headers "^x-authentication-warning:" "\
+1.219 (rms 03-May-97): *Headers that should be stripped when retrying a failed message."
+1.219 (rms 03-May-97): :type '(choice regexp (const nil :tag "None"))
+1.219 (rms 03-May-97): :group 'rmail-headers)
+1.128 (rms 23-Sep-94):
+1.128 (rms 23-Sep-94): ;;;###autoload
+1.219 (rms 03-May-97): (defcustom rmail-highlighted-headers "^From:\\|^Subject:" "\
+1.112 (rms 30-Jul-94): *Regexp to match Header fields that Rmail should normally highlight.
+1.451 (bastien1 13-Feb-08): A value of nil means don't highlight."
+1.219 (rms 03-May-97): :type 'regexp
+1.219 (rms 03-May-97): :group 'rmail-headers)
+1.97 (rms 23-Apr-94):
+1.421 (rms 11-Mar-06): (defface rmail-highlight
+1.446 (miles 01-Feb-08): '((t (:inherit highlight)))
+1.421 (rms 11-Mar-06): "Face to use for highlighting the most important header fields."
+1.421 (rms 11-Mar-06): :group 'rmail-headers
+1.421 (rms 11-Mar-06): :version "22.1")
+1.421 (rms 11-Mar-06):
+1.451 (bastien1 13-Feb-08): (defface rmail-header-name
+1.451 (bastien1 13-Feb-08): '((t (:inherit font-lock-function-name-face)))
+1.451 (bastien1 13-Feb-08): "Face to use for highlighting the header names."
+1.451 (bastien1 13-Feb-08): :group 'rmail-headers
+1.451 (bastien1 13-Feb-08): :version "23.1")
+1.112 (rms 30-Jul-94):
+1.112 (rms 30-Jul-94): ;;;###autoload
+1.219 (rms 03-May-97): (defcustom rmail-delete-after-output nil "\
+1.219 (rms 03-May-97): *Non-nil means automatically delete a message that is copied to a file."
+1.219 (rms 03-May-97): :type 'boolean
+1.219 (rms 03-May-97): :group 'rmail-files)
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;;;###autoload
+1.219 (rms 03-May-97): (defcustom rmail-primary-inbox-list nil "\
+1.40 (rms 29-Mar-93): *List of files which are inboxes for user's primary mail file `~/RMAIL'.
+1.370 (lektu 06-May-03): nil means the default, which is (\"/usr/spool/mail/$USER\")
+1.40 (rms 29-Mar-93): \(the name varies depending on the operating system,
+1.219 (rms 03-May-97): and the value of the environment variable MAIL overrides it)."
+1.223 (rms 15-May-97): ;; Don't use backquote here, because we don't want to need it
+1.223 (rms 15-May-97): ;; at load time.
+1.223 (rms 15-May-97): :type (list 'choice '(const :tag "Default" nil)
+1.285 (kwzh 04-Sep-98): (list 'repeat ':value (list (or (getenv "MAIL")
+1.285 (kwzh 04-Sep-98): (concat "/var/spool/mail/"
+1.285 (kwzh 04-Sep-98): (getenv "USER"))))
+1.223 (rms 15-May-97): 'file))
+1.219 (rms 03-May-97): :group 'rmail-retrieve
+1.219 (rms 03-May-97): :group 'rmail-files)
+1.219 (rms 03-May-97):
+1.219 (rms 03-May-97): ;;;###autoload
+1.219 (rms 03-May-97): (defcustom rmail-mail-new-frame nil
+1.390 (eliz 24-Apr-04): "*Non-nil means Rmail makes a new frame for composing outgoing mail.
+1.390 (eliz 24-Apr-04): This is handy if you want to preserve the window configuration of
+1.390 (eliz 24-Apr-04): the frame where you have the RMAIL buffer displayed."
+1.219 (rms 03-May-97): :type 'boolean
+1.219 (rms 03-May-97): :group 'rmail-reply)
+1.219 (rms 03-May-97):
+1.219 (rms 03-May-97): ;;;###autoload
+1.219 (rms 03-May-97): (defcustom rmail-secondary-file-directory "~/"
+1.219 (rms 03-May-97): "*Directory for additional secondary Rmail files."
+1.219 (rms 03-May-97): :type 'directory
+1.219 (rms 03-May-97): :group 'rmail-files)
+1.219 (rms 03-May-97): ;;;###autoload
+1.219 (rms 03-May-97): (defcustom rmail-secondary-file-regexp "\\.xmail$"
+1.219 (rms 03-May-97): "*Regexp for which files are secondary Rmail files."
+1.219 (rms 03-May-97): :type 'regexp
+1.219 (rms 03-May-97): :group 'rmail-files)
+1.91 (rms 18-Mar-94):
+1.161 (rms 10-Nov-95): ;;;###autoload
+1.322 (gerd 22-Nov-00): (defcustom rmail-confirm-expunge 'y-or-n-p
+1.313 (gerd 24-Mar-00): "*Whether and how to ask for confirmation before expunging deleted messages."
+1.313 (gerd 24-Mar-00): :type '(choice (const :tag "No confirmation" nil)
+1.313 (gerd 24-Mar-00): (const :tag "Confirm with y-or-n-p" y-or-n-p)
+1.313 (gerd 24-Mar-00): (const :tag "Confirm with yes-or-no-p" yes-or-no-p))
+1.313 (gerd 24-Mar-00): :version "21.1"
+1.313 (gerd 24-Mar-00): :group 'rmail-files)
+1.313 (gerd 24-Mar-00):
+1.313 (gerd 24-Mar-00): ;;;###autoload
+1.161 (rms 10-Nov-95): (defvar rmail-mode-hook nil
+1.161 (rms 10-Nov-95): "List of functions to call when Rmail is invoked.")
+1.161 (rms 10-Nov-95):
+1.161 (rms 10-Nov-95): ;;;###autoload
+1.161 (rms 10-Nov-95): (defvar rmail-get-new-mail-hook nil
+1.161 (rms 10-Nov-95): "List of functions to call when Rmail has retrieved new mail.")
+1.161 (rms 10-Nov-95):
+1.161 (rms 10-Nov-95): ;;;###autoload
+1.315 (fx 14-May-00): (defcustom rmail-show-message-hook nil
+1.315 (fx 14-May-00): "List of functions to call when Rmail displays a message."
+1.315 (fx 14-May-00): :type 'hook
+1.360 (rms 19-May-02): :options '(goto-address)
+1.315 (fx 14-May-00): :group 'rmail)
+1.161 (rms 10-Nov-95):
+1.161 (rms 10-Nov-95): ;;;###autoload
+1.312 (gerd 02-Mar-00): (defvar rmail-quit-hook nil
+1.312 (gerd 02-Mar-00): "List of functions to call when quitting out of Rmail.")
+1.312 (gerd 02-Mar-00):
+1.312 (gerd 02-Mar-00): ;;;###autoload
+1.161 (rms 10-Nov-95): (defvar rmail-delete-message-hook nil
+1.161 (rms 10-Nov-95): "List of functions to call when Rmail deletes a message.
+1.161 (rms 10-Nov-95): When the hooks are called, the message has been marked deleted but is
+1.161 (rms 10-Nov-95): still the current message in the Rmail buffer.")
+1.161 (rms 10-Nov-95):
+1.39 (rms 09-Mar-93): ;; These may be altered by site-init.el to match the format of mmdf files
+1.39 (rms 09-Mar-93): ;; delimiting used on a given host (delim1 and delim2 from the config
+1.39 (rms 09-Mar-93): ;; files).
+1.1 (roland 13-May-91):
+1.226 (rms 01-Jun-97): (defvar rmail-mmdf-delim1 "^\001\001\001\001\n"
+1.368 (jpw 06-Jan-03): "Regexp marking the start of an mmdf message.")
+1.226 (rms 01-Jun-97): (defvar rmail-mmdf-delim2 "^\001\001\001\001\n"
+1.368 (jpw 06-Jan-03): "Regexp marking the end of an mmdf message.")
+1.1 (roland 13-May-91):
+1.259 (kwzh 08-Apr-98): (defcustom rmail-message-filter nil
+1.193 (rms 06-Aug-96): "If non-nil, a filter function for new messages in RMAIL.
+1.193 (rms 06-Aug-96): Called with region narrowed to the message, including headers,
+1.259 (kwzh 08-Apr-98): before obeying `rmail-ignored-headers'."
+1.259 (kwzh 08-Apr-98): :group 'rmail-headers
+1.432 (jpw 24-Feb-07): :type '(choice (const nil) function))
+1.1 (roland 13-May-91):
+1.317 (fx 24-May-00): (defcustom rmail-automatic-folder-directives nil
+1.317 (fx 24-May-00): "List of directives specifying where to put a message.
+1.317 (fx 24-May-00): Each element of the list is of the form:
+1.317 (fx 24-May-00):
+1.317 (fx 24-May-00): (FOLDERNAME FIELD REGEXP [ FIELD REGEXP ] ... )
+1.317 (fx 24-May-00):
+1.317 (fx 24-May-00): Where FOLDERNAME is the name of a BABYL format folder to put the
+1.317 (fx 24-May-00): message. If any of the field regexp's are nil, then it is ignored.
+1.317 (fx 24-May-00):
+1.317 (fx 24-May-00): If FOLDERNAME is \"/dev/null\", it is deleted.
+1.317 (fx 24-May-00): If FOLDERNAME is nil then it is deleted, and skipped.
+1.317 (fx 24-May-00):
+1.317 (fx 24-May-00): FIELD is the plain text name of a field in the message, such as
+1.317 (fx 24-May-00): \"subject\" or \"from\". A FIELD of \"to\" will automatically include
+1.317 (fx 24-May-00): all text from the \"cc\" field as well.
+1.317 (fx 24-May-00):
+1.317 (fx 24-May-00): REGEXP is an expression to match in the preceeding specified FIELD.
+1.317 (fx 24-May-00): FIELD/REGEXP pairs continue in the list.
+1.317 (fx 24-May-00):
+1.317 (fx 24-May-00): examples:
+1.317 (fx 24-May-00): (\"/dev/null\" \"from\" \"@spam.com\") ; delete all mail from spam.com
+1.323 (gerd 27-Nov-00): (\"RMS\" \"from\" \"rms@\") ; save all mail from RMS."
+1.323 (gerd 27-Nov-00): :group 'rmail
+1.323 (gerd 27-Nov-00): :version "21.1"
+1.323 (gerd 27-Nov-00): :type '(repeat (sexp :tag "Directive")))
+1.358 (pot 06-May-02):
+1.39 (rms 09-Mar-93): (defvar rmail-reply-prefix "Re: "
+1.39 (rms 09-Mar-93): "String to prepend to Subject line when replying to a message.")
+1.39 (rms 09-Mar-93):
+1.211 (kwzh 23-Feb-97): ;; Some mailers use "Re(2):" or "Re^2:" or "Re: Re:" or "Re[2]:".
+1.422 (rms 18-Mar-06): ;; This pattern should catch all the common variants.
+1.422 (rms 18-Mar-06): ;; rms: I deleted the change to delete tags in square brackets
+1.422 (rms 18-Mar-06): ;; because they mess up RT tags.
+1.422 (rms 18-Mar-06): (defvar rmail-reply-regexp "\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*"
+1.193 (rms 06-Aug-96): "Regexp to delete from Subject line before inserting `rmail-reply-prefix'.")
+1.143 (kwzh 03-Feb-95):
+1.259 (kwzh 08-Apr-98): (defcustom rmail-display-summary nil
+1.259 (kwzh 08-Apr-98): "*If non-nil, Rmail always displays the summary buffer."
+1.259 (kwzh 08-Apr-98): :group 'rmail-summary
+1.259 (kwzh 08-Apr-98): :type 'boolean)
+1.259 (kwzh 08-Apr-98):
+1.259 (kwzh 08-Apr-98): (defvar rmail-inbox-list nil)
+1.259 (kwzh 08-Apr-98): (put 'rmail-inbox-list 'permanent-local t)
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defvar rmail-keywords nil)
+1.259 (kwzh 08-Apr-98): (put 'rmail-keywords 'permanent-local t)
+1.1 (roland 13-May-91):
+1.234 (rms 24-Aug-97): (defvar rmail-buffer nil
+1.234 (rms 24-Aug-97): "The RMAIL buffer related to the current buffer.
+1.234 (rms 24-Aug-97): In an RMAIL buffer, this holds the RMAIL buffer itself.
+1.234 (rms 24-Aug-97): In a summary buffer, this holds the RMAIL buffer it is a summary for.")
+1.234 (rms 24-Aug-97): (put 'rmail-buffer 'permanent-local t)
+1.234 (rms 24-Aug-97):
+1.1 (roland 13-May-91): ;; Message counters and markers. Deleted flags.
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defvar rmail-current-message nil)
+1.259 (kwzh 08-Apr-98): (put 'rmail-current-message 'permanent-local t)
+1.259 (kwzh 08-Apr-98):
+1.1 (roland 13-May-91): (defvar rmail-total-messages nil)
+1.259 (kwzh 08-Apr-98): (put 'rmail-total-messages 'permanent-local t)
+1.259 (kwzh 08-Apr-98):
+1.1 (roland 13-May-91): (defvar rmail-message-vector nil)
+1.259 (kwzh 08-Apr-98): (put 'rmail-message-vector 'permanent-local t)
+1.259 (kwzh 08-Apr-98):
+1.1 (roland 13-May-91): (defvar rmail-deleted-vector nil)
+1.259 (kwzh 08-Apr-98): (put 'rmail-deleted-vector 'permanent-local t)
+1.259 (kwzh 08-Apr-98):
+1.218 (rms 02-May-97): (defvar rmail-msgref-vector nil
+1.218 (rms 02-May-97): "In an Rmail buffer, a vector whose Nth element is a list (N).
+1.218 (rms 02-May-97): When expunging renumbers messages, these lists are modified
+1.218 (rms 02-May-97): by substituting the new message number into the existing list.")
+1.259 (kwzh 08-Apr-98): (put 'rmail-msgref-vector 'permanent-local t)
+1.1 (roland 13-May-91):
+1.98 (rms 24-Apr-94): (defvar rmail-overlay-list nil)
+1.259 (kwzh 08-Apr-98): (put 'rmail-overlay-list 'permanent-local t)
+1.132 (rms 07-Oct-94):
+1.1 (roland 13-May-91): ;; These are used by autoloaded rmail-summary.
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defvar rmail-summary-buffer nil)
+1.234 (rms 24-Aug-97): (put 'rmail-summary-buffer 'permanent-local t)
+1.1 (roland 13-May-91): (defvar rmail-summary-vector nil)
+1.234 (rms 24-Aug-97): (put 'rmail-summary-vector 'permanent-local t)
+1.1 (roland 13-May-91):
+1.259 (kwzh 08-Apr-98): (defvar rmail-view-buffer nil
+1.259 (kwzh 08-Apr-98): "Buffer which holds RMAIL message for MIME displaying.")
+1.259 (kwzh 08-Apr-98): (put 'rmail-view-buffer 'permanent-local t)
+1.259 (kwzh 08-Apr-98):
+1.1 (roland 13-May-91): ;; `Sticky' default variables.
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; Last individual label specified to a or k.
+1.1 (roland 13-May-91): (defvar rmail-last-label nil)
+1.259 (kwzh 08-Apr-98): (put 'rmail-last-label 'permanent-local t)
+1.259 (kwzh 08-Apr-98):
+1.39 (rms 09-Mar-93): ;; Last set of values specified to C-M-n, C-M-p, C-M-s or C-M-l.
+1.1 (roland 13-May-91): (defvar rmail-last-multi-labels nil)
+1.259 (kwzh 08-Apr-98):
+1.39 (rms 09-Mar-93): (defvar rmail-last-regexp nil)
+1.259 (kwzh 08-Apr-98): (put 'rmail-last-regexp 'permanent-local t)
+1.259 (kwzh 08-Apr-98):
+1.219 (rms 03-May-97): (defcustom rmail-default-file "~/xmail"
+1.219 (rms 03-May-97): "*Default file name for \\[rmail-output]."
+1.219 (rms 03-May-97): :type 'file
+1.219 (rms 03-May-97): :group 'rmail-files)
+1.219 (rms 03-May-97): (defcustom rmail-default-rmail-file "~/XMAIL"
+1.219 (rms 03-May-97): "*Default file name for \\[rmail-output-to-rmail-file]."
+1.219 (rms 03-May-97): :type 'file
+1.219 (rms 03-May-97): :group 'rmail-files)
+1.270 (rms 23-May-98): (defcustom rmail-default-body-file "~/mailout"
+1.270 (rms 23-May-98): "*Default file name for \\[rmail-output-body-to-file]."
+1.270 (rms 23-May-98): :type 'file
+1.270 (rms 23-May-98): :group 'rmail-files
+1.270 (rms 23-May-98): :version "20.3")
+1.10 (jimb 19-Apr-92):
+1.259 (kwzh 08-Apr-98): ;; Mule and MIME related variables.
+1.259 (kwzh 08-Apr-98):
+1.259 (kwzh 08-Apr-98): ;;;###autoload
+1.259 (kwzh 08-Apr-98): (defvar rmail-file-coding-system nil
+1.259 (kwzh 08-Apr-98): "Coding system used in RMAIL file.
+1.259 (kwzh 08-Apr-98):
+1.259 (kwzh 08-Apr-98): This is set to nil by default.")
+1.259 (kwzh 08-Apr-98):
+1.259 (kwzh 08-Apr-98): ;;;###autoload
+1.259 (kwzh 08-Apr-98): (defcustom rmail-enable-mime nil
+1.259 (kwzh 08-Apr-98): "*If non-nil, RMAIL uses MIME feature.
+1.259 (kwzh 08-Apr-98): If the value is t, RMAIL automatically shows MIME decoded message.
+1.259 (kwzh 08-Apr-98): If the value is neither t nor nil, RMAIL does not show MIME decoded message
+1.419 (handa 19-Jan-06): until a user explicitly requires it.
+1.419 (handa 19-Jan-06):
+1.419 (handa 19-Jan-06): Even if the value is non-nil, you can't use MIME feature
+1.419 (handa 19-Jan-06): if the feature specified by `rmail-mime-feature' is not available
+1.419 (handa 19-Jan-06): in your session."
+1.259 (kwzh 08-Apr-98): :type '(choice (const :tag "on" t)
+1.259 (kwzh 08-Apr-98): (const :tag "off" nil)
+1.278 (schwab 24-Jun-98): (other :tag "when asked" ask))
+1.259 (kwzh 08-Apr-98): :group 'rmail)
+1.259 (kwzh 08-Apr-98):
+1.350 (zsh 25-Nov-01): (defvar rmail-enable-mime-composing nil
+1.350 (zsh 25-Nov-01): "*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to forward.")
+1.350 (zsh 25-Nov-01):
+1.259 (kwzh 08-Apr-98): ;;;###autoload
+1.259 (kwzh 08-Apr-98): (defvar rmail-show-mime-function nil
+1.339 (gerd 08-May-01): "Function to show MIME decoded message of RMAIL file.
+1.339 (gerd 08-May-01): This function is called when `rmail-enable-mime' is non-nil.
+1.339 (gerd 08-May-01): It is called with no argument.")
+1.339 (gerd 08-May-01):
+1.339 (gerd 08-May-01): ;;;###autoload
+1.339 (gerd 08-May-01): (defvar rmail-insert-mime-forwarded-message-function nil
+1.339 (gerd 08-May-01): "Function to insert a message in MIME format so it can be forwarded.
+1.358 (pot 06-May-02): This function is called if `rmail-enable-mime' or
+1.350 (zsh 25-Nov-01): `rmail-enable-mime-composing' is non-nil.
+1.339 (gerd 08-May-01): It is called with one argument FORWARD-BUFFER, which is a
+1.339 (gerd 08-May-01): buffer containing the message to forward. The current buffer
+1.339 (gerd 08-May-01): is the outgoing mail buffer.")
+1.339 (gerd 08-May-01):
+1.339 (gerd 08-May-01): ;;;###autoload
+1.342 (gerd 31-May-01): (defvar rmail-insert-mime-resent-message-function nil
+1.342 (gerd 31-May-01): "Function to insert a message in MIME format so it can be resent.
+1.342 (gerd 31-May-01): This function is called if `rmail-enable-mime' is non-nil.
+1.342 (gerd 31-May-01): It is called with one argument FORWARD-BUFFER, which is a
+1.342 (gerd 31-May-01): buffer containing the message to forward. The current buffer
+1.342 (gerd 31-May-01): is the outgoing mail buffer.")
+1.342 (gerd 31-May-01):
+1.342 (gerd 31-May-01): ;;;###autoload
+1.339 (gerd 08-May-01): (defvar rmail-search-mime-message-function nil
+1.339 (gerd 08-May-01): "Function to check if a regexp matches a MIME message.
+1.339 (gerd 08-May-01): This function is called if `rmail-enable-mime' is non-nil.
+1.339 (gerd 08-May-01): It is called with two arguments MSG and REGEXP, where
+1.339 (gerd 08-May-01): MSG is the message number, REGEXP is the regular expression.")
+1.339 (gerd 08-May-01):
+1.339 (gerd 08-May-01): ;;;###autoload
+1.339 (gerd 08-May-01): (defvar rmail-search-mime-header-function nil
+1.339 (gerd 08-May-01): "Function to check if a regexp matches a header of MIME message.
+1.339 (gerd 08-May-01): This function is called if `rmail-enable-mime' is non-nil.
+1.362 (rms 17-Aug-02): It is called with three arguments MSG, REGEXP, and LIMIT, where
+1.339 (gerd 08-May-01): MSG is the message number,
+1.339 (gerd 08-May-01): REGEXP is the regular expression,
+1.339 (gerd 08-May-01): LIMIT is the position specifying the end of header.")
+1.259 (kwzh 08-Apr-98):
+1.259 (kwzh 08-Apr-98): ;;;###autoload
+1.259 (kwzh 08-Apr-98): (defvar rmail-mime-feature 'rmail-mime
+1.267 (rms 19-May-98): "Feature to require to load MIME support in Rmail.
+1.267 (rms 19-May-98): When starting Rmail, if `rmail-enable-mime' is non-nil,
+1.419 (handa 19-Jan-06): this feature is required with `require'.
+1.419 (handa 19-Jan-06):
+1.419 (handa 19-Jan-06): The default value is `rmail-mime'. This feature is provided by
+1.419 (handa 19-Jan-06): the rmail-mime package available at <http://www.m17n.org/rmail-mime/>.")
+1.295 (rms 28-Jan-99):
+1.295 (rms 28-Jan-99): ;;;###autoload
+1.295 (rms 28-Jan-99): (defvar rmail-decode-mime-charset t
+1.295 (rms 28-Jan-99): "*Non-nil means a message is decoded by MIME's charset specification.
+1.295 (rms 28-Jan-99): If this variable is nil, or the message has not MIME specification,
+1.295 (rms 28-Jan-99): the message is decoded as normal way.
+1.295 (rms 28-Jan-99):
+1.295 (rms 28-Jan-99): If the variable `rmail-enable-mime' is non-nil, this variables is
+1.295 (rms 28-Jan-99): ignored, and all the decoding work is done by a feature specified by
+1.295 (rms 28-Jan-99): the variable `rmail-mime-feature'.")
+1.295 (rms 28-Jan-99):
+1.295 (rms 28-Jan-99): ;;;###autoload
+1.295 (rms 28-Jan-99): (defvar rmail-mime-charset-pattern
+1.429 (eliz 07-Oct-06): (concat "^content-type:[ \t]*text/plain;"
+1.426 (eliz 20-May-06): "\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*"
+1.424 (rms 10-Apr-06): "[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?")
+1.295 (rms 28-Jan-99): "Regexp to match MIME-charset specification in a header of message.
+1.295 (rms 28-Jan-99): The first parenthesized expression should match the MIME-charset name.")
+1.295 (rms 28-Jan-99):
+1.259 (kwzh 08-Apr-98):
+1.11 (jimb 24-Apr-92): ;;; Regexp matching the delimiter of messages in UNIX mail format
+1.11 (jimb 24-Apr-92): ;;; (UNIX From lines), minus the initial ^. Note that if you change
+1.11 (jimb 24-Apr-92): ;;; this expression, you must change the code in rmail-nuke-pinhead-header
+1.11 (jimb 24-Apr-92): ;;; that knows the exact ordering of the \\( \\) subexpressions.
+1.10 (jimb 19-Apr-92): (defvar rmail-unix-mail-delimiter
+1.24 (jimb 13-Sep-92): (let ((time-zone-regexp
+1.158 (rms 30-Jul-95): (concat "\\([A-Z]?[A-Z]?[A-Z][A-Z]\\( DST\\)?"
+1.24 (jimb 13-Sep-92): "\\|[-+]?[0-9][0-9][0-9][0-9]"
+1.24 (jimb 13-Sep-92): "\\|"
+1.24 (jimb 13-Sep-92): "\\) *")))
+1.24 (jimb 13-Sep-92): (concat
+1.24 (jimb 13-Sep-92): "From "
+1.24 (jimb 13-Sep-92):
+1.188 (rms 28-Jun-96): ;; Many things can happen to an RFC 822 mailbox before it is put into
+1.188 (rms 28-Jun-96): ;; a `From' line. The leading phrase can be stripped, e.g.
+1.188 (rms 28-Jun-96): ;; `Joe <@w.x:joe@y.z>' -> `<@w.x:joe@y.z>'. The <> can be stripped, e.g.
+1.188 (rms 28-Jun-96): ;; `<@x.y:joe@y.z>' -> `@x.y:joe@y.z'. Everything starting with a CRLF
+1.188 (rms 28-Jun-96): ;; can be removed, e.g.
+1.188 (rms 28-Jun-96): ;; From: joe@y.z (Joe K
+1.188 (rms 28-Jun-96): ;; User)
+1.188 (rms 28-Jun-96): ;; can yield `From joe@y.z (Joe K Fri Mar 22 08:11:15 1996', and
+1.188 (rms 28-Jun-96): ;; From: Joe User
+1.188 (rms 28-Jun-96): ;; <joe@y.z>
+1.188 (rms 28-Jun-96): ;; can yield `From Joe User Fri Mar 22 08:11:15 1996'.
+1.192 (eggert 03-Aug-96): ;; The mailbox can be removed or be replaced by white space, e.g.
+1.192 (eggert 03-Aug-96): ;; From: "Joe User"{space}{tab}
+1.192 (eggert 03-Aug-96): ;; <joe@y.z>
+1.192 (eggert 03-Aug-96): ;; can yield `From {space}{tab} Fri Mar 22 08:11:15 1996',
+1.192 (eggert 03-Aug-96): ;; where {space} and {tab} represent the Ascii space and tab characters.
+1.188 (rms 28-Jun-96): ;; We want to match the results of any of these manglings.
+1.188 (rms 28-Jun-96): ;; The following regexp rejects names whose first characters are
+1.188 (rms 28-Jun-96): ;; obviously bogus, but after that anything goes.
+1.192 (eggert 03-Aug-96): "\\([^\0-\b\n-\r\^?].*\\)? "
+1.24 (jimb 13-Sep-92):
+1.24 (jimb 13-Sep-92): ;; The time the message was sent.
+1.188 (rms 28-Jun-96): "\\([^\0-\r \^?]+\\) +" ; day of the week
+1.188 (rms 28-Jun-96): "\\([^\0-\r \^?]+\\) +" ; month
+1.188 (rms 28-Jun-96): "\\([0-3]?[0-9]\\) +" ; day of month
+1.188 (rms 28-Jun-96): "\\([0-2][0-9]:[0-5][0-9]\\(:[0-6][0-9]\\)?\\) *" ; time of day
+1.24 (jimb 13-Sep-92):
+1.24 (jimb 13-Sep-92): ;; Perhaps a time zone, specified by an abbreviation, or by a
+1.24 (jimb 13-Sep-92): ;; numeric offset.
+1.24 (jimb 13-Sep-92): time-zone-regexp
+1.24 (jimb 13-Sep-92):
+1.24 (jimb 13-Sep-92): ;; The year.
+1.188 (rms 28-Jun-96): " \\([0-9][0-9]+\\) *"
+1.24 (jimb 13-Sep-92):
+1.24 (jimb 13-Sep-92): ;; On some systems the time zone can appear after the year, too.
+1.24 (jimb 13-Sep-92): time-zone-regexp
+1.24 (jimb 13-Sep-92):
+1.96 (kwzh 23-Apr-94): ;; Old uucp cruft.
+1.96 (kwzh 23-Apr-94): "\\(remote from .*\\)?"
+1.24 (jimb 13-Sep-92):
+1.24 (jimb 13-Sep-92): "\n"))
+1.24 (jimb 13-Sep-92): nil)
+1.24 (jimb 13-Sep-92):
+1.450 (bastien1 12-Feb-08): (defvar rmail-font-lock-keywords
+1.367 (rms 06-Jan-03): ;; These are all matched case-insensitively.
+1.450 (bastien1 12-Feb-08): (eval-when-compile
+1.259 (kwzh 08-Apr-98): (let* ((cite-chars "[>|}]")
+1.367 (rms 06-Jan-03): (cite-prefix "a-z")
+1.259 (kwzh 08-Apr-98): (cite-suffix (concat cite-prefix "0-9_.@-`'\"")))
+1.367 (rms 06-Jan-03): (list '("^\\(From\\|Sender\\|Resent-From\\):"
+1.451 (bastien1 13-Feb-08): . 'rmail-header-name)
+1.451 (bastien1 13-Feb-08): '("^Reply-To:.*$" . 'rmail-header-name)
+1.451 (bastien1 13-Feb-08): '("^Subject:" . 'rmail-header-name)
+1.451 (bastien1 13-Feb-08): '("^X-Spam-Status:" . 'rmail-header-name)
+1.259 (kwzh 08-Apr-98): '("^\\(To\\|Apparently-To\\|Cc\\|Newsgroups\\):"
+1.451 (bastien1 13-Feb-08): . 'rmail-header-name)
+1.259 (kwzh 08-Apr-98): ;; Use MATCH-ANCHORED to effectively anchor the regexp left side.
+1.259 (kwzh 08-Apr-98): `(,cite-chars
+1.259 (kwzh 08-Apr-98): (,(concat "\\=[ \t]*"
+1.401 (rms 24-Apr-05): "\\(\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?"
+1.401 (rms 24-Apr-05): "\\(" cite-chars "[ \t]*\\)\\)+\\)"
+1.259 (kwzh 08-Apr-98): "\\(.*\\)")
+1.259 (kwzh 08-Apr-98): (beginning-of-line) (end-of-line)
+1.401 (rms 24-Apr-05): (1 font-lock-comment-delimiter-face nil t)
+1.401 (rms 24-Apr-05): (5 font-lock-comment-face nil t)))
+1.367 (rms 06-Jan-03): '("^\\(X-[a-z0-9-]+\\|In-reply-to\\|Date\\):.*\\(\n[ \t]+.*\\)*$"
+1.451 (bastien1 13-Feb-08): . 'rmail-header-name))))
+1.450 (bastien1 12-Feb-08): "Additional expressions to highlight in Rmail mode.")
+1.259 (kwzh 08-Apr-98):
+1.39 (rms 09-Mar-93): ;; Perform BODY in the summary buffer
+1.39 (rms 09-Mar-93): ;; in such a way that its cursor is properly updated in its own window.
+1.39 (rms 09-Mar-93): (defmacro rmail-select-summary (&rest body)
+1.309 (gerd 15-Nov-99): `(let ((total rmail-total-messages))
+1.309 (gerd 15-Nov-99): (if (rmail-summary-displayed)
+1.309 (gerd 15-Nov-99): (let ((window (selected-window)))
+1.309 (gerd 15-Nov-99): (save-excursion
+1.309 (gerd 15-Nov-99): (unwind-protect
+1.309 (gerd 15-Nov-99): (progn
+1.309 (gerd 15-Nov-99): (pop-to-buffer rmail-summary-buffer)
+1.309 (gerd 15-Nov-99): ;; rmail-total-messages is a buffer-local var
+1.309 (gerd 15-Nov-99): ;; in the rmail buffer.
+1.309 (gerd 15-Nov-99): ;; This way we make it available for the body
+1.309 (gerd 15-Nov-99): ;; even tho the rmail buffer is not current.
+1.309 (gerd 15-Nov-99): (let ((rmail-total-messages total))
+1.309 (gerd 15-Nov-99): ,@body))
+1.309 (gerd 15-Nov-99): (select-window window))))
+1.309 (gerd 15-Nov-99): (save-excursion
+1.309 (gerd 15-Nov-99): (set-buffer rmail-summary-buffer)
+1.309 (gerd 15-Nov-99): (let ((rmail-total-messages total))
+1.309 (gerd 15-Nov-99): ,@body)))
+1.309 (gerd 15-Nov-99): (rmail-maybe-display-summary)))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;;;; *** Rmail Mode ***
+1.1 (roland 13-May-91):
+1.340 (gerd 17-May-01): ;; This variable is dynamically bound. The defvar is here to placate
+1.340 (gerd 17-May-01): ;; the byte compiler.
+1.340 (gerd 17-May-01):
+1.247 (handa 20-Feb-98): (defvar rmail-enable-multibyte nil)
+1.247 (handa 20-Feb-98):
+1.340 (gerd 17-May-01):
+1.340 (gerd 17-May-01): (defun rmail-require-mime-maybe ()
+1.340 (gerd 17-May-01): "Require `rmail-mime-feature' if that is non-nil.
+1.340 (gerd 17-May-01): Signal an error and set `rmail-mime-feature' to nil if the feature
+1.340 (gerd 17-May-01): isn't provided."
+1.340 (gerd 17-May-01): (when rmail-enable-mime
+1.340 (gerd 17-May-01): (condition-case err
+1.340 (gerd 17-May-01): (require rmail-mime-feature)
+1.340 (gerd 17-May-01): (error
+1.419 (handa 19-Jan-06): (display-warning
+1.419 (handa 19-Jan-06): :warning
+1.419 (handa 19-Jan-06): (format "Although MIME support is requested
+1.419 (handa 19-Jan-06): by setting `rmail-enable-mime' to non-nil, the required feature
+1.419 (handa 19-Jan-06): `%s' (the value of `rmail-mime-feature')
+1.419 (handa 19-Jan-06): is not available in the current session.
+1.419 (handa 19-Jan-06): So, the MIME support is turned off for the moment."
+1.419 (handa 19-Jan-06): rmail-mime-feature))
+1.340 (gerd 17-May-01): (setq rmail-enable-mime nil)))))
+1.340 (gerd 17-May-01):
+1.340 (gerd 17-May-01):
+1.1 (roland 13-May-91): ;;;###autoload
+1.1 (roland 13-May-91): (defun rmail (&optional file-name-arg)
+1.1 (roland 13-May-91): "Read and edit incoming mail.
+1.68 (rms 09-Oct-93): Moves messages into file named by `rmail-file-name' (a babyl format file)
+1.1 (roland 13-May-91): and edits that file in RMAIL Mode.
+1.1 (roland 13-May-91): Type \\[describe-mode] once editing that file, for a list of RMAIL commands.
+1.1 (roland 13-May-91):
+1.73 (rms 23-Dec-93): May be called with file name as argument; then performs rmail editing on
+1.73 (rms 23-Dec-93): that file, but does not copy any new mail into the file.
+1.73 (rms 23-Dec-93): Interactively, if you supply a prefix argument, then you
+1.113 (rms 30-Jul-94): have a chance to specify a file name with the minibuffer.
+1.113 (rms 30-Jul-94):
+1.113 (rms 30-Jul-94): If `rmail-display-summary' is non-nil, make a summary for this RMAIL file."
+1.1 (roland 13-May-91): (interactive (if current-prefix-arg
+1.165 (rms 23-Dec-95): (list (read-file-name "Run rmail on RMAIL file: "))))
+1.340 (gerd 17-May-01): (rmail-require-mime-maybe)
+1.1 (roland 13-May-91): (let* ((file-name (expand-file-name (or file-name-arg rmail-file-name)))
+1.354 (eliz 03-Feb-02): ;; Use find-buffer-visiting, not get-file-buffer, for those users
+1.354 (eliz 03-Feb-02): ;; who have find-file-visit-truename set to t.
+1.354 (eliz 03-Feb-02): (existed (find-buffer-visiting file-name))
+1.349 (eliz 16-Sep-01): ;; This binding is necessary because we must decide if we
+1.248 (handa 20-Feb-98): ;; need code conversion while the buffer is unibyte
+1.248 (handa 20-Feb-98): ;; (i.e. enable-multibyte-characters is nil).
+1.280 (rms 09-Jul-98): (rmail-enable-multibyte
+1.358 (pot 06-May-02): (if existed
+1.280 (rms 09-Jul-98): (with-current-buffer existed enable-multibyte-characters)
+1.280 (rms 09-Jul-98): (default-value 'enable-multibyte-characters)))
+1.247 (handa 20-Feb-98): ;; Since the file may contain messages of different encodings
+1.247 (handa 20-Feb-98): ;; at the tail (non-BYBYL part), we can't decode them at once
+1.247 (handa 20-Feb-98): ;; on reading. So, at first, we read the file without text
+1.247 (handa 20-Feb-98): ;; code conversion, then decode the messages one by one by
+1.247 (handa 20-Feb-98): ;; rmail-decode-babyl-format or
+1.247 (handa 20-Feb-98): ;; rmail-convert-to-babyl-format.
+1.247 (handa 20-Feb-98): (coding-system-for-read (and rmail-enable-multibyte 'raw-text))
+1.237 (kwzh 15-Oct-97): run-mail-hook msg-shown)
+1.1 (roland 13-May-91): ;; Like find-file, but in the case where a buffer existed
+1.1 (roland 13-May-91): ;; and the file was reverted, recompute the message-data.
+1.263 (rms 22-Apr-98): ;; We used to bind enable-local-variables to nil here,
+1.263 (rms 22-Apr-98): ;; but that should not be needed now that rmail-mode
+1.263 (rms 22-Apr-98): ;; sets it locally to nil.
+1.263 (rms 22-Apr-98): ;; (Binding a variable locally with let is not safe if it has
+1.263 (rms 22-Apr-98): ;; buffer-local bindings.)
+1.1 (roland 13-May-91): (if (and existed (not (verify-visited-file-modtime existed)))
+1.1 (roland 13-May-91): (progn
+1.263 (rms 22-Apr-98): (find-file file-name)
+1.39 (rms 09-Mar-93): (if (and (verify-visited-file-modtime existed)
+1.39 (rms 09-Mar-93): (eq major-mode 'rmail-mode))
+1.1 (roland 13-May-91): (progn (rmail-forget-messages)
+1.1 (roland 13-May-91): (rmail-set-message-counters))))
+1.358 (pot 06-May-02): (switch-to-buffer
+1.276 (rms 13-Jun-98): (let ((enable-local-variables nil))
+1.276 (rms 13-Jun-98): (find-file-noselect file-name))))
+1.39 (rms 09-Mar-93): (if (eq major-mode 'rmail-edit-mode)
+1.243 (rms 19-Jan-98): (error "Exit Rmail Edit mode before getting new mail"))
+1.1 (roland 13-May-91): (if (and existed (> (buffer-size) 0))
+1.1 (roland 13-May-91): ;; Buffer not new and not empty; ensure in proper mode, but that's all.
+1.1 (roland 13-May-91): (or (eq major-mode 'rmail-mode)
+1.200 (rms 12-Oct-96): (progn (rmail-mode-2)
+1.200 (rms 12-Oct-96): (setq run-mail-hook t)))
+1.200 (rms 12-Oct-96): (setq run-mail-hook t)
+1.1 (roland 13-May-91): (rmail-mode-2)
+1.1 (roland 13-May-91): ;; Convert all or part to Babyl file if possible.
+1.1 (roland 13-May-91): (rmail-convert-file)
+1.274 (rms 06-Jun-98): (goto-char (point-max)))
+1.277 (rms 15-Jun-98): ;; As we have read a file by raw-text, the buffer is set to
+1.277 (rms 15-Jun-98): ;; unibyte. We must make it multibyte if necessary.
+1.277 (rms 15-Jun-98): (if (and rmail-enable-multibyte
+1.277 (rms 15-Jun-98): (not enable-multibyte-characters))
+1.277 (rms 15-Jun-98): (set-buffer-multibyte t))
+1.275 (rms 11-Jun-98): ;; If necessary, scan to find all the messages.
+1.275 (rms 11-Jun-98): (rmail-maybe-set-message-counters)
+1.242 (kwzh 18-Jan-98): (unwind-protect
+1.274 (rms 06-Jun-98): (unless (and (not file-name-arg)
+1.274 (rms 06-Jun-98): (rmail-get-new-mail))
+1.274 (rms 06-Jun-98): (rmail-show-message (rmail-first-unseen-message)))
+1.242 (kwzh 18-Jan-98): (progn
+1.242 (kwzh 18-Jan-98): (if rmail-display-summary (rmail-summary))
+1.242 (kwzh 18-Jan-98): (rmail-construct-io-menu)
+1.242 (kwzh 18-Jan-98): (if run-mail-hook
+1.242 (kwzh 18-Jan-98): (run-hooks 'rmail-mode-hook))))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; Given the value of MAILPATH, return a list of inbox file names.
+1.1 (roland 13-May-91): ;; This is turned off because it is not clear that the user wants
+1.1 (roland 13-May-91): ;; all these inboxes to feed into the primary rmail file.
+1.1 (roland 13-May-91): ; (defun rmail-convert-mailpath (string)
+1.1 (roland 13-May-91): ; (let (idx list)
+1.1 (roland 13-May-91): ; (while (setq idx (string-match "[%:]" string))
+1.1 (roland 13-May-91): ; (let ((this (substring string 0 idx)))
+1.1 (roland 13-May-91): ; (setq string (substring string (1+ idx)))
+1.1 (roland 13-May-91): ; (setq list (cons (if (string-match "%" this)
+1.1 (roland 13-May-91): ; (substring this 0 (string-match "%" this))
+1.1 (roland 13-May-91): ; this)
+1.1 (roland 13-May-91): ; list))))
+1.1 (roland 13-May-91): ; list))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ; I have checked that adding "-*- rmail -*-" to the BABYL OPTIONS line
+1.1 (roland 13-May-91): ; will not cause emacs 18.55 problems.
+1.1 (roland 13-May-91):
+1.265 (rms 12-May-98): ;; This calls rmail-decode-babyl-format if the file is already Babyl.
+1.265 (rms 12-May-98):
+1.1 (roland 13-May-91): (defun rmail-convert-file ()
+1.1 (roland 13-May-91): (let (convert)
+1.1 (roland 13-May-91): (widen)
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.1 (roland 13-May-91): ;; If file doesn't start like a Babyl file,
+1.1 (roland 13-May-91): ;; convert it to one, by adding a header and converting each message.
+1.1 (roland 13-May-91): (cond ((looking-at "BABYL OPTIONS:"))
+1.1 (roland 13-May-91): ((looking-at "Version: 5\n")
+1.1 (roland 13-May-91): ;; Losing babyl file made by old version of Rmail.
+1.1 (roland 13-May-91): ;; Just fix the babyl file header; don't make a new one,
+1.1 (roland 13-May-91): ;; so we don't lose the Labels: file attribute, etc.
+1.1 (roland 13-May-91): (let ((buffer-read-only nil))
+1.1 (roland 13-May-91): (insert "BABYL OPTIONS: -*- rmail -*-\n")))
+1.66 (bfox 21-Sep-93): ((equal (point-min) (point-max))
+1.66 (bfox 21-Sep-93): ;; Empty RMAIL file. Just insert the header.
+1.66 (bfox 21-Sep-93): (rmail-insert-rmail-file-header))
+1.1 (roland 13-May-91): (t
+1.66 (bfox 21-Sep-93): ;; Non-empty file in non-RMAIL format. Add header and convert.
+1.1 (roland 13-May-91): (setq convert t)
+1.1 (roland 13-May-91): (rmail-insert-rmail-file-header)))
+1.1 (roland 13-May-91): ;; If file was not a Babyl file or if there are
+1.1 (roland 13-May-91): ;; Unix format messages added at the end,
+1.1 (roland 13-May-91): ;; convert file as necessary.
+1.1 (roland 13-May-91): (if (or convert
+1.63 (rms 07-Sep-93): (save-excursion
+1.63 (rms 07-Sep-93): (goto-char (point-max))
+1.159 (rms 12-Aug-95): (search-backward "\n\^_")
+1.159 (rms 12-Aug-95): (forward-char 2)
+1.63 (rms 07-Sep-93): (looking-at "\n*From ")))
+1.1 (roland 13-May-91): (let ((buffer-read-only nil))
+1.1 (roland 13-May-91): (message "Converting to Babyl format...")
+1.63 (rms 07-Sep-93): ;; If file needs conversion, convert it all,
+1.63 (rms 07-Sep-93): ;; except for the BABYL header.
+1.63 (rms 07-Sep-93): ;; (rmail-convert-to-babyl-format would delete the header.)
+1.63 (rms 07-Sep-93): (goto-char (point-min))
+1.63 (rms 07-Sep-93): (search-forward "\n\^_" nil t)
+1.64 (rms 11-Sep-93): (narrow-to-region (point) (point-max))
+1.1 (roland 13-May-91): (rmail-convert-to-babyl-format)
+1.247 (handa 20-Feb-98): (message "Converting to Babyl format...done"))
+1.247 (handa 20-Feb-98): (if (and (not rmail-enable-mime)
+1.247 (handa 20-Feb-98): rmail-enable-multibyte)
+1.247 (handa 20-Feb-98): ;; We still have to decode BABYL part.
+1.247 (handa 20-Feb-98): (rmail-decode-babyl-format)))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-insert-rmail-file-header ()
+1.1 (roland 13-May-91): (let ((buffer-read-only nil))
+1.265 (rms 12-May-98): ;; -*-rmail-*- is here so that visiting the file normally
+1.265 (rms 12-May-98): ;; recognizes it as an Rmail file.
+1.1 (roland 13-May-91): (insert "BABYL OPTIONS: -*- rmail -*-
+1.1 (roland 13-May-91): Version: 5
+1.1 (roland 13-May-91): Labels:
+1.1 (roland 13-May-91): Note: This is the header of an rmail file.
+1.1 (roland 13-May-91): Note: If you are seeing it in rmail,
+1.1 (roland 13-May-91): Note: it means the file has no messages in it.\n\^_")))
+1.1 (roland 13-May-91):
+1.361 (lektu 02-Jul-02): ;; Decode Babyl formatted part at the head of current buffer by
+1.247 (handa 20-Feb-98): ;; rmail-file-coding-system, or if it is nil, do auto conversion.
+1.212 (handa 26-Feb-97):
+1.212 (handa 26-Feb-97): (defun rmail-decode-babyl-format ()
+1.212 (handa 26-Feb-97): (let ((modifiedp (buffer-modified-p))
+1.212 (handa 26-Feb-97): (buffer-read-only nil)
+1.265 (rms 12-May-98): (coding-system rmail-file-coding-system)
+1.247 (handa 20-Feb-98): from to)
+1.212 (handa 26-Feb-97): (goto-char (point-min))
+1.265 (rms 12-May-98): (search-forward "\n\^_" nil t) ; Skip BABYL header.
+1.247 (handa 20-Feb-98): (setq from (point))
+1.247 (handa 20-Feb-98): (goto-char (point-max))
+1.247 (handa 20-Feb-98): (search-backward "\n\^_" from 'mv)
+1.247 (handa 20-Feb-98): (setq to (point))
+1.265 (rms 12-May-98): (unless (and coding-system
+1.265 (rms 12-May-98): (coding-system-p coding-system))
+1.349 (eliz 16-Sep-01): (setq coding-system
+1.447 (miles 01-Feb-08): ;; If rmail-file-coding-system is nil, Emacs 21 writes
+1.447 (miles 01-Feb-08): ;; RMAIL files in emacs-mule, Emacs 22 in utf-8, but
+1.447 (miles 01-Feb-08): ;; earlier versions did that with the current buffer's
+1.447 (miles 01-Feb-08): ;; encoding. So we want to favor detection of emacs-mule
+1.447 (miles 01-Feb-08): ;; (whose normal priority is quite low) and utf-8, but
+1.447 (miles 01-Feb-08): ;; still allow detection of other encodings if they won't
+1.447 (miles 01-Feb-08): ;; fit. The call to with-coding-priority below achieves
+1.447 (miles 01-Feb-08): ;; that.
+1.447 (miles 01-Feb-08): (with-coding-priority '(emacs-mule utf-8)
+1.447 (miles 01-Feb-08): (detect-coding-region from to 'highest))))
+1.447 (miles 01-Feb-08): (unless (eq (coding-system-type coding-system) 'undecided)
+1.303 (rms 07-Apr-99): (set-buffer-modified-p t) ; avoid locking when decoding
+1.352 (rms 11-Jan-02): (let ((buffer-undo-list t))
+1.352 (rms 11-Jan-02): (decode-coding-region from to coding-system))
+1.303 (rms 07-Apr-99): (setq coding-system last-coding-system-used))
+1.265 (rms 12-May-98): (set-buffer-modified-p modifiedp)
+1.265 (rms 12-May-98): (setq buffer-file-coding-system nil)
+1.265 (rms 12-May-98): (setq save-buffer-coding-system
+1.265 (rms 12-May-98): (or coding-system 'undecided))))
+1.212 (handa 26-Feb-97):
+1.259 (kwzh 08-Apr-98): (defvar rmail-mode-map nil)
+1.1 (roland 13-May-91): (if rmail-mode-map
+1.1 (roland 13-May-91): nil
+1.1 (roland 13-May-91): (setq rmail-mode-map (make-keymap))
+1.1 (roland 13-May-91): (suppress-keymap rmail-mode-map)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "a" 'rmail-add-label)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "b" 'rmail-bury)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "c" 'rmail-continue)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "d" 'rmail-delete-forward)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\C-d" 'rmail-delete-backward)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "e" 'rmail-edit-current-message)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "f" 'rmail-forward)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "g" 'rmail-get-new-mail)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "h" 'rmail-summary)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "i" 'rmail-input)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "j" 'rmail-show-message)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "k" 'rmail-kill-label)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "l" 'rmail-summary-by-labels)
+1.1 (roland 13-May-91): (define-key rmail-mode-map "\e\C-h" 'rmail-summary)
+1.1 (roland 13-May-91): (define-key rmail-mode-map "\e\C-l" 'rmail-summary-by-labels)
+1.1 (roland 13-May-91): (define-key rmail-mode-map "\e\C-r" 'rmail-summary-by-recipients)
+1.1 (roland 13-May-91): (define-key rmail-mode-map "\e\C-s" 'rmail-summary-by-regexp)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\e\C-t" 'rmail-summary-by-topic)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "m" 'rmail-mail)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\em" 'rmail-retry-failure)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "n" 'rmail-next-undeleted-message)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\en" 'rmail-next-message)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\e\C-n" 'rmail-next-labeled-message)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "o" 'rmail-output-to-rmail-file)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\C-o" 'rmail-output)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "p" 'rmail-previous-undeleted-message)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\ep" 'rmail-previous-message)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\e\C-p" 'rmail-previous-labeled-message)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "q" 'rmail-quit)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "r" 'rmail-reply)
+1.35 (rms 21-Oct-92): ;; I find I can't live without the default M-r command -- rms.
+1.39 (rms 09-Mar-93): ;; (define-key rmail-mode-map "\er" 'rmail-search-backwards)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "s" 'rmail-expunge-and-save)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\es" 'rmail-search)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "t" 'rmail-toggle-header)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "u" 'rmail-undelete-previous-message)
+1.216 (rms 05-Apr-97): (define-key rmail-mode-map "w" 'rmail-output-body-to-file)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "x" 'rmail-expunge)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "." 'rmail-beginning-of-message)
+1.410 (eliz 12-Aug-05): (define-key rmail-mode-map "/" 'rmail-end-of-message)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "<" 'rmail-first-message)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map ">" 'rmail-last-message)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map " " 'scroll-up)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\177" 'scroll-down)
+1.39 (rms 09-Mar-93): (define-key rmail-mode-map "?" 'describe-mode)
+1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-d" 'rmail-sort-by-date)
+1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-s" 'rmail-sort-by-subject)
+1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-a" 'rmail-sort-by-author)
+1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-r" 'rmail-sort-by-recipient)
+1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-c" 'rmail-sort-by-correspondent)
+1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-l" 'rmail-sort-by-lines)
+1.338 (gerd 07-May-01): (define-key rmail-mode-map "\C-c\C-s\C-k" 'rmail-sort-by-labels)
+1.144 (rms 05-Feb-95): (define-key rmail-mode-map "\C-c\C-n" 'rmail-next-same-subject)
+1.144 (rms 05-Feb-95): (define-key rmail-mode-map "\C-c\C-p" 'rmail-previous-same-subject)
+1.39 (rms 09-Mar-93): )
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar] (make-sparse-keymap))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar classify]
+1.50 (rms 22-Jun-93): (cons "Classify" (make-sparse-keymap "Classify")))
+1.50 (rms 22-Jun-93):
+1.92 (rms 23-Mar-94): (define-key rmail-mode-map [menu-bar classify input-menu]
+1.126 (rms 19-Sep-94): nil)
+1.92 (rms 23-Mar-94):
+1.92 (rms 23-Mar-94): (define-key rmail-mode-map [menu-bar classify output-menu]
+1.126 (rms 19-Sep-94): nil)
+1.216 (rms 05-Apr-97):
+1.216 (rms 05-Apr-97): (define-key rmail-mode-map [menu-bar classify output-body]
+1.216 (rms 05-Apr-97): '("Output body to file..." . rmail-output-body-to-file))
+1.92 (rms 23-Mar-94):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar classify output-inbox]
+1.117 (rms 02-Aug-94): '("Output (inbox)..." . rmail-output))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar classify output]
+1.117 (rms 02-Aug-94): '("Output (Rmail)..." . rmail-output-to-rmail-file))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar classify kill-label]
+1.117 (rms 02-Aug-94): '("Kill Label..." . rmail-kill-label))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar classify add-label]
+1.117 (rms 02-Aug-94): '("Add Label..." . rmail-add-label))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary]
+1.50 (rms 22-Jun-93): (cons "Summary" (make-sparse-keymap "Summary")))
+1.50 (rms 22-Jun-93):
+1.156 (rms 30-Jun-95): (define-key rmail-mode-map [menu-bar summary senders]
+1.156 (rms 30-Jun-95): '("By Senders..." . rmail-summary-by-senders))
+1.156 (rms 30-Jun-95):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary labels]
+1.117 (rms 02-Aug-94): '("By Labels..." . rmail-summary-by-labels))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary recipients]
+1.117 (rms 02-Aug-94): '("By Recipients..." . rmail-summary-by-recipients))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary topic]
+1.117 (rms 02-Aug-94): '("By Topic..." . rmail-summary-by-topic))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary regexp]
+1.117 (rms 02-Aug-94): '("By Regexp..." . rmail-summary-by-regexp))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary all]
+1.50 (rms 22-Jun-93): '("All" . rmail-summary))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar mail]
+1.50 (rms 22-Jun-93): (cons "Mail" (make-sparse-keymap "Mail")))
+1.50 (rms 22-Jun-93):
+1.116 (rms 02-Aug-94): (define-key rmail-mode-map [menu-bar mail rmail-get-new-mail]
+1.108 (rms 12-Jul-94): '("Get New Mail" . rmail-get-new-mail))
+1.108 (rms 12-Jul-94):
+1.108 (rms 12-Jul-94): (define-key rmail-mode-map [menu-bar mail lambda]
+1.109 (rms 13-Jul-94): '("----"))
+1.108 (rms 12-Jul-94):
+1.108 (rms 12-Jul-94): (define-key rmail-mode-map [menu-bar mail continue]
+1.50 (rms 22-Jun-93): '("Continue" . rmail-continue))
+1.114 (rms 31-Jul-94):
+1.114 (rms 31-Jul-94): (define-key rmail-mode-map [menu-bar mail resend]
+1.117 (rms 02-Aug-94): '("Re-send..." . rmail-resend))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar mail forward]
+1.50 (rms 22-Jun-93): '("Forward" . rmail-forward))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar mail retry]
+1.50 (rms 22-Jun-93): '("Retry" . rmail-retry-failure))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar mail reply]
+1.50 (rms 22-Jun-93): '("Reply" . rmail-reply))
+1.1 (roland 13-May-91):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar mail mail]
+1.50 (rms 22-Jun-93): '("Mail" . rmail-mail))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar delete]
+1.50 (rms 22-Jun-93): (cons "Delete" (make-sparse-keymap "Delete")))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar delete expunge/save]
+1.50 (rms 22-Jun-93): '("Expunge/Save" . rmail-expunge-and-save))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar delete expunge]
+1.50 (rms 22-Jun-93): '("Expunge" . rmail-expunge))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar delete undelete]
+1.50 (rms 22-Jun-93): '("Undelete" . rmail-undelete-previous-message))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar delete delete]
+1.50 (rms 22-Jun-93): '("Delete" . rmail-delete-forward))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move]
+1.50 (rms 22-Jun-93): (cons "Move" (make-sparse-keymap "Move")))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move search-back]
+1.140 (rms 18-Dec-94): '("Search Back..." . rmail-search-backwards))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move search]
+1.117 (rms 02-Aug-94): '("Search..." . rmail-search))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move previous]
+1.50 (rms 22-Jun-93): '("Previous Nondeleted" . rmail-previous-undeleted-message))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move next]
+1.50 (rms 22-Jun-93): '("Next Nondeleted" . rmail-next-undeleted-message))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move last]
+1.50 (rms 22-Jun-93): '("Last" . rmail-last-message))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move first]
+1.50 (rms 22-Jun-93): '("First" . rmail-first-message))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move previous]
+1.50 (rms 22-Jun-93): '("Previous" . rmail-previous-message))
+1.50 (rms 22-Jun-93):
+1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move next]
+1.50 (rms 22-Jun-93): '("Next" . rmail-next-message))
+1.423 (eliz 25-Mar-06):
+1.423 (eliz 25-Mar-06): ;; Rmail toolbar
+1.423 (eliz 25-Mar-06): (defvar rmail-tool-bar-map
+1.423 (eliz 25-Mar-06): (if (display-graphic-p)
+1.423 (eliz 25-Mar-06): (let ((map (make-sparse-keymap)))
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-get-new-mail "mail/inbox"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-next-undeleted-message "right-arrow"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-previous-undeleted-message "left-arrow"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-search "search"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-input "open"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-mail "mail/compose"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-reply "mail/reply-all"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-forward "mail/forward"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-delete-forward "close"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-output "mail/move"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-output-body-to-file "mail/save"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-expunge "delete"
+1.423 (eliz 25-Mar-06): map rmail-mode-map)
+1.423 (eliz 25-Mar-06): map)))
+1.423 (eliz 25-Mar-06):
+1.423 (eliz 25-Mar-06):
+1.50 (rms 22-Jun-93):
+1.1 (roland 13-May-91): ;; Rmail mode is suitable only for specially formatted data.
+1.1 (roland 13-May-91): (put 'rmail-mode 'mode-class 'special)
+1.1 (roland 13-May-91):
+1.127 (rms 21-Sep-94): (defun rmail-mode-kill-summary ()
+1.127 (rms 21-Sep-94): (if rmail-summary-buffer (kill-buffer rmail-summary-buffer)))
+1.127 (rms 21-Sep-94):
+1.34 (jimb 11-Oct-92): ;;;###autoload
+1.1 (roland 13-May-91): (defun rmail-mode ()
+1.1 (roland 13-May-91): "Rmail Mode is used by \\<rmail-mode-map>\\[rmail] for editing Rmail files.
+1.1 (roland 13-May-91): All normal editing commands are turned off.
+1.1 (roland 13-May-91): Instead, these commands are available:
+1.1 (roland 13-May-91):
+1.410 (eliz 12-Aug-05): \\[rmail-beginning-of-message] Move point to front of this message.
+1.410 (eliz 12-Aug-05): \\[rmail-end-of-message] Move point to bottom of this message.
+1.1 (roland 13-May-91): \\[scroll-up] Scroll to next screen of this message.
+1.1 (roland 13-May-91): \\[scroll-down] Scroll to previous screen of this message.
+1.1 (roland 13-May-91): \\[rmail-next-undeleted-message] Move to Next non-deleted message.
+1.1 (roland 13-May-91): \\[rmail-previous-undeleted-message] Move to Previous non-deleted message.
+1.1 (roland 13-May-91): \\[rmail-next-message] Move to Next message whether deleted or not.
+1.1 (roland 13-May-91): \\[rmail-previous-message] Move to Previous message whether deleted or not.
+1.1 (roland 13-May-91): \\[rmail-first-message] Move to the first message in Rmail file.
+1.1 (roland 13-May-91): \\[rmail-last-message] Move to the last message in Rmail file.
+1.1 (roland 13-May-91): \\[rmail-show-message] Jump to message specified by numeric position in file.
+1.1 (roland 13-May-91): \\[rmail-search] Search for string and show message it is found in.
+1.1 (roland 13-May-91): \\[rmail-delete-forward] Delete this message, move to next nondeleted.
+1.1 (roland 13-May-91): \\[rmail-delete-backward] Delete this message, move to previous nondeleted.
+1.1 (roland 13-May-91): \\[rmail-undelete-previous-message] Undelete message. Tries current message, then earlier messages
+1.1 (roland 13-May-91): till a deleted message is found.
+1.39 (rms 09-Mar-93): \\[rmail-edit-current-message] Edit the current message. \\[rmail-cease-edit] to return to Rmail.
+1.1 (roland 13-May-91): \\[rmail-expunge] Expunge deleted messages.
+1.1 (roland 13-May-91): \\[rmail-expunge-and-save] Expunge and save the file.
+1.1 (roland 13-May-91): \\[rmail-quit] Quit Rmail: expunge, save, then switch to another buffer.
+1.1 (roland 13-May-91): \\[save-buffer] Save without expunging.
+1.40 (rms 29-Mar-93): \\[rmail-get-new-mail] Move new mail from system spool directory into this file.
+1.1 (roland 13-May-91): \\[rmail-mail] Mail a message (same as \\[mail-other-window]).
+1.1 (roland 13-May-91): \\[rmail-continue] Continue composing outgoing message started before.
+1.39 (rms 09-Mar-93): \\[rmail-reply] Reply to this message. Like \\[rmail-mail] but initializes some fields.
+1.39 (rms 09-Mar-93): \\[rmail-retry-failure] Send this message again. Used on a mailer failure message.
+1.1 (roland 13-May-91): \\[rmail-forward] Forward this message to another user.
+1.1 (roland 13-May-91): \\[rmail-output-to-rmail-file] Output this message to an Rmail file (append it).
+1.1 (roland 13-May-91): \\[rmail-output] Output this message to a Unix-format mail file (append it).
+1.258 (stephen 07-Apr-98): \\[rmail-output-body-to-file] Save message body to a file. Default filename comes from Subject line.
+1.1 (roland 13-May-91): \\[rmail-input] Input Rmail file. Run Rmail on that file.
+1.1 (roland 13-May-91): \\[rmail-add-label] Add label to message. It will be displayed in the mode line.
+1.1 (roland 13-May-91): \\[rmail-kill-label] Kill label. Remove a label from current message.
+1.1 (roland 13-May-91): \\[rmail-next-labeled-message] Move to Next message with specified label
+1.1 (roland 13-May-91): (label defaults to last one specified).
+1.1 (roland 13-May-91): Standard labels: filed, unseen, answered, forwarded, deleted.
+1.39 (rms 09-Mar-93): Any other label is present only if you add it with \\[rmail-add-label].
+1.1 (roland 13-May-91): \\[rmail-previous-labeled-message] Move to Previous message with specified label
+1.1 (roland 13-May-91): \\[rmail-summary] Show headers buffer, with a one line summary of each message.
+1.39 (rms 09-Mar-93): \\[rmail-summary-by-labels] Summarize only messages with particular label(s).
+1.39 (rms 09-Mar-93): \\[rmail-summary-by-recipients] Summarize only messages with particular recipient(s).
+1.39 (rms 09-Mar-93): \\[rmail-summary-by-regexp] Summarize only messages with particular regexp(s).
+1.39 (rms 09-Mar-93): \\[rmail-summary-by-topic] Summarize only messages with subject line regexp(s).
+1.39 (rms 09-Mar-93): \\[rmail-toggle-header] Toggle display of complete header."
+1.1 (roland 13-May-91): (interactive)
+1.340 (gerd 17-May-01): (let ((finding-rmail-file (not (eq major-mode 'rmail-mode))))
+1.340 (gerd 17-May-01): (rmail-mode-2)
+1.340 (gerd 17-May-01): (when (and finding-rmail-file
+1.340 (gerd 17-May-01): (null coding-system-for-read)
+1.340 (gerd 17-May-01): default-enable-multibyte-characters)
+1.340 (gerd 17-May-01): (let ((rmail-enable-multibyte t))
+1.340 (gerd 17-May-01): (rmail-require-mime-maybe)
+1.340 (gerd 17-May-01): (rmail-convert-file)
+1.340 (gerd 17-May-01): (goto-char (point-max))
+1.340 (gerd 17-May-01): (set-buffer-multibyte t)))
+1.340 (gerd 17-May-01): (rmail-set-message-counters)
+1.340 (gerd 17-May-01): (rmail-show-message rmail-total-messages)
+1.340 (gerd 17-May-01): (when finding-rmail-file
+1.340 (gerd 17-May-01): (when rmail-display-summary
+1.340 (gerd 17-May-01): (rmail-summary))
+1.340 (gerd 17-May-01): (rmail-construct-io-menu))
+1.404 (lute 26-May-05): (run-mode-hooks 'rmail-mode-hook)))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-mode-2 ()
+1.1 (roland 13-May-91): (kill-all-local-variables)
+1.1 (roland 13-May-91): (rmail-mode-1)
+1.259 (kwzh 08-Apr-98): (rmail-perm-variables)
+1.200 (rms 12-Oct-96): (rmail-variables))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-mode-1 ()
+1.1 (roland 13-May-91): (setq major-mode 'rmail-mode)
+1.1 (roland 13-May-91): (setq mode-name "RMAIL")
+1.1 (roland 13-May-91): (setq buffer-read-only t)
+1.75 (rms 24-Dec-93): ;; No need to auto save RMAIL files in normal circumstances
+1.75 (rms 24-Dec-93): ;; because they contain no info except attribute changes
+1.75 (rms 24-Dec-93): ;; and deletion of messages.
+1.75 (rms 24-Dec-93): ;; The one exception is when messages are copied into an Rmail mode buffer.
+1.75 (rms 24-Dec-93): ;; rmail-output-to-rmail-file enables auto save when you do that.
+1.1 (roland 13-May-91): (setq buffer-auto-save-file-name nil)
+1.235 (rms 26-Aug-97): (setq mode-line-modified "--")
+1.1 (roland 13-May-91): (use-local-map rmail-mode-map)
+1.1 (roland 13-May-91): (set-syntax-table text-mode-syntax-table)
+1.1 (roland 13-May-91): (setq local-abbrev-table text-mode-abbrev-table))
+1.1 (roland 13-May-91):
+1.259 (kwzh 08-Apr-98): ;; Set up the permanent locals associated with an Rmail file.
+1.259 (kwzh 08-Apr-98): (defun rmail-perm-variables ()
+1.1 (roland 13-May-91): (make-local-variable 'rmail-last-label)
+1.39 (rms 09-Mar-93): (make-local-variable 'rmail-last-regexp)
+1.1 (roland 13-May-91): (make-local-variable 'rmail-deleted-vector)
+1.212 (handa 26-Feb-97): (make-local-variable 'rmail-buffer)
+1.212 (handa 26-Feb-97): (setq rmail-buffer (current-buffer))
+1.212 (handa 26-Feb-97): (make-local-variable 'rmail-view-buffer)
+1.212 (handa 26-Feb-97): (setq rmail-view-buffer rmail-buffer)
+1.1 (roland 13-May-91): (make-local-variable 'rmail-summary-buffer)
+1.1 (roland 13-May-91): (make-local-variable 'rmail-summary-vector)
+1.1 (roland 13-May-91): (make-local-variable 'rmail-current-message)
+1.1 (roland 13-May-91): (make-local-variable 'rmail-total-messages)
+1.98 (rms 24-Apr-94): (make-local-variable 'rmail-overlay-list)
+1.98 (rms 24-Apr-94): (setq rmail-overlay-list nil)
+1.1 (roland 13-May-91): (make-local-variable 'rmail-message-vector)
+1.218 (rms 02-May-97): (make-local-variable 'rmail-msgref-vector)
+1.1 (roland 13-May-91): (make-local-variable 'rmail-inbox-list)
+1.1 (roland 13-May-91): (setq rmail-inbox-list (rmail-parse-file-inboxes))
+1.47 (rms 07-Jun-93): ;; Provide default set of inboxes for primary mail file ~/RMAIL.
+1.47 (rms 07-Jun-93): (and (null rmail-inbox-list)
+1.54 (rms 06-Jul-93): (or (equal buffer-file-name (expand-file-name rmail-file-name))
+1.72 (rms 26-Nov-93): (equal buffer-file-truename
+1.72 (rms 26-Nov-93): (abbreviate-file-name (file-truename rmail-file-name))))
+1.47 (rms 07-Jun-93): (setq rmail-inbox-list
+1.47 (rms 07-Jun-93): (or rmail-primary-inbox-list
+1.47 (rms 07-Jun-93): (list (or (getenv "MAIL")
+1.47 (rms 07-Jun-93): (concat rmail-spool-directory
+1.86 (kwzh 11-Feb-94): (user-login-name)))))))
+1.1 (roland 13-May-91): (make-local-variable 'rmail-keywords)
+1.423 (eliz 25-Mar-06): (set (make-local-variable 'tool-bar-map) rmail-tool-bar-map)
+1.1 (roland 13-May-91): ;; this gets generated as needed
+1.104 (rms 19-May-94): (setq rmail-keywords nil))
+1.1 (roland 13-May-91):
+1.259 (kwzh 08-Apr-98): ;; Set up the non-permanent locals associated with Rmail mode.
+1.259 (kwzh 08-Apr-98): (defun rmail-variables ()
+1.265 (rms 12-May-98): (make-local-variable 'save-buffer-coding-system)
+1.265 (rms 12-May-98): ;; If we don't already have a value for save-buffer-coding-system,
+1.265 (rms 12-May-98): ;; get it from buffer-file-coding-system, and clear that
+1.265 (rms 12-May-98): ;; because it should be determined in rmail-show-message.
+1.265 (rms 12-May-98): (unless save-buffer-coding-system
+1.265 (rms 12-May-98): (setq save-buffer-coding-system (or buffer-file-coding-system 'undecided))
+1.265 (rms 12-May-98): (setq buffer-file-coding-system nil))
+1.259 (kwzh 08-Apr-98): ;; Don't let a local variables list in a message cause confusion.
+1.276 (rms 13-Jun-98): (make-local-variable 'local-enable-local-variables)
+1.276 (rms 13-Jun-98): (setq local-enable-local-variables nil)
+1.259 (kwzh 08-Apr-98): (make-local-variable 'revert-buffer-function)
+1.259 (kwzh 08-Apr-98): (setq revert-buffer-function 'rmail-revert)
+1.259 (kwzh 08-Apr-98): (make-local-variable 'font-lock-defaults)
+1.259 (kwzh 08-Apr-98): (setq font-lock-defaults
+1.265 (rms 12-May-98): '(rmail-font-lock-keywords
+1.367 (rms 06-Jan-03): t t nil nil
+1.265 (rms 12-May-98): (font-lock-maximum-size . nil)
+1.265 (rms 12-May-98): (font-lock-fontify-buffer-function . rmail-fontify-buffer-function)
+1.265 (rms 12-May-98): (font-lock-unfontify-buffer-function . rmail-unfontify-buffer-function)
+1.265 (rms 12-May-98): (font-lock-inhibit-thing-lock . (lazy-lock-mode fast-lock-mode))))
+1.259 (kwzh 08-Apr-98): (make-local-variable 'require-final-newline)
+1.259 (kwzh 08-Apr-98): (setq require-final-newline nil)
+1.259 (kwzh 08-Apr-98): (make-local-variable 'version-control)
+1.259 (kwzh 08-Apr-98): (setq version-control 'never)
+1.259 (kwzh 08-Apr-98): (make-local-variable 'kill-buffer-hook)
+1.259 (kwzh 08-Apr-98): (add-hook 'kill-buffer-hook 'rmail-mode-kill-summary)
+1.259 (kwzh 08-Apr-98): (make-local-variable 'file-precious-flag)
+1.391 (lh 26-Apr-04): (setq file-precious-flag t)
+1.391 (lh 26-Apr-04): (make-local-variable 'desktop-save-buffer)
+1.391 (lh 26-Apr-04): (setq desktop-save-buffer t))
+1.259 (kwzh 08-Apr-98):
+1.1 (roland 13-May-91): ;; Handle M-x revert-buffer done in an rmail-mode buffer.
+1.1 (roland 13-May-91): (defun rmail-revert (arg noconfirm)
+1.342 (gerd 31-May-01): (set-buffer rmail-buffer)
+1.280 (rms 09-Jul-98): (let* ((revert-buffer-function (default-value 'revert-buffer-function))
+1.280 (rms 09-Jul-98): (rmail-enable-multibyte enable-multibyte-characters)
+1.280 (rms 09-Jul-98): ;; See similar code in `rmail'.
+1.280 (rms 09-Jul-98): (coding-system-for-read (and rmail-enable-multibyte 'raw-text)))
+1.1 (roland 13-May-91): ;; Call our caller again, but this time it does the default thing.
+1.1 (roland 13-May-91): (if (revert-buffer arg noconfirm)
+1.1 (roland 13-May-91): ;; If the user said "yes", and we changed something,
+1.1 (roland 13-May-91): ;; reparse the messages.
+1.243 (rms 19-Jan-98): (progn
+1.342 (gerd 31-May-01): (set-buffer rmail-buffer)
+1.342 (gerd 31-May-01): (rmail-mode-2)
+1.280 (rms 09-Jul-98): ;; Convert all or part to Babyl file if possible.
+1.1 (roland 13-May-91): (rmail-convert-file)
+1.280 (rms 09-Jul-98): ;; We have read the file as raw-text, so the buffer is set to
+1.280 (rms 09-Jul-98): ;; unibyte. Make it multibyte if necessary.
+1.280 (rms 09-Jul-98): (if (and rmail-enable-multibyte
+1.280 (rms 09-Jul-98): (not enable-multibyte-characters))
+1.280 (rms 09-Jul-98): (set-buffer-multibyte t))
+1.1 (roland 13-May-91): (goto-char (point-max))
+1.280 (rms 09-Jul-98): (rmail-set-message-counters)
+1.280 (rms 09-Jul-98): (rmail-show-message rmail-total-messages)
+1.280 (rms 09-Jul-98): (run-hooks 'rmail-mode-hook)))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; Return a list of files from this buffer's Mail: option.
+1.1 (roland 13-May-91): ;; Does not assume that messages have been parsed.
+1.1 (roland 13-May-91): ;; Just returns nil if buffer does not look like Babyl format.
+1.1 (roland 13-May-91): (defun rmail-parse-file-inboxes ()
+1.1 (roland 13-May-91): (save-excursion
+1.1 (roland 13-May-91): (save-restriction
+1.1 (roland 13-May-91): (widen)
+1.1 (roland 13-May-91): (goto-char 1)
+1.1 (roland 13-May-91): (cond ((looking-at "BABYL OPTIONS:")
+1.1 (roland 13-May-91): (search-forward "\n\^_" nil 'move)
+1.1 (roland 13-May-91): (narrow-to-region 1 (point))
+1.1 (roland 13-May-91): (goto-char 1)
+1.1 (roland 13-May-91): (if (search-forward "\nMail:" nil t)
+1.1 (roland 13-May-91): (progn
+1.1 (roland 13-May-91): (narrow-to-region (point) (progn (end-of-line) (point)))
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.1 (roland 13-May-91): (mail-parse-comma-list))))))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-expunge-and-save ()
+1.1 (roland 13-May-91): "Expunge and save RMAIL file."
+1.1 (roland 13-May-91): (interactive)
+1.1 (roland 13-May-91): (rmail-expunge)
+1.339 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.85 (kwzh 09-Feb-94): (save-buffer)
+1.85 (kwzh 09-Feb-94): (if (rmail-summary-exists)
+1.85 (kwzh 09-Feb-94): (rmail-select-summary (set-buffer-modified-p nil))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-quit ()
+1.294 (rms 18-Jan-99): "Quit out of RMAIL.
+1.294 (rms 18-Jan-99): Hook `rmail-quit-hook' is run after expunging."
+1.1 (roland 13-May-91): (interactive)
+1.1 (roland 13-May-91): (rmail-expunge-and-save)
+1.294 (rms 18-Jan-99): (when (boundp 'rmail-quit-hook)
+1.294 (rms 18-Jan-99): (run-hooks 'rmail-quit-hook))
+1.1 (roland 13-May-91): ;; Don't switch to the summary buffer even if it was recently visible.
+1.251 (rms 08-Mar-98): (when rmail-summary-buffer
+1.251 (rms 08-Mar-98): (replace-buffer-in-windows rmail-summary-buffer)
+1.251 (rms 08-Mar-98): (bury-buffer rmail-summary-buffer))
+1.339 (gerd 08-May-01): (if rmail-enable-mime
+1.339 (gerd 08-May-01): (let ((obuf rmail-buffer)
+1.339 (gerd 08-May-01): (ovbuf rmail-view-buffer))
+1.339 (gerd 08-May-01): (set-buffer rmail-view-buffer)
+1.339 (gerd 08-May-01): (quit-window)
+1.339 (gerd 08-May-01): (replace-buffer-in-windows ovbuf)
+1.339 (gerd 08-May-01): (replace-buffer-in-windows obuf)
+1.339 (gerd 08-May-01): (bury-buffer obuf))
+1.339 (gerd 08-May-01): (let ((obuf (current-buffer)))
+1.339 (gerd 08-May-01): (quit-window)
+1.339 (gerd 08-May-01): (replace-buffer-in-windows obuf))))
+1.1 (roland 13-May-91):
+1.147 (rms 12-Mar-95): (defun rmail-bury ()
+1.147 (rms 12-Mar-95): "Bury current Rmail buffer and its summary buffer."
+1.147 (rms 12-Mar-95): (interactive)
+1.147 (rms 12-Mar-95): ;; This let var was called rmail-buffer, but that interfered
+1.147 (rms 12-Mar-95): ;; with the buffer-local var used in summary buffers.
+1.147 (rms 12-Mar-95): (let ((buffer-to-bury (current-buffer)))
+1.147 (rms 12-Mar-95): (if (rmail-summary-exists)
+1.147 (rms 12-Mar-95): (let (window)
+1.147 (rms 12-Mar-95): (while (setq window (get-buffer-window rmail-summary-buffer))
+1.251 (rms 08-Mar-98): (quit-window nil window))
+1.147 (rms 12-Mar-95): (bury-buffer rmail-summary-buffer)))
+1.251 (rms 08-Mar-98): (quit-window)))
+1.147 (rms 12-Mar-95):
+1.147 (rms 12-Mar-95): (defun rmail-duplicate-message ()
+1.147 (rms 12-Mar-95): "Create a duplicated copy of the current message.
+1.147 (rms 12-Mar-95): The duplicate copy goes into the Rmail file just after the
+1.147 (rms 12-Mar-95): original copy."
+1.147 (rms 12-Mar-95): (interactive)
+1.147 (rms 12-Mar-95): (widen)
+1.147 (rms 12-Mar-95): (let ((buffer-read-only nil)
+1.147 (rms 12-Mar-95): (number rmail-current-message)
+1.147 (rms 12-Mar-95): (string (buffer-substring (rmail-msgbeg rmail-current-message)
+1.147 (rms 12-Mar-95): (rmail-msgend rmail-current-message))))
+1.147 (rms 12-Mar-95): (goto-char (rmail-msgend rmail-current-message))
+1.147 (rms 12-Mar-95): (insert string)
+1.147 (rms 12-Mar-95): (rmail-forget-messages)
+1.147 (rms 12-Mar-95): (rmail-show-message number)
+1.147 (rms 12-Mar-95): (message "Message duplicated")))
+1.147 (rms 12-Mar-95):
+1.1 (roland 13-May-91): ;;;###autoload
+1.1 (roland 13-May-91): (defun rmail-input (filename)
+1.39 (rms 09-Mar-93): "Run Rmail on file FILENAME."
+1.1 (roland 13-May-91): (interactive "FRun rmail on RMAIL file: ")
+1.1 (roland 13-May-91): (rmail filename))
+1.1 (roland 13-May-91):
+1.198 (rms 19-Sep-96):
+1.198 (rms 19-Sep-96): ;; This used to scan subdirectories recursively, but someone pointed out
+1.198 (rms 19-Sep-96): ;; that if the user wants that, person can put all the files in one dir.
+1.198 (rms 19-Sep-96): ;; And the recursive scan was slow. So I took it out.
+1.198 (rms 19-Sep-96): ;; rms, Sep 1996.
+1.126 (rms 19-Sep-94): (defun rmail-find-all-files (start)
+1.198 (rms 19-Sep-96): "Return list of file in dir START that match `rmail-secondary-file-regexp'."
+1.126 (rms 19-Sep-94): (if (file-accessible-directory-p start)
+1.135 (rms 11-Oct-94): ;; Don't sort here.
+1.198 (rms 19-Sep-96): (let* ((case-fold-search t)
+1.198 (rms 19-Sep-96): (files (directory-files start t rmail-secondary-file-regexp)))
+1.135 (rms 11-Oct-94): ;; Sort here instead of in directory-files
+1.135 (rms 11-Oct-94): ;; because this list is usually much shorter.
+1.198 (rms 19-Sep-96): (sort files 'string<))))
+1.126 (rms 19-Sep-94):
+1.126 (rms 19-Sep-94): (defun rmail-list-to-menu (menu-name l action &optional full-name)
+1.126 (rms 19-Sep-94): (let ((menu (make-sparse-keymap menu-name)))
+1.440 (gm 12-Oct-07): (mapc
+1.126 (rms 19-Sep-94): (function (lambda (item)
+1.148 (rms 12-Mar-95): (let (command)
+1.148 (rms 12-Mar-95): (if (consp item)
+1.148 (rms 12-Mar-95): (progn
+1.148 (rms 12-Mar-95): (setq command
+1.358 (pot 06-May-02): (rmail-list-to-menu (car item) (cdr item)
+1.358 (pot 06-May-02): action
+1.148 (rms 12-Mar-95): (if full-name
+1.148 (rms 12-Mar-95): (concat full-name "/"
+1.148 (rms 12-Mar-95): (car item))
+1.148 (rms 12-Mar-95): (car item))))
+1.148 (rms 12-Mar-95): (setq name (car item)))
+1.126 (rms 19-Sep-94): (progn
+1.148 (rms 12-Mar-95): (setq name item)
+1.358 (pot 06-May-02): (setq command
+1.148 (rms 12-Mar-95): (list 'lambda () '(interactive)
+1.148 (rms 12-Mar-95): (list action
+1.358 (pot 06-May-02): (expand-file-name
+1.148 (rms 12-Mar-95): (if full-name
+1.148 (rms 12-Mar-95): (concat full-name "/" item)
+1.148 (rms 12-Mar-95): item)
+1.148 (rms 12-Mar-95): rmail-secondary-file-directory))))))
+1.148 (rms 12-Mar-95): (define-key menu (vector (intern name))
+1.148 (rms 12-Mar-95): (cons name command)))))
+1.135 (rms 11-Oct-94): (reverse l))
+1.126 (rms 19-Sep-94): menu))
+1.358 (pot 06-May-02):
+1.135 (rms 11-Oct-94): ;; This command is always "disabled" when it appears in a menu.
+1.135 (rms 11-Oct-94): (put 'rmail-disable-menu 'menu-enable ''nil)
+1.135 (rms 11-Oct-94):
+1.126 (rms 19-Sep-94): (defun rmail-construct-io-menu ()
+1.126 (rms 19-Sep-94): (let ((files (rmail-find-all-files rmail-secondary-file-directory)))
+1.135 (rms 11-Oct-94): (if files
+1.126 (rms 19-Sep-94): (progn
+1.126 (rms 19-Sep-94): (define-key rmail-mode-map [menu-bar classify input-menu]
+1.358 (pot 06-May-02): (cons "Input Rmail File"
+1.358 (pot 06-May-02): (rmail-list-to-menu "Input Rmail File"
+1.135 (rms 11-Oct-94): files
+1.126 (rms 19-Sep-94): 'rmail-input)))
+1.126 (rms 19-Sep-94): (define-key rmail-mode-map [menu-bar classify output-menu]
+1.358 (pot 06-May-02): (cons "Output Rmail File"
+1.358 (pot 06-May-02): (rmail-list-to-menu "Output Rmail File"
+1.135 (rms 11-Oct-94): files
+1.135 (rms 11-Oct-94): 'rmail-output-to-rmail-file))))
+1.135 (rms 11-Oct-94):
+1.135 (rms 11-Oct-94): (define-key rmail-mode-map [menu-bar classify input-menu]
+1.135 (rms 11-Oct-94): '("Input Rmail File" . rmail-disable-menu))
+1.135 (rms 11-Oct-94): (define-key rmail-mode-map [menu-bar classify output-menu]
+1.135 (rms 11-Oct-94): '("Output Rmail File" . rmail-disable-menu)))))
+1.102 (rms 04-May-94):
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;;;; *** Rmail input ***
+1.1 (roland 13-May-91):
+1.443 (dann 27-Nov-07): (declare-function rmail-spam-filter "rmail-spam-filter" (msg))
+1.443 (dann 27-Nov-07): (declare-function rmail-summary-goto-msg "rmailsum" (&optional n nowarn skip-rmail))
+1.443 (dann 27-Nov-07): (declare-function rmail-summary-mark-undeleted "rmailsum" (n))
+1.443 (dann 27-Nov-07): (declare-function rmail-summary-mark-deleted "rmailsum" (&optional n undel))
+1.443 (dann 27-Nov-07): (declare-function rfc822-addresses "rfc822" (header-text))
+1.443 (dann 27-Nov-07): (declare-function mail-abbrev-make-syntax-table "mailabbrev.el" ())
+1.443 (dann 27-Nov-07): (declare-function mail-sendmail-delimit-header "sendmail" ())
+1.443 (dann 27-Nov-07): (declare-function mail-header-end "sendmail" ())
+1.443 (dann 27-Nov-07):
+1.1 (roland 13-May-91): ;; RLK feature not added in this version:
+1.1 (roland 13-May-91): ;; argument specifies inbox file or files in various ways.
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-get-new-mail (&optional file-name)
+1.1 (roland 13-May-91): "Move any new mail from this RMAIL file's inbox files.
+1.1 (roland 13-May-91): The inbox files can be specified with the file's Mail: option. The
+1.1 (roland 13-May-91): variable `rmail-primary-inbox-list' specifies the inboxes for your
+1.40 (rms 29-Mar-93): primary RMAIL file if it has no Mail: option. By default, this is
+1.40 (rms 29-Mar-93): your /usr/spool/mail/$USER.
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): You can also specify the file to get new mail from. In this case, the
+1.1 (roland 13-May-91): file of new mail is not changed or deleted. Noninteractively, you can
+1.1 (roland 13-May-91): pass the inbox file name as an argument. Interactively, a prefix
+1.124 (rms 05-Sep-94): argument causes us to read a file name and use that file as the inbox.
+1.124 (rms 05-Sep-94):
+1.205 (rms 21-Jan-97): If the variable `rmail-preserve-inbox' is non-nil, new mail will
+1.205 (rms 21-Jan-97): always be left in inbox files rather than deleted.
+1.205 (rms 21-Jan-97):
+1.138 (rms 03-Dec-94): This function runs `rmail-get-new-mail-hook' before saving the updated file.
+1.138 (rms 03-Dec-94): It returns t if it got any new messages."
+1.1 (roland 13-May-91): (interactive
+1.1 (roland 13-May-91): (list (if current-prefix-arg
+1.1 (roland 13-May-91): (read-file-name "Get new mail from file: "))))
+1.190 (rms 28-Jun-96): (run-hooks 'rmail-before-get-new-mail-hook)
+1.152 (rms 24-Apr-95): ;; If the disk file has been changed from under us,
+1.152 (rms 24-Apr-95): ;; revert to it before we get new mail.
+1.1 (roland 13-May-91): (or (verify-visited-file-modtime (current-buffer))
+1.152 (rms 24-Apr-95): (find-file (buffer-file-name)))
+1.339 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.1 (roland 13-May-91): (rmail-maybe-set-message-counters)
+1.1 (roland 13-May-91): (widen)
+1.1 (roland 13-May-91): ;; Get rid of all undo records for this buffer.
+1.1 (roland 13-May-91): (or (eq buffer-undo-list t)
+1.1 (roland 13-May-91): (setq buffer-undo-list nil))
+1.198 (rms 19-Sep-96): (let ((all-files (if file-name (list file-name)
+1.237 (kwzh 15-Oct-97): rmail-inbox-list))
+1.247 (handa 20-Feb-98): (rmail-enable-multibyte (default-value 'enable-multibyte-characters))
+1.237 (kwzh 15-Oct-97): found)
+1.198 (rms 19-Sep-96): (unwind-protect
+1.237 (kwzh 15-Oct-97): (progn
+1.206 (kwzh 25-Jan-97): (while all-files
+1.206 (kwzh 25-Jan-97): (let ((opoint (point))
+1.206 (kwzh 25-Jan-97): (new-messages 0)
+1.380 (uid65566 16-Jan-04): (rsf-number-of-spam 0)
+1.206 (kwzh 25-Jan-97): (delete-files ())
+1.206 (kwzh 25-Jan-97): ;; If buffer has not changed yet, and has not been saved yet,
+1.206 (kwzh 25-Jan-97): ;; don't replace the old backup file now.
+1.206 (kwzh 25-Jan-97): (make-backup-files (and make-backup-files (buffer-modified-p)))
+1.206 (kwzh 25-Jan-97): (buffer-read-only nil)
+1.206 (kwzh 25-Jan-97): ;; Don't make undo records for what we do in getting mail.
+1.206 (kwzh 25-Jan-97): (buffer-undo-list t)
+1.206 (kwzh 25-Jan-97): success
+1.206 (kwzh 25-Jan-97): ;; Files to insert this time around.
+1.206 (kwzh 25-Jan-97): files
+1.206 (kwzh 25-Jan-97): ;; Last names of those files.
+1.206 (kwzh 25-Jan-97): file-last-names)
+1.206 (kwzh 25-Jan-97): ;; Pull files off all-files onto files
+1.206 (kwzh 25-Jan-97): ;; as long as there is no name conflict.
+1.206 (kwzh 25-Jan-97): ;; A conflict happens when two inbox file names
+1.206 (kwzh 25-Jan-97): ;; have the same last component.
+1.206 (kwzh 25-Jan-97): (while (and all-files
+1.206 (kwzh 25-Jan-97): (not (member (file-name-nondirectory (car all-files))
+1.206 (kwzh 25-Jan-97): file-last-names)))
+1.206 (kwzh 25-Jan-97): (setq files (cons (car all-files) files)
+1.206 (kwzh 25-Jan-97): file-last-names
+1.206 (kwzh 25-Jan-97): (cons (file-name-nondirectory (car all-files)) files))
+1.206 (kwzh 25-Jan-97): (setq all-files (cdr all-files)))
+1.206 (kwzh 25-Jan-97): ;; Put them back in their original order.
+1.206 (kwzh 25-Jan-97): (setq files (nreverse files))
+1.198 (rms 19-Sep-96):
+1.206 (kwzh 25-Jan-97): (goto-char (point-max))
+1.206 (kwzh 25-Jan-97): (skip-chars-backward " \t\n") ; just in case of brain damage
+1.206 (kwzh 25-Jan-97): (delete-region (point) (point-max)) ; caused by require-final-newline
+1.206 (kwzh 25-Jan-97): (save-excursion
+1.206 (kwzh 25-Jan-97): (save-restriction
+1.206 (kwzh 25-Jan-97): (narrow-to-region (point) (point))
+1.206 (kwzh 25-Jan-97): ;; Read in the contents of the inbox files,
+1.206 (kwzh 25-Jan-97): ;; renaming them as necessary,
+1.206 (kwzh 25-Jan-97): ;; and adding to the list of files to delete eventually.
+1.206 (kwzh 25-Jan-97): (if file-name
+1.206 (kwzh 25-Jan-97): (rmail-insert-inbox-text files nil)
+1.206 (kwzh 25-Jan-97): (setq delete-files (rmail-insert-inbox-text files t)))
+1.206 (kwzh 25-Jan-97): ;; Scan the new text and convert each message to babyl format.
+1.206 (kwzh 25-Jan-97): (goto-char (point-min))
+1.206 (kwzh 25-Jan-97): (unwind-protect
+1.206 (kwzh 25-Jan-97): (save-excursion
+1.206 (kwzh 25-Jan-97): (setq new-messages (rmail-convert-to-babyl-format)
+1.206 (kwzh 25-Jan-97): success t))
+1.290 (rms 21-Oct-98): ;; Try to delete the garbage just inserted.
+1.290 (rms 21-Oct-98): (or success (delete-region (point-min) (point-max)))
+1.206 (kwzh 25-Jan-97): ;; If we could not convert the file's inboxes,
+1.206 (kwzh 25-Jan-97): ;; rename the files we tried to read
+1.206 (kwzh 25-Jan-97): ;; so we won't over and over again.
+1.206 (kwzh 25-Jan-97): (if (and (not file-name) (not success))
+1.206 (kwzh 25-Jan-97): (let ((delfiles delete-files)
+1.206 (kwzh 25-Jan-97): (count 0))
+1.206 (kwzh 25-Jan-97): (while delfiles
+1.206 (kwzh 25-Jan-97): (while (file-exists-p (format "RMAILOSE.%d" count))
+1.206 (kwzh 25-Jan-97): (setq count (1+ count)))
+1.206 (kwzh 25-Jan-97): (rename-file (car delfiles)
+1.206 (kwzh 25-Jan-97): (format "RMAILOSE.%d" count))
+1.206 (kwzh 25-Jan-97): (setq delfiles (cdr delfiles))))))
+1.206 (kwzh 25-Jan-97): (or (zerop new-messages)
+1.206 (kwzh 25-Jan-97): (let (success)
+1.206 (kwzh 25-Jan-97): (widen)
+1.206 (kwzh 25-Jan-97): (search-backward "\n\^_" nil t)
+1.206 (kwzh 25-Jan-97): (narrow-to-region (point) (point-max))
+1.206 (kwzh 25-Jan-97): (goto-char (1+ (point-min)))
+1.206 (kwzh 25-Jan-97): (rmail-count-new-messages)
+1.206 (kwzh 25-Jan-97): (run-hooks 'rmail-get-new-mail-hook)
+1.206 (kwzh 25-Jan-97): (save-buffer)))
+1.206 (kwzh 25-Jan-97): ;; Delete the old files, now that babyl file is saved.
+1.206 (kwzh 25-Jan-97): (while delete-files
+1.206 (kwzh 25-Jan-97): (condition-case ()
+1.206 (kwzh 25-Jan-97): ;; First, try deleting.
+1.206 (kwzh 25-Jan-97): (condition-case ()
+1.206 (kwzh 25-Jan-97): (delete-file (car delete-files))
+1.206 (kwzh 25-Jan-97): (file-error
+1.206 (kwzh 25-Jan-97): ;; If we can't delete it, truncate it.
+1.206 (kwzh 25-Jan-97): (write-region (point) (point) (car delete-files))))
+1.206 (kwzh 25-Jan-97): (file-error nil))
+1.206 (kwzh 25-Jan-97): (setq delete-files (cdr delete-files)))))
+1.206 (kwzh 25-Jan-97): (if (= new-messages 0)
+1.206 (kwzh 25-Jan-97): (progn (goto-char opoint)
+1.206 (kwzh 25-Jan-97): (if (or file-name rmail-inbox-list)
+1.206 (kwzh 25-Jan-97): (message "(No new mail has arrived)")))
+1.380 (uid65566 16-Jan-04): ;; check new messages to see if any of them is spam:
+1.385 (uid65627 17-Feb-04): (if (and (featurep 'rmail-spam-filter)
+1.385 (uid65627 17-Feb-04): rmail-use-spam-filter)
+1.380 (uid65566 16-Jan-04): (let*
+1.380 (uid65566 16-Jan-04): ((old-messages (- rmail-total-messages new-messages))
+1.380 (uid65566 16-Jan-04): (rsf-scanned-message-number (1+ old-messages))
+1.380 (uid65566 16-Jan-04): ;; save deletion flags of old messages: vector starts
+1.380 (uid65566 16-Jan-04): ;; at zero (is one longer that no of messages),
+1.380 (uid65566 16-Jan-04): ;; therefore take 1+ old-messages
+1.380 (uid65566 16-Jan-04): (save-deleted
+1.380 (uid65566 16-Jan-04): (substring rmail-deleted-vector 0 (1+
+1.380 (uid65566 16-Jan-04): old-messages))))
+1.380 (uid65566 16-Jan-04): ;; set all messages to undeleted
+1.380 (uid65566 16-Jan-04): (setq rmail-deleted-vector
+1.380 (uid65566 16-Jan-04): (make-string (1+ rmail-total-messages) ?\ ))
+1.380 (uid65566 16-Jan-04): (while (<= rsf-scanned-message-number
+1.380 (uid65566 16-Jan-04): rmail-total-messages)
+1.380 (uid65566 16-Jan-04): (progn
+1.380 (uid65566 16-Jan-04): (if (not (rmail-spam-filter rsf-scanned-message-number))
+1.380 (uid65566 16-Jan-04): (progn (setq rsf-number-of-spam (1+ rsf-number-of-spam)))
+1.380 (uid65566 16-Jan-04): )
+1.380 (uid65566 16-Jan-04): (setq rsf-scanned-message-number (1+ rsf-scanned-message-number))
+1.380 (uid65566 16-Jan-04): ))
+1.380 (uid65566 16-Jan-04): (if (> rsf-number-of-spam 0)
+1.380 (uid65566 16-Jan-04): (progn
+1.380 (uid65566 16-Jan-04): (when (rmail-expunge-confirmed)
+1.380 (uid65566 16-Jan-04): (rmail-only-expunge t))
+1.380 (uid65566 16-Jan-04): ))
+1.380 (uid65566 16-Jan-04): (setq rmail-deleted-vector
+1.380 (uid65566 16-Jan-04): (concat
+1.380 (uid65566 16-Jan-04): save-deleted
+1.380 (uid65566 16-Jan-04): (make-string (- rmail-total-messages old-messages)
+1.380 (uid65566 16-Jan-04): ?\ )))
+1.380 (uid65566 16-Jan-04): ))
+1.380 (uid65566 16-Jan-04): (if (rmail-summary-exists)
+1.206 (kwzh 25-Jan-97): (rmail-select-summary
+1.206 (kwzh 25-Jan-97): (rmail-update-summary)))
+1.380 (uid65566 16-Jan-04): (message "%d new message%s read%s"
+1.380 (uid65566 16-Jan-04): new-messages (if (= 1 new-messages) "" "s")
+1.380 (uid65566 16-Jan-04): ;; print out a message on number of spam messages found:
+1.385 (uid65627 17-Feb-04): (if (and (featurep 'rmail-spam-filter)
+1.385 (uid65627 17-Feb-04): rmail-use-spam-filter
+1.385 (uid65627 17-Feb-04): (> rsf-number-of-spam 0))
+1.427 (rms 08-Sep-06): (cond ((= 1 new-messages)
+1.427 (rms 08-Sep-06): ", and appears to be spam")
+1.427 (rms 08-Sep-06): ((= rsf-number-of-spam new-messages)
+1.427 (rms 08-Sep-06): ", and all appear to be spam")
+1.427 (rms 08-Sep-06): ((> rsf-number-of-spam 1)
+1.427 (rms 08-Sep-06): (format ", and %d appear to be spam"
+1.427 (rms 08-Sep-06): rsf-number-of-spam))
+1.427 (rms 08-Sep-06): (t
+1.427 (rms 08-Sep-06): ", and 1 appears to be spam"))
+1.380 (uid65566 16-Jan-04): ""))
+1.385 (uid65627 17-Feb-04): (if (and (featurep 'rmail-spam-filter)
+1.385 (uid65627 17-Feb-04): rmail-use-spam-filter
+1.385 (uid65627 17-Feb-04): (> rsf-number-of-spam 0))
+1.393 (eliz 12-Nov-04): (progn (if rsf-beep (beep t))
+1.393 (eliz 12-Nov-04): (sleep-for rsf-sleep-after-message)))
+1.380 (uid65566 16-Jan-04):
+1.206 (kwzh 25-Jan-97): ;; Move to the first new message
+1.206 (kwzh 25-Jan-97): ;; unless we have other unseen messages before it.
+1.206 (kwzh 25-Jan-97): (rmail-show-message (rmail-first-unseen-message))
+1.206 (kwzh 25-Jan-97): (run-hooks 'rmail-after-get-new-mail-hook)
+1.206 (kwzh 25-Jan-97): (setq found t))))
+1.206 (kwzh 25-Jan-97): found)
+1.198 (rms 19-Sep-96): ;; Don't leave the buffer screwed up if we get a disk-full error.
+1.237 (kwzh 15-Oct-97): (or found (rmail-show-message)))))
+1.1 (roland 13-May-91):
+1.395 (eliz 15-Jan-05): (defun rmail-parse-url (file)
+1.395 (eliz 15-Jan-05): "Parse the supplied URL. Return (list MAILBOX-NAME REMOTE PASSWORD GOT-PASSWORD)
+1.395 (eliz 15-Jan-05): WHERE MAILBOX-NAME is the name of the mailbox suitable as argument to the
+1.395 (eliz 15-Jan-05): actual version of `movemail', REMOTE is non-nil if MAILBOX-NAME refers to
+1.395 (eliz 15-Jan-05): a remote mailbox, PASSWORD is the password if it should be
+1.395 (eliz 15-Jan-05): supplied as a separate argument to `movemail' or nil otherwise, GOT-PASSWORD
+1.395 (eliz 15-Jan-05): is non-nil if the user has supplied the password interactively.
+1.395 (eliz 15-Jan-05): "
+1.398 (eliz 02-Apr-05): (cond
+1.398 (eliz 02-Apr-05): ((string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file)
+1.396 (kfstorm 09-Feb-05): (let (got-password supplied-password
+1.395 (eliz 15-Jan-05): (proto (match-string 1 file))
+1.395 (eliz 15-Jan-05): (user (match-string 3 file))
+1.395 (eliz 15-Jan-05): (pass (match-string 5 file))
+1.395 (eliz 15-Jan-05): (host (substring file (or (match-end 2)
+1.395 (eliz 15-Jan-05): (+ 3 (match-end 1))))))
+1.407 (ttn 06-Aug-05):
+1.395 (eliz 15-Jan-05): (if (not pass)
+1.395 (eliz 15-Jan-05): (when rmail-remote-password-required
+1.395 (eliz 15-Jan-05): (setq got-password (not (rmail-have-password)))
+1.395 (eliz 15-Jan-05): (setq supplied-password (rmail-get-remote-password
+1.395 (eliz 15-Jan-05): (string-equal proto "imap")))))
+1.396 (kfstorm 09-Feb-05):
+1.395 (eliz 15-Jan-05): (if (rmail-movemail-variant-p 'emacs)
+1.395 (eliz 15-Jan-05): (if (string-equal proto "pop")
+1.395 (eliz 15-Jan-05): (list (concat "po:" user ":" host)
+1.395 (eliz 15-Jan-05): t
+1.395 (eliz 15-Jan-05): (or pass supplied-password)
+1.395 (eliz 15-Jan-05): got-password)
+1.395 (eliz 15-Jan-05): (error "Emacs movemail does not support %s protocol" proto))
+1.395 (eliz 15-Jan-05): (list file
+1.395 (eliz 15-Jan-05): (or (string-equal proto "pop") (string-equal proto "imap"))
+1.395 (eliz 15-Jan-05): supplied-password
+1.398 (eliz 02-Apr-05): got-password))))
+1.407 (ttn 06-Aug-05):
+1.398 (eliz 02-Apr-05): ((string-match "^po:\\([^:]+\\)\\(:\\(.*\\)\\)?" file)
+1.398 (eliz 02-Apr-05): (let (got-password supplied-password
+1.398 (eliz 02-Apr-05): (proto "pop")
+1.398 (eliz 02-Apr-05): (user (match-string 1 file))
+1.398 (eliz 02-Apr-05): (host (match-string 3 file)))
+1.407 (ttn 06-Aug-05):
+1.398 (eliz 02-Apr-05): (when rmail-remote-password-required
+1.398 (eliz 02-Apr-05): (setq got-password (not (rmail-have-password)))
+1.398 (eliz 02-Apr-05): (setq supplied-password (rmail-get-remote-password nil)))
+1.398 (eliz 02-Apr-05):
+1.398 (eliz 02-Apr-05): (list file "pop" supplied-password got-password)))
+1.407 (ttn 06-Aug-05):
+1.398 (eliz 02-Apr-05): (t
+1.398 (eliz 02-Apr-05): (list file nil nil nil))))
+1.395 (eliz 15-Jan-05):
+1.1 (roland 13-May-91): (defun rmail-insert-inbox-text (files renamep)
+1.198 (rms 19-Sep-96): ;; Detect a locked file now, so that we avoid moving mail
+1.198 (rms 19-Sep-96): ;; out of the real inbox file. (That could scare people.)
+1.198 (rms 19-Sep-96): (or (memq (file-locked-p buffer-file-name) '(nil t))
+1.198 (rms 19-Sep-96): (error "RMAIL file %s is locked"
+1.198 (rms 19-Sep-96): (file-name-nondirectory buffer-file-name)))
+1.282 (rms 27-Jul-98): (let (file tofile delete-files movemail popmail got-password password)
+1.1 (roland 13-May-91): (while files
+1.395 (eliz 15-Jan-05): ;; Handle remote mailbox names specially; don't expand as filenames
+1.296 (andrewi 29-Jan-99): ;; in case the userid contains a directory separator.
+1.296 (andrewi 29-Jan-99): (setq file (car files))
+1.395 (eliz 15-Jan-05): (let ((url-data (rmail-parse-url file)))
+1.395 (eliz 15-Jan-05): (setq file (nth 0 url-data))
+1.395 (eliz 15-Jan-05): (setq popmail (nth 1 url-data))
+1.395 (eliz 15-Jan-05): (setq password (nth 2 url-data))
+1.395 (eliz 15-Jan-05): (setq got-password (nth 3 url-data)))
+1.395 (eliz 15-Jan-05):
+1.296 (andrewi 29-Jan-99): (if popmail
+1.296 (andrewi 29-Jan-99): (setq renamep t)
+1.296 (andrewi 29-Jan-99): (setq file (file-truename
+1.333 (handa 16-Mar-01): (substitute-in-file-name (expand-file-name file)))))
+1.296 (andrewi 29-Jan-99): (setq tofile (expand-file-name
+1.157 (rms 25-Jul-95): ;; Generate name to move to from inbox name,
+1.157 (rms 25-Jul-95): ;; in case of multiple inboxes that need moving.
+1.395 (eliz 15-Jan-05): (concat ".newmail-"
+1.396 (kfstorm 09-Feb-05): (file-name-nondirectory
+1.395 (eliz 15-Jan-05): (if (memq system-type '(windows-nt cygwin))
+1.395 (eliz 15-Jan-05): ;; cannot have "po:" in file name
+1.395 (eliz 15-Jan-05): (substring file 3)
+1.395 (eliz 15-Jan-05): file)))
+1.157 (rms 25-Jul-95): ;; Use the directory of this rmail file
+1.157 (rms 25-Jul-95): ;; because it's a nuisance to use the homedir
+1.157 (rms 25-Jul-95): ;; if that is on a full disk and this rmail
+1.157 (rms 25-Jul-95): ;; file isn't.
+1.157 (rms 25-Jul-95): (file-name-directory
+1.157 (rms 25-Jul-95): (expand-file-name buffer-file-name))))
+1.157 (rms 25-Jul-95): ;; Always use movemail to rename the file,
+1.157 (rms 25-Jul-95): ;; since there can be mailboxes in various directories.
+1.398 (eliz 02-Apr-05): (if (not popmail)
+1.1 (roland 13-May-91): (progn
+1.1 (roland 13-May-91): ;; On some systems, /usr/spool/mail/foo is a directory
+1.1 (roland 13-May-91): ;; and the actual inbox is /usr/spool/mail/foo/foo.
+1.1 (roland 13-May-91): (if (file-directory-p file)
+1.86 (kwzh 11-Feb-94): (setq file (expand-file-name (user-login-name)
+1.1 (roland 13-May-91): file)))))
+1.150 (rms 14-Apr-95): (cond (popmail
+1.395 (eliz 15-Jan-05): (message "Getting mail from the remote server ..."))
+1.150 (rms 14-Apr-95): ((and (file-exists-p tofile)
+1.150 (rms 14-Apr-95): (/= 0 (nth 7 (file-attributes tofile))))
+1.150 (rms 14-Apr-95): (message "Getting mail from %s..." tofile))
+1.150 (rms 14-Apr-95): ((and (file-exists-p file)
+1.150 (rms 14-Apr-95): (/= 0 (nth 7 (file-attributes file))))
+1.150 (rms 14-Apr-95): (message "Getting mail from %s..." file)))
+1.1 (roland 13-May-91): ;; Set TOFILE if have not already done so, and
+1.1 (roland 13-May-91): ;; rename or copy the file FILE to TOFILE if and as appropriate.
+1.1 (roland 13-May-91): (cond ((not renamep)
+1.1 (roland 13-May-91): (setq tofile file))
+1.39 (rms 09-Mar-93): ((or (file-exists-p tofile) (and (not popmail)
+1.39 (rms 09-Mar-93): (not (file-exists-p file))))
+1.1 (roland 13-May-91): nil)
+1.1 (roland 13-May-91): (t
+1.395 (eliz 15-Jan-05): (with-temp-buffer
+1.395 (eliz 15-Jan-05): (let ((errors (current-buffer)))
+1.395 (eliz 15-Jan-05): (buffer-disable-undo errors)
+1.395 (eliz 15-Jan-05): (let ((args
+1.395 (eliz 15-Jan-05): (append
+1.439 (gm 22-Aug-07): (list rmail-movemail-program nil errors nil)
+1.395 (eliz 15-Jan-05): (if rmail-preserve-inbox
+1.395 (eliz 15-Jan-05): (list "-p")
+1.395 (eliz 15-Jan-05): nil)
+1.395 (eliz 15-Jan-05): (if (rmail-movemail-variant-p 'mailutils)
+1.395 (eliz 15-Jan-05): (append (list "--emacs") rmail-movemail-flags)
+1.395 (eliz 15-Jan-05): rmail-movemail-flags)
+1.395 (eliz 15-Jan-05): (list file tofile)
+1.395 (eliz 15-Jan-05): (if password (list password) nil))))
+1.395 (eliz 15-Jan-05): (apply 'call-process args))
+1.395 (eliz 15-Jan-05): (if (not (buffer-modified-p errors))
+1.395 (eliz 15-Jan-05): ;; No output => movemail won
+1.395 (eliz 15-Jan-05): nil
+1.395 (eliz 15-Jan-05): (set-buffer errors)
+1.395 (eliz 15-Jan-05): (subst-char-in-region (point-min) (point-max)
+1.395 (eliz 15-Jan-05): ?\n ?\ )
+1.395 (eliz 15-Jan-05): (goto-char (point-max))
+1.395 (eliz 15-Jan-05): (skip-chars-backward " \t")
+1.395 (eliz 15-Jan-05): (delete-region (point) (point-max))
+1.395 (eliz 15-Jan-05): (goto-char (point-min))
+1.395 (eliz 15-Jan-05): (if (looking-at "movemail: ")
+1.395 (eliz 15-Jan-05): (delete-region (point-min) (match-end 0)))
+1.395 (eliz 15-Jan-05): (beep t)
+1.395 (eliz 15-Jan-05): ;; If we just read the password, most likely it is
+1.395 (eliz 15-Jan-05): ;; wrong. Otherwise, see if there is a specific
+1.395 (eliz 15-Jan-05): ;; reason to think that the problem is a wrong passwd.
+1.395 (eliz 15-Jan-05): (if (or got-password
+1.395 (eliz 15-Jan-05): (re-search-forward rmail-remote-password-error
+1.395 (eliz 15-Jan-05): nil t))
+1.395 (eliz 15-Jan-05): (rmail-set-remote-password nil))
+1.395 (eliz 15-Jan-05):
+1.395 (eliz 15-Jan-05): ;; If using Mailutils, remove initial error code
+1.395 (eliz 15-Jan-05): ;; abbreviation
+1.395 (eliz 15-Jan-05): (when (rmail-movemail-variant-p 'mailutils)
+1.395 (eliz 15-Jan-05): (goto-char (point-min))
+1.395 (eliz 15-Jan-05): (when (looking-at "[A-Z][A-Z0-9_]*:")
+1.395 (eliz 15-Jan-05): (delete-region (point-min) (match-end 0))))
+1.396 (kfstorm 09-Feb-05):
+1.395 (eliz 15-Jan-05): (message "movemail: %s"
+1.395 (eliz 15-Jan-05): (buffer-substring (point-min)
+1.395 (eliz 15-Jan-05): (point-max)))
+1.396 (kfstorm 09-Feb-05):
+1.395 (eliz 15-Jan-05): (sit-for 3)
+1.395 (eliz 15-Jan-05): nil)))))
+1.396 (kfstorm 09-Feb-05):
+1.1 (roland 13-May-91): ;; At this point, TOFILE contains the name to read:
+1.1 (roland 13-May-91): ;; Either the alternate name (if we renamed)
+1.1 (roland 13-May-91): ;; or the actual inbox (if not renaming).
+1.1 (roland 13-May-91): (if (file-exists-p tofile)
+1.212 (handa 26-Feb-97): (let ((coding-system-for-read 'no-conversion)
+1.212 (handa 26-Feb-97): size)
+1.1 (roland 13-May-91): (goto-char (point-max))
+1.212 (handa 26-Feb-97): (setq size (nth 1 (insert-file-contents tofile)))
+1.1 (roland 13-May-91): (goto-char (point-max))
+1.1 (roland 13-May-91): (or (= (preceding-char) ?\n)
+1.1 (roland 13-May-91): (zerop size)
+1.1 (roland 13-May-91): (insert ?\n))
+1.205 (rms 21-Jan-97): (if (not (and rmail-preserve-inbox (string= file tofile)))
+1.205 (rms 21-Jan-97): (setq delete-files (cons tofile delete-files)))))
+1.1 (roland 13-May-91): (message "")
+1.1 (roland 13-May-91): (setq files (cdr files)))
+1.1 (roland 13-May-91): delete-files))
+1.183 (rms 26-Apr-96):
+1.295 (rms 28-Jan-99): ;; Decode the region specified by FROM and TO by CODING.
+1.295 (rms 28-Jan-99): ;; If CODING is nil or an invalid coding system, decode by `undecided'.
+1.295 (rms 28-Jan-99): (defun rmail-decode-region (from to coding)
+1.295 (rms 28-Jan-99): (if (or (not coding) (not (coding-system-p coding)))
+1.295 (rms 28-Jan-99): (setq coding 'undecided))
+1.390 (eliz 24-Apr-04): ;; Use -dos decoding, to remove ^M characters left from base64 or
+1.390 (eliz 24-Apr-04): ;; rogue qp-encoded text.
+1.390 (eliz 24-Apr-04): (decode-coding-region from to
+1.390 (eliz 24-Apr-04): (coding-system-change-eol-conversion coding 1))
+1.390 (eliz 24-Apr-04): ;; Don't reveal the fact we used -dos decoding, as users generally
+1.390 (eliz 24-Apr-04): ;; will not expect the RMAIL buffer to use DOS EOL format.
+1.390 (eliz 24-Apr-04): (setq buffer-file-coding-system
+1.390 (eliz 24-Apr-04): (setq last-coding-system-used
+1.390 (eliz 24-Apr-04): (coding-system-change-eol-conversion coding 0))))
+1.295 (rms 28-Jan-99):
+1.1 (roland 13-May-91): ;; the rmail-break-forwarded-messages feature is not implemented
+1.1 (roland 13-May-91): (defun rmail-convert-to-babyl-format ()
+1.1 (roland 13-May-91): (let ((count 0) start
+1.5 (rms 18-Aug-91): (case-fold-search nil)
+1.427 (rms 08-Sep-06): (buffer-undo-list t)
+1.5 (rms 18-Aug-91): (invalid-input-resync
+1.5 (rms 18-Aug-91): (function (lambda ()
+1.5 (rms 18-Aug-91): (message "Invalid Babyl format in inbox!")
+1.198 (rms 19-Sep-96): (sit-for 3)
+1.5 (rms 18-Aug-91): ;; Try to get back in sync with a real message.
+1.5 (rms 18-Aug-91): (if (re-search-forward
+1.226 (rms 01-Jun-97): (concat rmail-mmdf-delim1 "\\|^From") nil t)
+1.5 (rms 18-Aug-91): (beginning-of-line)
+1.5 (rms 18-Aug-91): (goto-char (point-max)))))))
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.1 (roland 13-May-91): (save-restriction
+1.1 (roland 13-May-91): (while (not (eobp))
+1.212 (handa 26-Feb-97): (setq start (point))
+1.445 (m061211 13-Jan-08): (cond ((looking-at "BABYL OPTIONS:") ;Babyl header
+1.5 (rms 18-Aug-91): (if (search-forward "\n\^_" nil t)
+1.5 (rms 18-Aug-91): ;; If we find the proper terminator, delete through there.
+1.5 (rms 18-Aug-91): (delete-region (point-min) (point))
+1.5 (rms 18-Aug-91): (funcall invalid-input-resync)
+1.7 (mib 20-Aug-91): (delete-region (point-min) (point))))
+1.1 (roland 13-May-91): ;; Babyl format message
+1.1 (roland 13-May-91): ((looking-at "\^L")
+1.1 (roland 13-May-91): (or (search-forward "\n\^_" nil t)
+1.5 (rms 18-Aug-91): (funcall invalid-input-resync))
+1.1 (roland 13-May-91): (setq count (1+ count))
+1.1 (roland 13-May-91): ;; Make sure there is no extra white space after the ^_
+1.1 (roland 13-May-91): ;; at the end of the message.
+1.1 (roland 13-May-91): ;; Narrowing will make sure that whatever follows the junk
+1.1 (roland 13-May-91): ;; will be treated properly.
+1.1 (roland 13-May-91): (delete-region (point)
+1.1 (roland 13-May-91): (save-excursion
+1.1 (roland 13-May-91): (skip-chars-forward " \t\n")
+1.1 (roland 13-May-91): (point)))
+1.445 (m061211 13-Jan-08): ;; The following let* form was wrapped in a `save-excursion'
+1.445 (m061211 13-Jan-08): ;; which in one case caused infinite looping, see:
+1.445 (m061211 13-Jan-08): ;; http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00968.html
+1.445 (m061211 13-Jan-08): ;; Removing that form leaves `point' at the end of the
+1.445 (m061211 13-Jan-08): ;; region decoded by `rmail-decode-region' which should
+1.445 (m061211 13-Jan-08): ;; be correct.
+1.445 (m061211 13-Jan-08): (let* ((header-end
+1.445 (m061211 13-Jan-08): (progn
+1.372 (eliz 28-Aug-03): (save-excursion
+1.372 (eliz 28-Aug-03): (goto-char start)
+1.445 (m061211 13-Jan-08): (forward-line 1)
+1.445 (m061211 13-Jan-08): (if (looking-at "0")
+1.445 (m061211 13-Jan-08): (forward-line 1)
+1.445 (m061211 13-Jan-08): (forward-line 2))
+1.445 (m061211 13-Jan-08): (save-restriction
+1.445 (m061211 13-Jan-08): (narrow-to-region (point) (point-max))
+1.445 (m061211 13-Jan-08): (rfc822-goto-eoh)
+1.445 (m061211 13-Jan-08): (point)))))
+1.445 (m061211 13-Jan-08): (case-fold-search t)
+1.445 (m061211 13-Jan-08): (quoted-printable-header-field-end
+1.445 (m061211 13-Jan-08): (save-excursion
+1.445 (m061211 13-Jan-08): (goto-char start)
+1.445 (m061211 13-Jan-08): (re-search-forward
+1.445 (m061211 13-Jan-08): "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"
+1.445 (m061211 13-Jan-08): header-end t)))
+1.445 (m061211 13-Jan-08): (base64-header-field-end
+1.372 (eliz 28-Aug-03): (save-excursion
+1.445 (m061211 13-Jan-08): (goto-char start)
+1.445 (m061211 13-Jan-08): ;; Don't try to decode non-text data.
+1.445 (m061211 13-Jan-08): (and (re-search-forward
+1.445 (m061211 13-Jan-08): "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
+1.445 (m061211 13-Jan-08): header-end t)
+1.445 (m061211 13-Jan-08): (goto-char start)
+1.445 (m061211 13-Jan-08): (re-search-forward
+1.445 (m061211 13-Jan-08): "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
+1.445 (m061211 13-Jan-08): header-end t)))))
+1.445 (m061211 13-Jan-08): (if quoted-printable-header-field-end
+1.445 (m061211 13-Jan-08): (save-excursion
+1.445 (m061211 13-Jan-08): (unless
+1.445 (m061211 13-Jan-08): (mail-unquote-printable-region header-end (point) nil t t)
+1.445 (m061211 13-Jan-08): (message "Malformed MIME quoted-printable message"))
+1.445 (m061211 13-Jan-08): ;; Change "quoted-printable" to "8bit",
+1.445 (m061211 13-Jan-08): ;; to reflect the decoding we just did.
+1.445 (m061211 13-Jan-08): (goto-char quoted-printable-header-field-end)
+1.445 (m061211 13-Jan-08): (delete-region (point) (search-backward ":"))
+1.445 (m061211 13-Jan-08): (insert ": 8bit")))
+1.445 (m061211 13-Jan-08): (if base64-header-field-end
+1.445 (m061211 13-Jan-08): (save-excursion
+1.445 (m061211 13-Jan-08): (when
+1.445 (m061211 13-Jan-08): (condition-case nil
+1.445 (m061211 13-Jan-08): (progn
+1.445 (m061211 13-Jan-08): (base64-decode-region (1+ header-end)
+1.445 (m061211 13-Jan-08): (- (point) 2))
+1.445 (m061211 13-Jan-08): t)
+1.445 (m061211 13-Jan-08): (error nil))
+1.445 (m061211 13-Jan-08): ;; Change "base64" to "8bit", to reflect the
+1.445 (m061211 13-Jan-08): ;; decoding we just did.
+1.445 (m061211 13-Jan-08): (goto-char base64-header-field-end)
+1.372 (eliz 28-Aug-03): (delete-region (point) (search-backward ":"))
+1.445 (m061211 13-Jan-08): (insert ": 8bit"))))
+1.445 (m061211 13-Jan-08): (setq last-coding-system-used nil)
+1.445 (m061211 13-Jan-08): (or rmail-enable-mime
+1.445 (m061211 13-Jan-08): (not rmail-enable-multibyte)
+1.445 (m061211 13-Jan-08): (let ((mime-charset
+1.445 (m061211 13-Jan-08): (if (and rmail-decode-mime-charset
+1.445 (m061211 13-Jan-08): (save-excursion
+1.445 (m061211 13-Jan-08): (goto-char start)
+1.445 (m061211 13-Jan-08): (search-forward "\n\n" nil t)
+1.445 (m061211 13-Jan-08): (let ((case-fold-search t))
+1.445 (m061211 13-Jan-08): (re-search-backward
+1.445 (m061211 13-Jan-08): rmail-mime-charset-pattern
+1.445 (m061211 13-Jan-08): start t))))
+1.445 (m061211 13-Jan-08): (intern (downcase (match-string 1))))))
+1.445 (m061211 13-Jan-08): (rmail-decode-region start (point) mime-charset))))
+1.265 (rms 12-May-98): ;; Add an X-Coding-System: header if we don't have one.
+1.265 (rms 12-May-98): (save-excursion
+1.265 (rms 12-May-98): (goto-char start)
+1.265 (rms 12-May-98): (forward-line 1)
+1.265 (rms 12-May-98): (if (looking-at "0")
+1.265 (rms 12-May-98): (forward-line 1)
+1.265 (rms 12-May-98): (forward-line 2))
+1.265 (rms 12-May-98): (or (save-restriction
+1.265 (rms 12-May-98): (narrow-to-region (point) (point-max))
+1.265 (rms 12-May-98): (rfc822-goto-eoh)
+1.265 (rms 12-May-98): (goto-char (point-min))
+1.265 (rms 12-May-98): (re-search-forward "^X-Coding-System:" nil t))
+1.265 (rms 12-May-98): (insert "X-Coding-System: "
+1.265 (rms 12-May-98): (symbol-name last-coding-system-used)
+1.265 (rms 12-May-98): "\n")))
+1.374 (eliz 16-Oct-03): (narrow-to-region (point) (point-max))
+1.374 (eliz 16-Oct-03): (and (= 0 (% count 10))
+1.375 (eliz 16-Oct-03): (message "Converting to Babyl format...%d" count)))
+1.1 (roland 13-May-91): ;;*** MMDF format
+1.1 (roland 13-May-91): ((let ((case-fold-search t))
+1.226 (rms 01-Jun-97): (looking-at rmail-mmdf-delim1))
+1.1 (roland 13-May-91): (let ((case-fold-search t))
+1.1 (roland 13-May-91): (replace-match "\^L\n0, unseen,,\n*** EOOH ***\n")
+1.226 (rms 01-Jun-97): (re-search-forward rmail-mmdf-delim2 nil t)
+1.1 (roland 13-May-91): (replace-match "\^_"))
+1.1 (roland 13-May-91): (save-excursion
+1.1 (roland 13-May-91): (save-restriction
+1.1 (roland 13-May-91): (narrow-to-region start (1- (point)))
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.445 (m061211 13-Jan-08): (while (search-forward "\n\^_" nil t) ; single char "\^_"
+1.445 (m061211 13-Jan-08): (replace-match "\n^_")))) ; 2 chars: "^" and "_"
+1.265 (rms 12-May-98): (setq last-coding-system-used nil)
+1.212 (handa 26-Feb-97): (or rmail-enable-mime
+1.247 (handa 20-Feb-98): (not rmail-enable-multibyte)
+1.225 (handa 16-May-97): (decode-coding-region start (point) 'undecided))
+1.265 (rms 12-May-98): (save-excursion
+1.265 (rms 12-May-98): (goto-char start)
+1.265 (rms 12-May-98): (forward-line 3)
+1.265 (rms 12-May-98): (insert "X-Coding-System: "
+1.265 (rms 12-May-98): (symbol-name last-coding-system-used)
+1.265 (rms 12-May-98): "\n"))
+1.1 (roland 13-May-91): (narrow-to-region (point) (point-max))
+1.374 (eliz 16-Oct-03): (setq count (1+ count))
+1.374 (eliz 16-Oct-03): (and (= 0 (% count 10))
+1.375 (eliz 16-Oct-03): (message "Converting to Babyl format...%d" count)))
+1.1 (roland 13-May-91): ;;*** Mail format
+1.1 (roland 13-May-91): ((looking-at "^From ")
+1.1 (roland 13-May-91): (insert "\^L\n0, unseen,,\n*** EOOH ***\n")
+1.1 (roland 13-May-91): (rmail-nuke-pinhead-header)
+1.39 (rms 09-Mar-93): ;; If this message has a Content-Length field,
+1.39 (rms 09-Mar-93): ;; skip to the end of the contents.
+1.39 (rms 09-Mar-93): (let* ((header-end (save-excursion
+1.39 (rms 09-Mar-93): (and (re-search-forward "\n\n" nil t)
+1.77 (rms 06-Jan-94): (1- (point)))))
+1.39 (rms 09-Mar-93): (case-fold-search t)
+1.239 (kwzh 18-Nov-97): (quoted-printable-header-field-end
+1.239 (kwzh 18-Nov-97): (save-excursion
+1.239 (kwzh 18-Nov-97): (re-search-forward
+1.240 (kwzh 18-Nov-97): "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"
+1.239 (kwzh 18-Nov-97): header-end t)))
+1.372 (eliz 28-Aug-03): (base64-header-field-end
+1.433 (eliz 03-Apr-07): (and
+1.434 (eliz 14-May-07): ;; Don't decode non-text data.
+1.433 (eliz 03-Apr-07): (save-excursion
+1.433 (eliz 03-Apr-07): (re-search-forward
+1.434 (eliz 14-May-07): "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
+1.433 (eliz 03-Apr-07): header-end t))
+1.433 (eliz 03-Apr-07): (save-excursion
+1.433 (eliz 03-Apr-07): (re-search-forward
+1.434 (eliz 14-May-07): "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
+1.433 (eliz 03-Apr-07): header-end t))))
+1.39 (rms 09-Mar-93): (size
+1.39 (rms 09-Mar-93): ;; Get the numeric value from the Content-Length field.
+1.39 (rms 09-Mar-93): (save-excursion
+1.39 (rms 09-Mar-93): ;; Back up to end of prev line,
+1.39 (rms 09-Mar-93): ;; in case the Content-Length field comes first.
+1.39 (rms 09-Mar-93): (forward-char -1)
+1.39 (rms 09-Mar-93): (and (search-forward "\ncontent-length: "
+1.39 (rms 09-Mar-93): header-end t)
+1.39 (rms 09-Mar-93): (let ((beg (point))
+1.39 (rms 09-Mar-93): (eol (progn (end-of-line) (point))))
+1.402 (lektu 16-May-05): (string-to-number (buffer-substring beg eol)))))))
+1.90 (kwzh 17-Mar-94): (and size
+1.90 (kwzh 17-Mar-94): (if (and (natnump size)
+1.90 (kwzh 17-Mar-94): (<= (+ header-end size) (point-max))
+1.90 (kwzh 17-Mar-94): ;; Make sure this would put us at a position
+1.90 (kwzh 17-Mar-94): ;; that we could continue from.
+1.90 (kwzh 17-Mar-94): (save-excursion
+1.90 (kwzh 17-Mar-94): (goto-char (+ header-end size))
+1.90 (kwzh 17-Mar-94): (skip-chars-forward "\n")
+1.90 (kwzh 17-Mar-94): (or (eobp)
+1.90 (kwzh 17-Mar-94): (and (looking-at "BABYL OPTIONS:")
+1.90 (kwzh 17-Mar-94): (search-forward "\n\^_" nil t))
+1.90 (kwzh 17-Mar-94): (and (looking-at "\^L")
+1.90 (kwzh 17-Mar-94): (search-forward "\n\^_" nil t))
+1.90 (kwzh 17-Mar-94): (let ((case-fold-search t))
+1.226 (rms 01-Jun-97): (looking-at rmail-mmdf-delim1))
+1.90 (kwzh 17-Mar-94): (looking-at "From "))))
+1.90 (kwzh 17-Mar-94): (goto-char (+ header-end size))
+1.90 (kwzh 17-Mar-94): (message "Ignoring invalid Content-Length field")
+1.239 (kwzh 18-Nov-97): (sit-for 1 0 t)))
+1.365 (rms 29-Nov-02): (if (let ((case-fold-search nil))
+1.365 (rms 29-Nov-02): (re-search-forward
+1.365 (rms 29-Nov-02): (concat "^[\^_]?\\("
+1.365 (rms 29-Nov-02): rmail-unix-mail-delimiter
+1.365 (rms 29-Nov-02): "\\|"
+1.365 (rms 29-Nov-02): rmail-mmdf-delim1 "\\|"
+1.365 (rms 29-Nov-02): "^BABYL OPTIONS:\\|"
+1.365 (rms 29-Nov-02): "\^L\n[01],\\)") nil t))
+1.239 (kwzh 18-Nov-97): (goto-char (match-beginning 1))
+1.239 (kwzh 18-Nov-97): (goto-char (point-max)))
+1.239 (kwzh 18-Nov-97): (setq count (1+ count))
+1.239 (kwzh 18-Nov-97): (if quoted-printable-header-field-end
+1.239 (kwzh 18-Nov-97): (save-excursion
+1.379 (uid65566 12-Jan-04): (unless
+1.386 (rms 04-Mar-04): (mail-unquote-printable-region header-end (point) nil t t)
+1.379 (uid65566 12-Jan-04): (message "Malformed MIME quoted-printable message"))
+1.239 (kwzh 18-Nov-97): ;; Change "quoted-printable" to "8bit",
+1.239 (kwzh 18-Nov-97): ;; to reflect the decoding we just did.
+1.239 (kwzh 18-Nov-97): (goto-char quoted-printable-header-field-end)
+1.372 (eliz 28-Aug-03): (delete-region (point) (search-backward ":"))
+1.372 (eliz 28-Aug-03): (insert ": 8bit")))
+1.372 (eliz 28-Aug-03): (if base64-header-field-end
+1.377 (uid65627 30-Dec-03): (save-excursion
+1.377 (uid65627 30-Dec-03): (when
+1.377 (uid65627 30-Dec-03): (condition-case nil
+1.377 (uid65627 30-Dec-03): (progn
+1.381 (uid66361 21-Jan-04): (base64-decode-region
+1.381 (uid66361 21-Jan-04): (1+ header-end)
+1.381 (uid66361 21-Jan-04): (save-excursion
+1.381 (uid66361 21-Jan-04): ;; Prevent base64-decode-region
+1.381 (uid66361 21-Jan-04): ;; from removing newline characters.
+1.381 (uid66361 21-Jan-04): (skip-chars-backward "\n\t ")
+1.381 (uid66361 21-Jan-04): (point)))
+1.377 (uid65627 30-Dec-03): t)
+1.377 (uid65627 30-Dec-03): (error nil))
+1.377 (uid65627 30-Dec-03): ;; Change "base64" to "8bit", to reflect the
+1.377 (uid65627 30-Dec-03): ;; decoding we just did.
+1.377 (uid65627 30-Dec-03): (goto-char base64-header-field-end)
+1.377 (uid65627 30-Dec-03): (delete-region (point) (search-backward ":"))
+1.377 (uid65627 30-Dec-03): (insert ": 8bit")))))
+1.39 (rms 09-Mar-93):
+1.1 (roland 13-May-91): (save-excursion
+1.1 (roland 13-May-91): (save-restriction
+1.1 (roland 13-May-91): (narrow-to-region start (point))
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.445 (m061211 13-Jan-08): (while (search-forward "\n\^_" nil t) ; single char
+1.445 (m061211 13-Jan-08): (replace-match "\n^_")))) ; 2 chars: "^" and "_"
+1.386 (rms 04-Mar-04): ;; This is for malformed messages that don't end in newline.
+1.386 (rms 04-Mar-04): ;; There shouldn't be any, but some users say occasionally
+1.386 (rms 04-Mar-04): ;; there are some.
+1.386 (rms 04-Mar-04): (or (bolp) (newline))
+1.1 (roland 13-May-91): (insert ?\^_)
+1.265 (rms 12-May-98): (setq last-coding-system-used nil)
+1.212 (handa 26-Feb-97): (or rmail-enable-mime
+1.247 (handa 20-Feb-98): (not rmail-enable-multibyte)
+1.295 (rms 28-Jan-99): (let ((mime-charset
+1.295 (rms 28-Jan-99): (if (and rmail-decode-mime-charset
+1.295 (rms 28-Jan-99): (save-excursion
+1.295 (rms 28-Jan-99): (goto-char start)
+1.295 (rms 28-Jan-99): (search-forward "\n\n" nil t)
+1.295 (rms 28-Jan-99): (let ((case-fold-search t))
+1.295 (rms 28-Jan-99): (re-search-backward
+1.295 (rms 28-Jan-99): rmail-mime-charset-pattern
+1.295 (rms 28-Jan-99): start t))))
+1.426 (eliz 20-May-06): (intern (downcase (match-string 1))))))
+1.295 (rms 28-Jan-99): (rmail-decode-region start (point) mime-charset)))
+1.265 (rms 12-May-98): (save-excursion
+1.265 (rms 12-May-98): (goto-char start)
+1.265 (rms 12-May-98): (forward-line 3)
+1.265 (rms 12-May-98): (insert "X-Coding-System: "
+1.265 (rms 12-May-98): (symbol-name last-coding-system-used)
+1.265 (rms 12-May-98): "\n"))
+1.374 (eliz 16-Oct-03): (narrow-to-region (point) (point-max))
+1.374 (eliz 16-Oct-03): (and (= 0 (% count 10))
+1.375 (eliz 16-Oct-03): (message "Converting to Babyl format...%d" count)))
+1.1 (roland 13-May-91): ;;
+1.43 (rms 09-May-93): ;; This kludge is because some versions of sendmail.el
+1.43 (rms 09-May-93): ;; insert an extra newline at the beginning that shouldn't
+1.43 (rms 09-May-93): ;; be there. sendmail.el has been fixed, but old versions
+1.43 (rms 09-May-93): ;; may still be in use. -- rms, 7 May 1993.
+1.43 (rms 09-May-93): ((eolp) (delete-char 1))
+1.7 (mib 20-Aug-91): (t (error "Cannot convert to babyl format")))))
+1.427 (rms 08-Sep-06): (setq buffer-undo-list nil)
+1.1 (roland 13-May-91): count))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; Delete the "From ..." line, creating various other headers with
+1.1 (roland 13-May-91): ;; information from it if they don't already exist. Now puts the
+1.68 (rms 09-Oct-93): ;; original line into a mail-from: header line for debugging and for
+1.68 (rms 09-Oct-93): ;; use by the rmail-output function.
+1.1 (roland 13-May-91): (defun rmail-nuke-pinhead-header ()
+1.1 (roland 13-May-91): (save-excursion
+1.1 (roland 13-May-91): (save-restriction
+1.1 (roland 13-May-91): (let ((start (point))
+1.1 (roland 13-May-91): (end (progn
+1.1 (roland 13-May-91): (condition-case ()
+1.1 (roland 13-May-91): (search-forward "\n\n")
+1.1 (roland 13-May-91): (error
+1.1 (roland 13-May-91): (goto-char (point-max))
+1.1 (roland 13-May-91): (insert "\n\n")))
+1.1 (roland 13-May-91): (point)))
+1.1 (roland 13-May-91): has-from has-date)
+1.1 (roland 13-May-91): (narrow-to-region start end)
+1.1 (roland 13-May-91): (let ((case-fold-search t))
+1.1 (roland 13-May-91): (goto-char start)
+1.1 (roland 13-May-91): (setq has-from (search-forward "\nFrom:" nil t))
+1.1 (roland 13-May-91): (goto-char start)
+1.1 (roland 13-May-91): (setq has-date (and (search-forward "\nDate:" nil t) (point)))
+1.1 (roland 13-May-91): (goto-char start))
+1.1 (roland 13-May-91): (let ((case-fold-search nil))
+1.10 (jimb 19-Apr-92): (if (re-search-forward (concat "^" rmail-unix-mail-delimiter) nil t)
+1.1 (roland 13-May-91): (replace-match
+1.1 (roland 13-May-91): (concat
+1.1 (roland 13-May-91): "Mail-from: \\&"
+1.1 (roland 13-May-91): ;; Keep and reformat the date if we don't
+1.1 (roland 13-May-91): ;; have a Date: field.
+1.1 (roland 13-May-91): (if has-date
+1.1 (roland 13-May-91): ""
+1.24 (jimb 13-Sep-92): (concat
+1.188 (rms 28-Jun-96): "Date: \\2, \\4 \\3 \\9 \\5 "
+1.358 (pot 06-May-02):
+1.24 (jimb 13-Sep-92): ;; The timezone could be matched by group 7 or group 10.
+1.24 (jimb 13-Sep-92): ;; If neither of them matched, assume EST, since only
+1.24 (jimb 13-Sep-92): ;; Easterners would be so sloppy.
+1.24 (jimb 13-Sep-92): ;; It's a shame the substitution can't use "\\10".
+1.24 (jimb 13-Sep-92): (cond
+1.24 (jimb 13-Sep-92): ((/= (match-beginning 7) (match-end 7)) "\\7")
+1.24 (jimb 13-Sep-92): ((/= (match-beginning 10) (match-end 10))
+1.24 (jimb 13-Sep-92): (buffer-substring (match-beginning 10)
+1.24 (jimb 13-Sep-92): (match-end 10)))
+1.24 (jimb 13-Sep-92): (t "EST"))
+1.24 (jimb 13-Sep-92): "\n"))
+1.1 (roland 13-May-91): ;; Keep and reformat the sender if we don't
+1.1 (roland 13-May-91): ;; have a From: field.
+1.1 (roland 13-May-91): (if has-from
+1.1 (roland 13-May-91): ""
+1.60 (rms 29-Jul-93): "From: \\1\n"))
+1.60 (rms 29-Jul-93): t)))))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;;;; *** Rmail Message Formatting and Header Manipulation ***
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-reformat-message (beg end)
+1.1 (roland 13-May-91): (goto-char beg)
+1.1 (roland 13-May-91): (forward-line 1)
+1.1 (roland 13-May-91): (if (/= (following-char) ?0)
+1.348 (pj 15-Jul-01): (error "Bad format in RMAIL file"))
+1.344 (rms 29-Jun-01): (let ((inhibit-read-only t)
+1.1 (roland 13-May-91): (delta (- (buffer-size) end)))
+1.1 (roland 13-May-91): (delete-char 1)
+1.1 (roland 13-May-91): (insert ?1)
+1.1 (roland 13-May-91): (forward-line 1)
+1.60 (rms 29-Jul-93): (let ((case-fold-search t))
+1.68 (rms 09-Oct-93): (while (looking-at "Summary-line:\\|Mail-From:")
+1.68 (rms 09-Oct-93): (forward-line 1)))
+1.1 (roland 13-May-91): (if (looking-at "\\*\\*\\* EOOH \\*\\*\\*\n")
+1.1 (roland 13-May-91): (delete-region (point)
+1.1 (roland 13-May-91): (progn (forward-line 1) (point))))
+1.1 (roland 13-May-91): (let ((str (buffer-substring (point)
+1.1 (roland 13-May-91): (save-excursion (search-forward "\n\n" end 'move)
+1.1 (roland 13-May-91): (point)))))
+1.1 (roland 13-May-91): (insert str "*** EOOH ***\n")
+1.1 (roland 13-May-91): (narrow-to-region (point) (- (buffer-size) delta)))
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.129 (rms 24-Sep-94): (if rmail-message-filter (funcall rmail-message-filter))
+1.150 (rms 14-Apr-95): (if (or rmail-displayed-headers rmail-ignored-headers)
+1.150 (rms 14-Apr-95): (rmail-clear-headers))))
+1.1 (roland 13-May-91):
+1.128 (rms 23-Sep-94): (defun rmail-clear-headers (&optional ignored-headers)
+1.150 (rms 14-Apr-95): "Delete all header fields that Rmail should not show.
+1.150 (rms 14-Apr-95): If the optional argument IGNORED-HEADERS is non-nil,
+1.150 (rms 14-Apr-95): delete all header fields whose names match that regexp.
+1.150 (rms 14-Apr-95): Otherwise, if `rmail-displayed-headers' is non-nil,
+1.150 (rms 14-Apr-95): delete all header fields *except* those whose names match that regexp.
+1.413 (rms 15-Aug-05): Otherwise, delete all header fields whose names match `rmail-ignored-headers'
+1.413 (rms 15-Aug-05): unless they also match `rmail-nonignored-headers'."
+1.253 (rms 16-Mar-98): (when (search-forward "\n\n" nil t)
+1.253 (rms 16-Mar-98): (forward-char -1)
+1.253 (rms 16-Mar-98): (let ((case-fold-search t)
+1.253 (rms 16-Mar-98): (buffer-read-only nil))
+1.253 (rms 16-Mar-98): (if (and rmail-displayed-headers (null ignored-headers))
+1.254 (rms 26-Mar-98): (save-restriction
+1.254 (rms 26-Mar-98): (narrow-to-region (point-min) (point))
+1.254 (rms 26-Mar-98): (let (lim next)
+1.254 (rms 26-Mar-98): (goto-char (point-min))
+1.254 (rms 26-Mar-98): (while (and (not (eobp))
+1.254 (rms 26-Mar-98): (save-excursion
+1.254 (rms 26-Mar-98): (if (re-search-forward "\n[^ \t]" nil t)
+1.254 (rms 26-Mar-98): (setq lim (match-beginning 0)
+1.254 (rms 26-Mar-98): next (1+ lim))
+1.254 (rms 26-Mar-98): (setq lim nil next (point-max)))))
+1.254 (rms 26-Mar-98): (if (save-excursion
+1.254 (rms 26-Mar-98): (re-search-forward rmail-displayed-headers lim t))
+1.254 (rms 26-Mar-98): (goto-char next)
+1.254 (rms 26-Mar-98): (delete-region (point) next))))
+1.254 (rms 26-Mar-98): (goto-char (point-min)))
+1.253 (rms 16-Mar-98): (or ignored-headers (setq ignored-headers rmail-ignored-headers))
+1.253 (rms 16-Mar-98): (save-restriction
+1.253 (rms 16-Mar-98): (narrow-to-region (point-min) (point))
+1.413 (rms 15-Aug-05): (goto-char (point-min))
+1.320 (gerd 07-Jul-00): (while (and ignored-headers
+1.413 (rms 15-Aug-05): (re-search-forward ignored-headers nil t))
+1.253 (rms 16-Mar-98): (beginning-of-line)
+1.448 (bastien1 10-Feb-08): (if (and rmail-nonignored-headers
+1.448 (bastien1 10-Feb-08): (looking-at rmail-nonignored-headers))
+1.413 (rms 15-Aug-05): (forward-line 1)
+1.413 (rms 15-Aug-05): (delete-region (point)
+1.413 (rms 15-Aug-05): (save-excursion
+1.413 (rms 15-Aug-05): (if (re-search-forward "\n[^ \t]" nil t)
+1.413 (rms 15-Aug-05): (1- (point))
+1.413 (rms 15-Aug-05): (point-max)))))))))))
+1.1 (roland 13-May-91):
+1.204 (rms 28-Dec-96): (defun rmail-msg-is-pruned ()
+1.1 (roland 13-May-91): (rmail-maybe-set-message-counters)
+1.204 (rms 28-Dec-96): (save-restriction
+1.271 (rms 27-May-98): (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
+1.204 (rms 28-Dec-96): (save-excursion
+1.271 (rms 27-May-98): (goto-char (point-min))
+1.271 (rms 27-May-98): (forward-line 1)
+1.204 (rms 28-Dec-96): (= (following-char) ?1))))
+1.204 (rms 28-Dec-96):
+1.343 (gerd 26-Jun-01): (defun rmail-msg-restore-non-pruned-header ()
+1.344 (rms 29-Jun-01): (let ((old-point (point))
+1.344 (rms 29-Jun-01): new-point
+1.344 (rms 29-Jun-01): new-start
+1.344 (rms 29-Jun-01): (inhibit-read-only t))
+1.344 (rms 29-Jun-01): (save-excursion
+1.344 (rms 29-Jun-01): (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
+1.343 (gerd 26-Jun-01): (goto-char (point-min))
+1.343 (gerd 26-Jun-01): (forward-line 1)
+1.343 (gerd 26-Jun-01): ;; Change 1 to 0.
+1.343 (gerd 26-Jun-01): (delete-char 1)
+1.343 (gerd 26-Jun-01): (insert ?0)
+1.343 (gerd 26-Jun-01): ;; Insert new EOOH line at the proper place.
+1.343 (gerd 26-Jun-01): (forward-line 1)
+1.343 (gerd 26-Jun-01): (let ((case-fold-search t))
+1.343 (gerd 26-Jun-01): (while (looking-at "Summary-Line:\\|Mail-From:")
+1.343 (gerd 26-Jun-01): (forward-line 1)))
+1.343 (gerd 26-Jun-01): (insert "*** EOOH ***\n")
+1.343 (gerd 26-Jun-01): (setq new-start (point))
+1.343 (gerd 26-Jun-01): ;; Delete the old reformatted header.
+1.343 (gerd 26-Jun-01): (forward-char -1)
+1.343 (gerd 26-Jun-01): (search-forward "\n*** EOOH ***\n")
+1.343 (gerd 26-Jun-01): (forward-line -1)
+1.343 (gerd 26-Jun-01): (let ((start (point)))
+1.343 (gerd 26-Jun-01): (search-forward "\n\n")
+1.344 (rms 29-Jun-01): (if (and (<= start old-point)
+1.344 (rms 29-Jun-01): (<= old-point (point)))
+1.344 (rms 29-Jun-01): (setq new-point new-start))
+1.343 (gerd 26-Jun-01): (delete-region start (point)))
+1.343 (gerd 26-Jun-01): ;; Narrow to after the new EOOH line.
+1.344 (rms 29-Jun-01): (narrow-to-region new-start (point-max)))
+1.344 (rms 29-Jun-01): (if new-point
+1.344 (rms 29-Jun-01): (goto-char new-point))))
+1.343 (gerd 26-Jun-01):
+1.343 (gerd 26-Jun-01): (defun rmail-msg-prune-header ()
+1.344 (rms 29-Jun-01): (let ((new-point
+1.344 (rms 29-Jun-01): (= (point) (point-min))))
+1.344 (rms 29-Jun-01): (save-excursion
+1.344 (rms 29-Jun-01): (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
+1.344 (rms 29-Jun-01): (rmail-reformat-message (point-min) (point-max)))
+1.344 (rms 29-Jun-01): (if new-point
+1.344 (rms 29-Jun-01): (goto-char (point-min)))))
+1.343 (gerd 26-Jun-01):
+1.204 (rms 28-Dec-96): (defun rmail-toggle-header (&optional arg)
+1.204 (rms 28-Dec-96): "Show original message header if pruned header currently shown, or vice versa.
+1.204 (rms 28-Dec-96): With argument ARG, show the message header pruned if ARG is greater than zero;
+1.204 (rms 28-Dec-96): otherwise, show it in full."
+1.204 (rms 28-Dec-96): (interactive "P")
+1.343 (gerd 26-Jun-01): (let* ((pruned (with-current-buffer rmail-buffer
+1.343 (gerd 26-Jun-01): (rmail-msg-is-pruned)))
+1.273 (kwzh 04-Jun-98): (prune (if arg
+1.273 (kwzh 04-Jun-98): (> (prefix-numeric-value arg) 0)
+1.273 (kwzh 04-Jun-98): (not pruned))))
+1.273 (kwzh 04-Jun-98): (if (eq pruned prune)
+1.273 (kwzh 04-Jun-98): t
+1.343 (gerd 26-Jun-01): (set-buffer rmail-buffer)
+1.273 (kwzh 04-Jun-98): (rmail-maybe-set-message-counters)
+1.343 (gerd 26-Jun-01): (if rmail-enable-mime
+1.343 (gerd 26-Jun-01): (let ((buffer-read-only nil))
+1.343 (gerd 26-Jun-01): (if pruned
+1.343 (gerd 26-Jun-01): (rmail-msg-restore-non-pruned-header)
+1.343 (gerd 26-Jun-01): (rmail-msg-prune-header))
+1.343 (gerd 26-Jun-01): (funcall rmail-show-mime-function))
+1.343 (gerd 26-Jun-01): (let* ((buffer-read-only nil)
+1.343 (gerd 26-Jun-01): (window (get-buffer-window (current-buffer)))
+1.343 (gerd 26-Jun-01): (at-point-min (= (point) (point-min)))
+1.343 (gerd 26-Jun-01): (all-headers-visible (= (window-start window) (point-min)))
+1.343 (gerd 26-Jun-01): (on-header
+1.343 (gerd 26-Jun-01): (save-excursion
+1.343 (gerd 26-Jun-01): (and (not (search-backward "\n\n" nil t))
+1.343 (gerd 26-Jun-01): (progn
+1.343 (gerd 26-Jun-01): (end-of-line)
+1.343 (gerd 26-Jun-01): (re-search-backward "^[-A-Za-z0-9]+:" nil t))
+1.343 (gerd 26-Jun-01): (match-string 0))))
+1.343 (gerd 26-Jun-01): (old-screen-line
+1.343 (gerd 26-Jun-01): (rmail-count-screen-lines (window-start window) (point))))
+1.275 (rms 11-Jun-98): (if pruned
+1.343 (gerd 26-Jun-01): (rmail-msg-restore-non-pruned-header)
+1.343 (gerd 26-Jun-01): (rmail-msg-prune-header))
+1.343 (gerd 26-Jun-01): (cond (at-point-min
+1.343 (gerd 26-Jun-01): (goto-char (point-min)))
+1.343 (gerd 26-Jun-01): (on-header
+1.343 (gerd 26-Jun-01): (goto-char (point-min))
+1.343 (gerd 26-Jun-01): (search-forward "\n\n")
+1.343 (gerd 26-Jun-01): (or (re-search-backward
+1.343 (gerd 26-Jun-01): (concat "^" (regexp-quote on-header)) nil t)
+1.343 (gerd 26-Jun-01): (goto-char (point-min))))
+1.343 (gerd 26-Jun-01): (t
+1.343 (gerd 26-Jun-01): (save-selected-window
+1.343 (gerd 26-Jun-01): (select-window window)
+1.343 (gerd 26-Jun-01): (recenter old-screen-line)
+1.343 (gerd 26-Jun-01): (if (and all-headers-visible
+1.343 (gerd 26-Jun-01): (not (= (window-start) (point-min))))
+1.355 (rms 06-Feb-02): (recenter (- (window-height) 2))))))))
+1.273 (kwzh 04-Jun-98): (rmail-highlight-headers))))
+1.273 (kwzh 04-Jun-98):
+1.344 (rms 29-Jun-01): (defun rmail-narrow-to-non-pruned-header ()
+1.344 (rms 29-Jun-01): "Narrow to the whole (original) header of the current message."
+1.344 (rms 29-Jun-01): (let (start end)
+1.344 (rms 29-Jun-01): (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
+1.344 (rms 29-Jun-01): (goto-char (point-min))
+1.344 (rms 29-Jun-01): (forward-line 1)
+1.344 (rms 29-Jun-01): (if (= (following-char) ?1)
+1.344 (rms 29-Jun-01): (progn
+1.344 (rms 29-Jun-01): (forward-line 1)
+1.344 (rms 29-Jun-01): (setq start (point))
+1.344 (rms 29-Jun-01): (search-forward "*** EOOH ***\n")
+1.344 (rms 29-Jun-01): (setq end (match-beginning 0)))
+1.344 (rms 29-Jun-01): (forward-line 2)
+1.344 (rms 29-Jun-01): (setq start (point))
+1.344 (rms 29-Jun-01): (search-forward "\n\n")
+1.344 (rms 29-Jun-01): (setq end (1- (point))))
+1.344 (rms 29-Jun-01): (narrow-to-region start end)
+1.344 (rms 29-Jun-01): (goto-char start)))
+1.344 (rms 29-Jun-01):
+1.273 (kwzh 04-Jun-98): ;; Lifted from repos-count-screen-lines.
+1.273 (kwzh 04-Jun-98): ;; Return number of screen lines between START and END.
+1.273 (kwzh 04-Jun-98): (defun rmail-count-screen-lines (start end)
+1.272 (kwzh 02-Jun-98): (save-excursion
+1.273 (kwzh 04-Jun-98): (save-restriction
+1.273 (kwzh 04-Jun-98): (narrow-to-region start end)
+1.273 (kwzh 04-Jun-98): (goto-char (point-min))
+1.273 (kwzh 04-Jun-98): (vertical-motion (- (point-max) (point-min))))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;;;; *** Rmail Attributes and Keywords ***
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; Make a string describing current message's attributes and keywords
+1.1 (roland 13-May-91): ;; and set it up as the name of a minor mode
+1.1 (roland 13-May-91): ;; so it will appear in the mode line.
+1.1 (roland 13-May-91): (defun rmail-display-labels ()
+1.1 (roland 13-May-91): (let ((blurb "") (beg (point-min-marker)) (end (point-max-marker)))
+1.1 (roland 13-May-91): (save-excursion
+1.1 (roland 13-May-91): (unwind-protect
+1.1 (roland 13-May-91): (progn
+1.1 (roland 13-May-91): (widen)
+1.1 (roland 13-May-91): (goto-char (rmail-msgbeg rmail-current-message))
+1.1 (roland 13-May-91): (forward-line 1)
+1.1 (roland 13-May-91): (if (looking-at "[01],")
+1.1 (roland 13-May-91): (progn
+1.1 (roland 13-May-91): (narrow-to-region (point) (progn (end-of-line) (point)))
+1.1 (roland 13-May-91): ;; Truly valid BABYL format requires a space before each
+1.1 (roland 13-May-91): ;; attribute or keyword name. Put them in if missing.
+1.1 (roland 13-May-91): (let (buffer-read-only)
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.1 (roland 13-May-91): (while (search-forward "," nil t)
+1.1 (roland 13-May-91): (or (looking-at "[ ,]") (eobp)
+1.1 (roland 13-May-91): (insert " "))))
+1.1 (roland 13-May-91): (goto-char (point-max))
+1.1 (roland 13-May-91): (if (search-backward ",," nil 'move)
+1.1 (roland 13-May-91): (progn
+1.1 (roland 13-May-91): (if (> (point) (1+ (point-min)))
+1.1 (roland 13-May-91): (setq blurb (buffer-substring (+ 1 (point-min)) (point))))
+1.1 (roland 13-May-91): (if (> (- (point-max) (point)) 2)
+1.1 (roland 13-May-91): (setq blurb
+1.1 (roland 13-May-91): (concat blurb
+1.1 (roland 13-May-91): ";"
+1.1 (roland 13-May-91): (buffer-substring (+ (point) 3)
+1.1 (roland 13-May-91): (1- (point-max)))))))))))
+1.1 (roland 13-May-91): ;; Note: we don't use save-restriction because that does not work right
+1.1 (roland 13-May-91): ;; if changes are made outside the saved restriction
+1.1 (roland 13-May-91): ;; before that restriction is restored.
+1.1 (roland 13-May-91): (narrow-to-region beg end)
+1.1 (roland 13-May-91): (set-marker beg nil)
+1.1 (roland 13-May-91): (set-marker end nil)))
+1.1 (roland 13-May-91): (while (string-match " +," blurb)
+1.1 (roland 13-May-91): (setq blurb (concat (substring blurb 0 (match-beginning 0)) ","
+1.1 (roland 13-May-91): (substring blurb (match-end 0)))))
+1.1 (roland 13-May-91): (while (string-match ", +" blurb)
+1.1 (roland 13-May-91): (setq blurb (concat (substring blurb 0 (match-beginning 0)) ","
+1.1 (roland 13-May-91): (substring blurb (match-end 0)))))
+1.1 (roland 13-May-91): (setq mode-line-process
+1.150 (rms 14-Apr-95): (format " %d/%d%s"
+1.339 (gerd 08-May-01): rmail-current-message rmail-total-messages blurb))
+1.339 (gerd 08-May-01): ;; If rmail-enable-mime is non-nil, we may have to update
+1.339 (gerd 08-May-01): ;; `mode-line-process' of rmail-view-buffer too.
+1.339 (gerd 08-May-01): (if (and rmail-enable-mime
+1.339 (gerd 08-May-01): (not (eq (current-buffer) rmail-view-buffer))
+1.339 (gerd 08-May-01): (buffer-live-p rmail-view-buffer))
+1.339 (gerd 08-May-01): (let ((mlp mode-line-process))
+1.339 (gerd 08-May-01): (with-current-buffer rmail-view-buffer
+1.339 (gerd 08-May-01): (setq mode-line-process mlp))))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; Turn an attribute of a message on or off according to STATE.
+1.1 (roland 13-May-91): ;; ATTR is the name of the attribute, as a string.
+1.1 (roland 13-May-91): ;; MSGNUM is message number to change; nil means current message.
+1.1 (roland 13-May-91): (defun rmail-set-attribute (attr state &optional msgnum)
+1.339 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.1 (roland 13-May-91): (let ((omax (point-max-marker))
+1.1 (roland 13-May-91): (omin (point-min-marker))
+1.1 (roland 13-May-91): (buffer-read-only nil))
+1.1 (roland 13-May-91): (or msgnum (setq msgnum rmail-current-message))
+1.71 (rms 16-Nov-93): (if (> msgnum 0)
+1.71 (rms 16-Nov-93): (unwind-protect
+1.71 (rms 16-Nov-93): (save-excursion
+1.71 (rms 16-Nov-93): (widen)
+1.71 (rms 16-Nov-93): (goto-char (+ 3 (rmail-msgbeg msgnum)))
+1.71 (rms 16-Nov-93): (let ((curstate
+1.71 (rms 16-Nov-93): (not
+1.71 (rms 16-Nov-93): (null (search-backward (concat ", " attr ",")
+1.71 (rms 16-Nov-93): (prog1 (point) (end-of-line)) t)))))
+1.71 (rms 16-Nov-93): (or (eq curstate (not (not state)))
+1.71 (rms 16-Nov-93): (if curstate
+1.71 (rms 16-Nov-93): (delete-region (point) (1- (match-end 0)))
+1.71 (rms 16-Nov-93): (beginning-of-line)
+1.71 (rms 16-Nov-93): (forward-char 2)
+1.71 (rms 16-Nov-93): (insert " " attr ","))))
+1.71 (rms 16-Nov-93): (if (string= attr "deleted")
+1.71 (rms 16-Nov-93): (rmail-set-message-deleted-p msgnum state)))
+1.71 (rms 16-Nov-93): ;; Note: we don't use save-restriction because that does not work right
+1.71 (rms 16-Nov-93): ;; if changes are made outside the saved restriction
+1.71 (rms 16-Nov-93): ;; before that restriction is restored.
+1.71 (rms 16-Nov-93): (narrow-to-region omin omax)
+1.71 (rms 16-Nov-93): (set-marker omin nil)
+1.71 (rms 16-Nov-93): (set-marker omax nil)
+1.71 (rms 16-Nov-93): (if (= msgnum rmail-current-message)
+1.71 (rms 16-Nov-93): (rmail-display-labels))))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; Return t if the attributes/keywords line of msg number MSG
+1.1 (roland 13-May-91): ;; contains a match for the regexp LABELS.
+1.1 (roland 13-May-91): (defun rmail-message-labels-p (msg labels)
+1.1 (roland 13-May-91): (save-excursion
+1.1 (roland 13-May-91): (save-restriction
+1.1 (roland 13-May-91): (widen)
+1.1 (roland 13-May-91): (goto-char (rmail-msgbeg msg))
+1.1 (roland 13-May-91): (forward-char 3)
+1.1 (roland 13-May-91): (re-search-backward labels (prog1 (point) (end-of-line)) t))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;;;; *** Rmail Message Selection And Support ***
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-msgend (n)
+1.1 (roland 13-May-91): (marker-position (aref rmail-message-vector (1+ n))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-msgbeg (n)
+1.1 (roland 13-May-91): (marker-position (aref rmail-message-vector n)))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-widen-to-current-msgbeg (function)
+1.1 (roland 13-May-91): "Call FUNCTION with point at start of internal data of current message.
+1.1 (roland 13-May-91): Assumes that bounds were previously narrowed to display the message in Rmail.
+1.1 (roland 13-May-91): The bounds are widened enough to move point where desired, then narrowed
+1.1 (roland 13-May-91): again afterward.
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): FUNCTION may not change the visible text of the message, but it may
+1.1 (roland 13-May-91): change the invisible header text."
+1.1 (roland 13-May-91): (save-excursion
+1.318 (gerd 30-May-00): (unwind-protect
+1.318 (gerd 30-May-00): (progn
+1.318 (gerd 30-May-00): (narrow-to-region (rmail-msgbeg rmail-current-message)
+1.318 (gerd 30-May-00): (point-max))
+1.318 (gerd 30-May-00): (goto-char (point-min))
+1.318 (gerd 30-May-00): (funcall function))
+1.1 (roland 13-May-91): ;; Note: we don't use save-restriction because that does not work right
+1.1 (roland 13-May-91): ;; if changes are made outside the saved restriction
+1.1 (roland 13-May-91): ;; before that restriction is restored.
+1.318 (gerd 30-May-00): (narrow-to-region (rmail-msgbeg rmail-current-message)
+1.318 (gerd 30-May-00): (rmail-msgend rmail-current-message)))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-forget-messages ()
+1.1 (roland 13-May-91): (unwind-protect
+1.1 (roland 13-May-91): (if (vectorp rmail-message-vector)
+1.1 (roland 13-May-91): (let* ((i 0)
+1.1 (roland 13-May-91): (v rmail-message-vector)
+1.1 (roland 13-May-91): (n (length v)))
+1.1 (roland 13-May-91): (while (< i n)
+1.1 (roland 13-May-91): (move-marker (aref v i) nil)
+1.1 (roland 13-May-91): (setq i (1+ i)))))
+1.1 (roland 13-May-91): (setq rmail-message-vector nil)
+1.218 (rms 02-May-97): (setq rmail-msgref-vector nil)
+1.1 (roland 13-May-91): (setq rmail-deleted-vector nil)))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-maybe-set-message-counters ()
+1.1 (roland 13-May-91): (if (not (and rmail-deleted-vector
+1.1 (roland 13-May-91): rmail-message-vector
+1.1 (roland 13-May-91): rmail-current-message
+1.1 (roland 13-May-91): rmail-total-messages))
+1.1 (roland 13-May-91): (rmail-set-message-counters)))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-count-new-messages (&optional nomsg)
+1.1 (roland 13-May-91): (let* ((case-fold-search nil)
+1.1 (roland 13-May-91): (total-messages 0)
+1.1 (roland 13-May-91): (messages-head nil)
+1.1 (roland 13-May-91): (deleted-head nil))
+1.1 (roland 13-May-91): (or nomsg (message "Counting new messages..."))
+1.1 (roland 13-May-91): (goto-char (point-max))
+1.1 (roland 13-May-91): ;; Put at the end of messages-head
+1.1 (roland 13-May-91): ;; the entry for message N+1, which marks
+1.1 (roland 13-May-91): ;; the end of message N. (N = number of messages).
+1.1 (roland 13-May-91): (search-backward "\n\^_")
+1.1 (roland 13-May-91): (forward-char 1)
+1.1 (roland 13-May-91): (setq messages-head (list (point-marker)))
+1.1 (roland 13-May-91): (rmail-set-message-counters-counter (point-min))
+1.1 (roland 13-May-91): (setq rmail-current-message (1+ rmail-total-messages))
+1.1 (roland 13-May-91): (setq rmail-total-messages
+1.1 (roland 13-May-91): (+ rmail-total-messages total-messages))
+1.1 (roland 13-May-91): (setq rmail-message-vector
+1.1 (roland 13-May-91): (vconcat rmail-message-vector (cdr messages-head)))
+1.1 (roland 13-May-91): (aset rmail-message-vector
+1.1 (roland 13-May-91): rmail-current-message (car messages-head))
+1.1 (roland 13-May-91): (setq rmail-deleted-vector
+1.1 (roland 13-May-91): (concat rmail-deleted-vector deleted-head))
+1.1 (roland 13-May-91): (setq rmail-summary-vector
+1.1 (roland 13-May-91): (vconcat rmail-summary-vector (make-vector total-messages nil)))
+1.218 (rms 02-May-97): (setq rmail-msgref-vector
+1.218 (rms 02-May-97): (vconcat rmail-msgref-vector (make-vector total-messages nil)))
+1.218 (rms 02-May-97): ;; Fill in the new elements of rmail-msgref-vector.
+1.220 (rms 04-May-97): (let ((i (1+ (- rmail-total-messages total-messages))))
+1.218 (rms 02-May-97): (while (<= i rmail-total-messages)
+1.218 (rms 02-May-97): (aset rmail-msgref-vector i (list i))
+1.218 (rms 02-May-97): (setq i (1+ i))))
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.1 (roland 13-May-91): (or nomsg (message "Counting new messages...done (%d)" total-messages))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-set-message-counters ()
+1.1 (roland 13-May-91): (rmail-forget-messages)
+1.1 (roland 13-May-91): (save-excursion
+1.1 (roland 13-May-91): (save-restriction
+1.1 (roland 13-May-91): (widen)
+1.1 (roland 13-May-91): (let* ((point-save (point))
+1.1 (roland 13-May-91): (total-messages 0)
+1.1 (roland 13-May-91): (messages-after-point)
+1.1 (roland 13-May-91): (case-fold-search nil)
+1.1 (roland 13-May-91): (messages-head nil)
+1.1 (roland 13-May-91): (deleted-head nil))
+1.1 (roland 13-May-91): (message "Counting messages...")
+1.1 (roland 13-May-91): (goto-char (point-max))
+1.1 (roland 13-May-91): ;; Put at the end of messages-head
+1.1 (roland 13-May-91): ;; the entry for message N+1, which marks
+1.1 (roland 13-May-91): ;; the end of message N. (N = number of messages).
+1.79 (rms 14-Jan-94): (search-backward "\n\^_" nil t)
+1.79 (rms 14-Jan-94): (if (/= (point) (point-max)) (forward-char 1))
+1.1 (roland 13-May-91): (setq messages-head (list (point-marker)))
+1.1 (roland 13-May-91): (rmail-set-message-counters-counter (min (point) point-save))
+1.1 (roland 13-May-91): (setq messages-after-point total-messages)
+1.1 (roland 13-May-91): (rmail-set-message-counters-counter)
+1.1 (roland 13-May-91): (setq rmail-total-messages total-messages)
+1.1 (roland 13-May-91): (setq rmail-current-message
+1.1 (roland 13-May-91): (min total-messages
+1.1 (roland 13-May-91): (max 1 (- total-messages messages-after-point))))
+1.1 (roland 13-May-91): (setq rmail-message-vector
+1.1 (roland 13-May-91): (apply 'vector (cons (point-min-marker) messages-head))
+1.324 (gerd 30-Nov-00): rmail-deleted-vector (concat "0" deleted-head)
+1.218 (rms 02-May-97): rmail-summary-vector (make-vector rmail-total-messages nil)
+1.218 (rms 02-May-97): rmail-msgref-vector (make-vector (1+ rmail-total-messages) nil))
+1.218 (rms 02-May-97): (let ((i 0))
+1.218 (rms 02-May-97): (while (<= i rmail-total-messages)
+1.218 (rms 02-May-97): (aset rmail-msgref-vector i (list i))
+1.218 (rms 02-May-97): (setq i (1+ i))))
+1.1 (roland 13-May-91): (message "Counting messages...done")))))
+1.358 (pot 06-May-02):
+1.1 (roland 13-May-91): (defun rmail-set-message-counters-counter (&optional stop)
+1.292 (andrewi 22-Nov-98): (let ((start (point))
+1.292 (andrewi 22-Nov-98): next)
+1.292 (andrewi 22-Nov-98): (while (search-backward "\n\^_\^L" stop t)
+1.292 (andrewi 22-Nov-98): ;; Detect messages that have been added with DOS line endings and
+1.292 (andrewi 22-Nov-98): ;; convert the line endings for such messages.
+1.292 (andrewi 22-Nov-98): (setq next (point))
+1.292 (andrewi 22-Nov-98): (if (looking-at "\n\^_\^L\r\n")
+1.292 (andrewi 22-Nov-98): (let ((buffer-read-only nil)
+1.292 (andrewi 22-Nov-98): (buffer-undo t))
+1.292 (andrewi 22-Nov-98): (message "Counting messages...(converting line endings)")
+1.292 (andrewi 22-Nov-98): (save-excursion
+1.292 (andrewi 22-Nov-98): (goto-char start)
+1.292 (andrewi 22-Nov-98): (while (search-backward "\r\n" next t)
+1.292 (andrewi 22-Nov-98): (delete-char 1)))))
+1.292 (andrewi 22-Nov-98): (setq start next)
+1.292 (andrewi 22-Nov-98): (forward-char 1)
+1.292 (andrewi 22-Nov-98): (setq messages-head (cons (point-marker) messages-head))
+1.292 (andrewi 22-Nov-98): (save-excursion
+1.292 (andrewi 22-Nov-98): (setq deleted-head
+1.292 (andrewi 22-Nov-98): (cons (if (search-backward ", deleted,"
+1.292 (andrewi 22-Nov-98): (prog1 (point)
+1.292 (andrewi 22-Nov-98): (forward-line 2))
+1.292 (andrewi 22-Nov-98): t)
+1.292 (andrewi 22-Nov-98): ?D ?\ )
+1.292 (andrewi 22-Nov-98): deleted-head)))
+1.292 (andrewi 22-Nov-98): (if (zerop (% (setq total-messages (1+ total-messages)) 20))
+1.292 (andrewi 22-Nov-98): (message "Counting messages...%d" total-messages)))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-beginning-of-message ()
+1.1 (roland 13-May-91): "Show current message starting from the beginning."
+1.1 (roland 13-May-91): (interactive)
+1.410 (eliz 12-Aug-05): (let ((rmail-show-message-hook
+1.410 (eliz 12-Aug-05): (list (function (lambda ()
+1.410 (eliz 12-Aug-05): (goto-char (point-min)))))))
+1.410 (eliz 12-Aug-05): (rmail-show-message rmail-current-message)))
+1.410 (eliz 12-Aug-05):
+1.410 (eliz 12-Aug-05): (defun rmail-end-of-message ()
+1.410 (eliz 12-Aug-05): "Show bottom of current message."
+1.410 (eliz 12-Aug-05): (interactive)
+1.410 (eliz 12-Aug-05): (let ((rmail-show-message-hook
+1.410 (eliz 12-Aug-05): (list (function (lambda ()
+1.410 (eliz 12-Aug-05): (goto-char (point-max))
+1.410 (eliz 12-Aug-05): (recenter (1- (window-height))))))))
+1.410 (eliz 12-Aug-05): (rmail-show-message rmail-current-message)))
+1.1 (roland 13-May-91):
+1.397 (rms 18-Mar-05): (defun rmail-unknown-mail-followup-to ()
+1.397 (rms 18-Mar-05): "Handle a \"Mail-Followup-To\" header field with an unknown mailing list.
+1.397 (rms 18-Mar-05): Ask the user whether to add that list name to `mail-mailing-lists'."
+1.397 (rms 18-Mar-05): (save-restriction
+1.397 (rms 18-Mar-05): (rmail-narrow-to-non-pruned-header)
+1.397 (rms 18-Mar-05): (let ((mail-followup-to (mail-fetch-field "mail-followup-to" nil t)))
+1.397 (rms 18-Mar-05): (when mail-followup-to
+1.397 (rms 18-Mar-05): (let ((addresses
+1.407 (ttn 06-Aug-05): (split-string
+1.397 (rms 18-Mar-05): (mail-strip-quoted-names mail-followup-to)
+1.397 (rms 18-Mar-05): ",[[:space:]]+" t)))
+1.397 (rms 18-Mar-05): (dolist (addr addresses)
+1.397 (rms 18-Mar-05): (when (and (not (member addr mail-mailing-lists))
+1.397 (rms 18-Mar-05): (not
+1.397 (rms 18-Mar-05): ;; taken from rmailsum.el
+1.397 (rms 18-Mar-05): (string-match
+1.397 (rms 18-Mar-05): (or rmail-user-mail-address-regexp
+1.397 (rms 18-Mar-05): (concat "^\\("
+1.397 (rms 18-Mar-05): (regexp-quote (user-login-name))
+1.397 (rms 18-Mar-05): "\\($\\|@\\)\\|"
+1.397 (rms 18-Mar-05): (regexp-quote
+1.397 (rms 18-Mar-05): (or user-mail-address
+1.397 (rms 18-Mar-05): (concat (user-login-name) "@"
+1.397 (rms 18-Mar-05): (or mail-host-address
+1.397 (rms 18-Mar-05): (system-name)))))
+1.397 (rms 18-Mar-05): "\\>\\)"))
+1.397 (rms 18-Mar-05): addr))
+1.397 (rms 18-Mar-05): (y-or-n-p
+1.397 (rms 18-Mar-05): (format "Add `%s' to `mail-mailing-lists'? "
+1.397 (rms 18-Mar-05): addr)))
+1.397 (rms 18-Mar-05): (customize-save-variable 'mail-mailing-lists
+1.397 (rms 18-Mar-05): (cons addr mail-mailing-lists)))))))))
+1.397 (rms 18-Mar-05):
+1.134 (rms 11-Oct-94): (defun rmail-show-message (&optional n no-summary)
+1.39 (rms 09-Mar-93): "Show message number N (prefix argument), counting from start of file.
+1.39 (rms 09-Mar-93): If summary buffer is currently displayed, update current message there also."
+1.1 (roland 13-May-91): (interactive "p")
+1.212 (handa 26-Feb-97): (or (eq major-mode 'rmail-mode)
+1.212 (handa 26-Feb-97): (switch-to-buffer rmail-buffer))
+1.1 (roland 13-May-91): (rmail-maybe-set-message-counters)
+1.1 (roland 13-May-91): (widen)
+1.1 (roland 13-May-91): (if (zerop rmail-total-messages)
+1.1 (roland 13-May-91): (progn (narrow-to-region (point-min) (1- (point-max)))
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.1 (roland 13-May-91): (setq mode-line-process nil))
+1.265 (rms 12-May-98): (let (blurb coding-system)
+1.1 (roland 13-May-91): (if (not n)
+1.1 (roland 13-May-91): (setq n rmail-current-message)
+1.1 (roland 13-May-91): (cond ((<= n 0)
+1.1 (roland 13-May-91): (setq n 1
+1.1 (roland 13-May-91): rmail-current-message 1
+1.1 (roland 13-May-91): blurb "No previous message"))
+1.1 (roland 13-May-91): ((> n rmail-total-messages)
+1.1 (roland 13-May-91): (setq n rmail-total-messages
+1.1 (roland 13-May-91): rmail-current-message rmail-total-messages
+1.1 (roland 13-May-91): blurb "No following message"))
+1.1 (roland 13-May-91): (t
+1.1 (roland 13-May-91): (setq rmail-current-message n))))
+1.198 (rms 19-Sep-96): (let ((beg (rmail-msgbeg n)))
+1.1 (roland 13-May-91): (goto-char beg)
+1.1 (roland 13-May-91): (forward-line 1)
+1.265 (rms 12-May-98): (save-excursion
+1.265 (rms 12-May-98): (let ((end (rmail-msgend n)))
+1.265 (rms 12-May-98): (save-restriction
+1.265 (rms 12-May-98): (if (prog1 (= (following-char) ?0)
+1.265 (rms 12-May-98): (forward-line 2)
+1.300 (rms 16-Feb-99): ;; If there's a Summary-line in the (otherwise empty)
+1.300 (rms 16-Feb-99): ;; header, we didn't yet get past the EOOH line.
+1.300 (rms 16-Feb-99): (if (looking-at "^\\*\\*\\* EOOH \\*\\*\\*\n")
+1.300 (rms 16-Feb-99): (forward-line 1))
+1.265 (rms 12-May-98): (narrow-to-region (point) end))
+1.265 (rms 12-May-98): (rfc822-goto-eoh)
+1.265 (rms 12-May-98): (search-forward "\n*** EOOH ***\n" end t))
+1.265 (rms 12-May-98): (narrow-to-region beg (point))
+1.265 (rms 12-May-98): (goto-char (point-min))
+1.265 (rms 12-May-98): (if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t)
+1.265 (rms 12-May-98): (let ((coding-system (intern (match-string 1))))
+1.359 (rms 10-May-02): (condition-case nil
+1.359 (rms 10-May-02): (progn
+1.359 (rms 10-May-02): (check-coding-system coding-system)
+1.359 (rms 10-May-02): (setq buffer-file-coding-system coding-system))
+1.368 (jpw 06-Jan-03): (error
+1.359 (rms 10-May-02): (setq buffer-file-coding-system nil))))
+1.265 (rms 12-May-98): (setq buffer-file-coding-system nil)))))
+1.198 (rms 19-Sep-96): ;; Clear the "unseen" attribute when we show a message.
+1.198 (rms 19-Sep-96): (rmail-set-attribute "unseen" nil)
+1.198 (rms 19-Sep-96): (let ((end (rmail-msgend n)))
+1.265 (rms 12-May-98): ;; Reformat the header, or else find the reformatted header.
+1.198 (rms 19-Sep-96): (if (= (following-char) ?0)
+1.1 (roland 13-May-91): (rmail-reformat-message beg end)
+1.198 (rms 19-Sep-96): (search-forward "\n*** EOOH ***\n" end t)
+1.198 (rms 19-Sep-96): (narrow-to-region (point) end)))
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.347 (gerd 10-Jul-01): (walk-windows
+1.347 (gerd 10-Jul-01): (function (lambda (window)
+1.347 (gerd 10-Jul-01): (if (eq (window-buffer window) (current-buffer))
+1.347 (gerd 10-Jul-01): (set-window-point window (point)))))
+1.347 (gerd 10-Jul-01): nil t)
+1.1 (roland 13-May-91): (rmail-display-labels)
+1.212 (handa 26-Feb-97): (if (eq rmail-enable-mime t)
+1.212 (handa 26-Feb-97): (funcall rmail-show-mime-function)
+1.397 (rms 18-Mar-05): (setq rmail-view-buffer rmail-buffer))
+1.397 (rms 18-Mar-05): (when mail-mailing-lists
+1.397 (rms 18-Mar-05): (rmail-unknown-mail-followup-to))
+1.100 (kwzh 24-Apr-94): (rmail-highlight-headers)
+1.105 (rms 26-May-94): (if transient-mark-mode (deactivate-mark))
+1.1 (roland 13-May-91): (run-hooks 'rmail-show-message-hook)
+1.39 (rms 09-Mar-93): ;; If there is a summary buffer, try to move to this message
+1.39 (rms 09-Mar-93): ;; in that buffer. But don't complain if this message
+1.39 (rms 09-Mar-93): ;; is not mentioned in the summary.
+1.134 (rms 11-Oct-94): ;; Don't do this at all if we were called on behalf
+1.134 (rms 11-Oct-94): ;; of cursor motion in the summary buffer.
+1.134 (rms 11-Oct-94): (and (rmail-summary-exists) (not no-summary)
+1.134 (rms 11-Oct-94): (let ((curr-msg rmail-current-message))
+1.134 (rms 11-Oct-94): (rmail-select-summary
+1.134 (rms 11-Oct-94): (rmail-summary-goto-msg curr-msg t t))))
+1.339 (gerd 08-May-01): (with-current-buffer rmail-buffer
+1.339 (gerd 08-May-01): (rmail-auto-file))
+1.1 (roland 13-May-91): (if blurb
+1.1 (roland 13-May-91): (message blurb))))))
+1.1 (roland 13-May-91):
+1.430 (eliz 04-Nov-06): (defun rmail-redecode-body (coding &optional raw)
+1.326 (eliz 22-Jan-01): "Decode the body of the current message using coding system CODING.
+1.326 (eliz 22-Jan-01): This is useful with mail messages that have malformed or missing
+1.326 (eliz 22-Jan-01): charset= headers.
+1.326 (eliz 22-Jan-01):
+1.326 (eliz 22-Jan-01): This function assumes that the current message is already decoded
+1.326 (eliz 22-Jan-01): and displayed in the RMAIL buffer, but the coding system used to
+1.326 (eliz 22-Jan-01): decode it was incorrect. It then encodes the message back to its
+1.327 (eliz 25-Jan-01): original form, and decodes it again, using the coding system CODING.
+1.326 (eliz 22-Jan-01):
+1.430 (eliz 04-Nov-06): Optional argument RAW, if non-nil, means don't encode the message
+1.430 (eliz 04-Nov-06): before decoding it with the new CODING. This is useful if the current
+1.430 (eliz 04-Nov-06): message text was produced by some function which invokes `insert',
+1.430 (eliz 04-Nov-06): since `insert' leaves unibyte character codes 128 through 255 unconverted
+1.430 (eliz 04-Nov-06): to multibyte. One example of such a situation is when the text was
+1.430 (eliz 04-Nov-06): produced by `base64-decode-region'.
+1.430 (eliz 04-Nov-06):
+1.430 (eliz 04-Nov-06): Interactively, invoke the function with a prefix argument to set RAW
+1.430 (eliz 04-Nov-06): non-nil.
+1.430 (eliz 04-Nov-06):
+1.326 (eliz 22-Jan-01): Note that if Emacs erroneously auto-detected one of the iso-2022
+1.326 (eliz 22-Jan-01): encodings in the message, this function might fail because the escape
+1.326 (eliz 22-Jan-01): sequences that switch between character sets and also single-shift and
+1.326 (eliz 22-Jan-01): locking-shift codes are impossible to recover. This function is meant
+1.326 (eliz 22-Jan-01): to be used to fix messages encoded with 8-bit encodings, such as
+1.326 (eliz 22-Jan-01): iso-8859, koi8-r, etc."
+1.326 (eliz 22-Jan-01): (interactive "zCoding system for re-decoding this message: ")
+1.326 (eliz 22-Jan-01): (when (not rmail-enable-mime)
+1.326 (eliz 22-Jan-01): (or (eq major-mode 'rmail-mode)
+1.326 (eliz 22-Jan-01): (switch-to-buffer rmail-buffer))
+1.326 (eliz 22-Jan-01): (save-excursion
+1.430 (eliz 04-Nov-06): (let ((pruned (rmail-msg-is-pruned))
+1.430 (eliz 04-Nov-06): (raw (or raw current-prefix-arg)))
+1.353 (eliz 02-Feb-02): (unwind-protect
+1.353 (eliz 02-Feb-02): (let ((msgbeg (rmail-msgbeg rmail-current-message))
+1.353 (eliz 02-Feb-02): (msgend (rmail-msgend rmail-current-message))
+1.353 (eliz 02-Feb-02): x-coding-header)
+1.353 (eliz 02-Feb-02): ;; We need the message headers pruned (we later restore
+1.353 (eliz 02-Feb-02): ;; the pruned stat to what it was, see the end of
+1.353 (eliz 02-Feb-02): ;; unwind-protect form).
+1.353 (eliz 02-Feb-02): (or pruned
+1.353 (eliz 02-Feb-02): (rmail-toggle-header 1))
+1.353 (eliz 02-Feb-02): (narrow-to-region msgbeg msgend)
+1.353 (eliz 02-Feb-02): (goto-char (point-min))
+1.353 (eliz 02-Feb-02): (when (search-forward "\n*** EOOH ***\n" (point-max) t)
+1.353 (eliz 02-Feb-02): (narrow-to-region msgbeg (point)))
+1.353 (eliz 02-Feb-02): (goto-char (point-min))
+1.353 (eliz 02-Feb-02): (if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t)
+1.353 (eliz 02-Feb-02): (let ((old-coding (intern (match-string 1)))
+1.353 (eliz 02-Feb-02): (buffer-read-only nil))
+1.353 (eliz 02-Feb-02): (check-coding-system old-coding)
+1.353 (eliz 02-Feb-02): ;; Make sure the new coding system uses the same EOL
+1.353 (eliz 02-Feb-02): ;; conversion, to prevent ^M characters from popping
+1.353 (eliz 02-Feb-02): ;; up all over the place.
+1.353 (eliz 02-Feb-02): (setq coding
+1.353 (eliz 02-Feb-02): (coding-system-change-eol-conversion
+1.353 (eliz 02-Feb-02): coding
+1.353 (eliz 02-Feb-02): (coding-system-eol-type old-coding)))
+1.428 (eliz 07-Oct-06): ;; If old-coding is `undecided', encode-coding-region
+1.428 (eliz 07-Oct-06): ;; will not encode the text at all. Find a proper
+1.428 (eliz 07-Oct-06): ;; non-trivial encoding to use.
+1.428 (eliz 07-Oct-06): (if (memq (coding-system-base old-coding) '(nil undecided))
+1.428 (eliz 07-Oct-06): (setq old-coding
+1.428 (eliz 07-Oct-06): (car (find-coding-systems-region msgbeg msgend))))
+1.353 (eliz 02-Feb-02): (setq x-coding-header (point-marker))
+1.353 (eliz 02-Feb-02): (narrow-to-region msgbeg msgend)
+1.430 (eliz 04-Nov-06): (and (null raw)
+1.430 (eliz 04-Nov-06): ;; If old and new encoding are the same, it
+1.430 (eliz 04-Nov-06): ;; clearly doesn't make sense to encode.
+1.430 (eliz 04-Nov-06): (not (coding-system-equal
+1.430 (eliz 04-Nov-06): (coding-system-base old-coding)
+1.430 (eliz 04-Nov-06): (coding-system-base coding)))
+1.430 (eliz 04-Nov-06): ;; If the body includes only eight-bit-*
+1.430 (eliz 04-Nov-06): ;; characters, encoding might fail, e.g. with
+1.430 (eliz 04-Nov-06): ;; UTF-8, and isn't needed anyway.
+1.430 (eliz 04-Nov-06): (> (length (delq 'ascii
+1.430 (eliz 04-Nov-06): (delq 'eight-bit-graphic
+1.430 (eliz 04-Nov-06): (delq 'eight-bit-control
+1.430 (eliz 04-Nov-06): (find-charset-region
+1.430 (eliz 04-Nov-06): msgbeg msgend)))))
+1.430 (eliz 04-Nov-06): 0)
+1.430 (eliz 04-Nov-06): (encode-coding-region (point) msgend old-coding))
+1.353 (eliz 02-Feb-02): (decode-coding-region (point) msgend coding)
+1.353 (eliz 02-Feb-02): (setq last-coding-system-used coding)
+1.353 (eliz 02-Feb-02): ;; Rewrite the coding-system header according
+1.353 (eliz 02-Feb-02): ;; to what we did.
+1.353 (eliz 02-Feb-02): (goto-char x-coding-header)
+1.353 (eliz 02-Feb-02): (delete-region (point)
+1.353 (eliz 02-Feb-02): (save-excursion
+1.353 (eliz 02-Feb-02): (beginning-of-line)
+1.353 (eliz 02-Feb-02): (point)))
+1.353 (eliz 02-Feb-02): (insert "X-Coding-System: "
+1.353 (eliz 02-Feb-02): (symbol-name last-coding-system-used))
+1.353 (eliz 02-Feb-02): (set-marker x-coding-header nil)
+1.353 (eliz 02-Feb-02): (rmail-show-message))
+1.353 (eliz 02-Feb-02): (error "No X-Coding-System header found")))
+1.353 (eliz 02-Feb-02): (or pruned
+1.353 (eliz 02-Feb-02): (rmail-toggle-header 0)))))))
+1.326 (eliz 22-Jan-01):
+1.100 (kwzh 24-Apr-94): ;; Find all occurrences of certain fields, and highlight them.
+1.100 (kwzh 24-Apr-94): (defun rmail-highlight-headers ()
+1.100 (kwzh 24-Apr-94): ;; Do this only if the system supports faces.
+1.107 (rms 30-Jun-94): (if (and (fboundp 'internal-find-face)
+1.107 (rms 30-Jun-94): rmail-highlighted-headers)
+1.100 (kwzh 24-Apr-94): (save-excursion
+1.100 (kwzh 24-Apr-94): (search-forward "\n\n" nil 'move)
+1.100 (kwzh 24-Apr-94): (save-restriction
+1.100 (kwzh 24-Apr-94): (narrow-to-region (point-min) (point))
+1.100 (kwzh 24-Apr-94): (let ((case-fold-search t)
+1.100 (kwzh 24-Apr-94): (inhibit-read-only t)
+1.100 (kwzh 24-Apr-94): ;; Highlight with boldface if that is available.
+1.100 (kwzh 24-Apr-94): ;; Otherwise use the `highlight' face.
+1.451 (bastien1 13-Feb-08): (face (or 'rmail-highlight
+1.112 (rms 30-Jul-94): (if (face-differs-from-default-p 'bold)
+1.112 (rms 30-Jul-94): 'bold 'highlight)))
+1.100 (kwzh 24-Apr-94): ;; List of overlays to reuse.
+1.100 (kwzh 24-Apr-94): (overlays rmail-overlay-list))
+1.100 (kwzh 24-Apr-94): (goto-char (point-min))
+1.100 (kwzh 24-Apr-94): (while (re-search-forward rmail-highlighted-headers nil t)
+1.106 (rms 18-Jun-94): (skip-chars-forward " \t")
+1.100 (kwzh 24-Apr-94): (let ((beg (point))
+1.100 (kwzh 24-Apr-94): overlay)
+1.100 (kwzh 24-Apr-94): (while (progn (forward-line 1)
+1.100 (kwzh 24-Apr-94): (looking-at "[ \t]")))
+1.100 (kwzh 24-Apr-94): ;; Back up over newline, then trailing spaces or tabs
+1.100 (kwzh 24-Apr-94): (forward-char -1)
+1.100 (kwzh 24-Apr-94): (while (member (preceding-char) '(? ?\t))
+1.100 (kwzh 24-Apr-94): (forward-char -1))
+1.100 (kwzh 24-Apr-94): (if overlays
+1.100 (kwzh 24-Apr-94): ;; Reuse an overlay we already have.
+1.100 (kwzh 24-Apr-94): (progn
+1.100 (kwzh 24-Apr-94): (setq overlay (car overlays)
+1.100 (kwzh 24-Apr-94): overlays (cdr overlays))
+1.100 (kwzh 24-Apr-94): (overlay-put overlay 'face face)
+1.100 (kwzh 24-Apr-94): (move-overlay overlay beg (point)))
+1.100 (kwzh 24-Apr-94): ;; Make a new overlay and add it to
+1.100 (kwzh 24-Apr-94): ;; rmail-overlay-list.
+1.100 (kwzh 24-Apr-94): (setq overlay (make-overlay beg (point)))
+1.100 (kwzh 24-Apr-94): (overlay-put overlay 'face face)
+1.100 (kwzh 24-Apr-94): (setq rmail-overlay-list
+1.100 (kwzh 24-Apr-94): (cons overlay rmail-overlay-list))))))))))
+1.317 (fx 24-May-00):
+1.317 (fx 24-May-00): (defun rmail-auto-file ()
+1.317 (fx 24-May-00): "Automatically move a message into a sub-folder based on criteria.
+1.317 (fx 24-May-00): Called when a new message is displayed."
+1.317 (fx 24-May-00): (if (or (rmail-message-labels-p rmail-current-message "filed")
+1.317 (fx 24-May-00): (not (string= (buffer-file-name)
+1.317 (fx 24-May-00): (expand-file-name rmail-file-name))))
+1.317 (fx 24-May-00): ;; Do nothing if it's already been filed.
+1.317 (fx 24-May-00): nil
+1.317 (fx 24-May-00): ;; Find out some basics (common fields)
+1.317 (fx 24-May-00): (let ((from (mail-fetch-field "from"))
+1.317 (fx 24-May-00): (subj (mail-fetch-field "subject"))
+1.317 (fx 24-May-00): (to (concat (mail-fetch-field "to") "," (mail-fetch-field "cc")))
+1.317 (fx 24-May-00): (d rmail-automatic-folder-directives)
+1.317 (fx 24-May-00): (directive-loop nil)
+1.317 (fx 24-May-00): (folder nil))
+1.317 (fx 24-May-00): (while d
+1.317 (fx 24-May-00): (setq folder (car (car d))
+1.317 (fx 24-May-00): directive-loop (cdr (car d)))
+1.317 (fx 24-May-00): (while (and (car directive-loop)
+1.317 (fx 24-May-00): (let ((f (cond
+1.317 (fx 24-May-00): ((string= (car directive-loop) "from") from)
+1.317 (fx 24-May-00): ((string= (car directive-loop) "to") to)
+1.317 (fx 24-May-00): ((string= (car directive-loop) "subject") subj)
+1.317 (fx 24-May-00): (t (mail-fetch-field (car directive-loop))))))
+1.317 (fx 24-May-00): (and f (string-match (car (cdr directive-loop)) f))))
+1.317 (fx 24-May-00): (setq directive-loop (cdr (cdr directive-loop))))
+1.317 (fx 24-May-00): ;; If there are no directives left, then it was a complete match.
+1.317 (fx 24-May-00): (if (null directive-loop)
+1.317 (fx 24-May-00): (if (null folder)
+1.317 (fx 24-May-00): (rmail-delete-forward)
+1.317 (fx 24-May-00): (if (string= "/dev/null" folder)
+1.317 (fx 24-May-00): (rmail-delete-message)
+1.317 (fx 24-May-00): (rmail-output-to-rmail-file folder 1 t)
+1.317 (fx 24-May-00): (setq d nil))))
+1.317 (fx 24-May-00): (setq d (cdr d))))))
+1.100 (kwzh 24-Apr-94):
+1.1 (roland 13-May-91): (defun rmail-next-message (n)
+1.1 (roland 13-May-91): "Show following message whether deleted or not.
+1.1 (roland 13-May-91): With prefix arg N, moves forward N messages, or backward if N is negative."
+1.1 (roland 13-May-91): (interactive "p")
+1.339 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.1 (roland 13-May-91): (rmail-maybe-set-message-counters)
+1.1 (roland 13-May-91): (rmail-show-message (+ rmail-current-message n)))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-previous-message (n)
+1.1 (roland 13-May-91): "Show previous message whether deleted or not.
+1.1 (roland 13-May-91): With prefix arg N, moves backward N messages, or forward if N is negative."
+1.1 (roland 13-May-91): (interactive "p")
+1.358 (pot 06-May-02): (rmail-next-message (- n)))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-next-undeleted-message (n)
+1.1 (roland 13-May-91): "Show following non-deleted message.
+1.1 (roland 13-May-91): With prefix arg N, moves forward N non-deleted messages,
+1.68 (rms 09-Oct-93): or backward if N is negative.
+1.68 (rms 09-Oct-93):
+1.68 (rms 09-Oct-93): Returns t if a new message is being shown, nil otherwise."
+1.1 (roland 13-May-91): (interactive "p")
+1.339 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.1 (roland 13-May-91): (rmail-maybe-set-message-counters)
+1.1 (roland 13-May-91): (let ((lastwin rmail-current-message)
+1.1 (roland 13-May-91): (current rmail-current-message))
+1.1 (roland 13-May-91): (while (and (> n 0) (< current rmail-total-messages))
+1.1 (roland 13-May-91): (setq current (1+ current))
+1.1 (roland 13-May-91): (if (not (rmail-message-deleted-p current))
+1.1 (roland 13-May-91): (setq lastwin current n (1- n))))
+1.1 (roland 13-May-91): (while (and (< n 0) (> current 1))
+1.1 (roland 13-May-91): (setq current (1- current))
+1.1 (roland 13-May-91): (if (not (rmail-message-deleted-p current))
+1.1 (roland 13-May-91): (setq lastwin current n (1+ n))))
+1.1 (roland 13-May-91): (if (/= lastwin rmail-current-message)
+1.68 (rms 09-Oct-93): (progn (rmail-show-message lastwin)
+1.68 (rms 09-Oct-93): t)
+1.68 (rms 09-Oct-93): (if (< n 0)
+1.68 (rms 09-Oct-93): (message "No previous nondeleted message"))
+1.68 (rms 09-Oct-93): (if (> n 0)
+1.68 (rms 09-Oct-93): (message "No following nondeleted message"))
+1.68 (rms 09-Oct-93): nil)))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-previous-undeleted-message (n)
+1.1 (roland 13-May-91): "Show previous non-deleted message.
+1.1 (roland 13-May-91): With prefix argument N, moves backward N non-deleted messages,
+1.1 (roland 13-May-91): or forward if N is negative."
+1.1 (roland 13-May-91): (interactive "p")
+1.1 (roland 13-May-91): (rmail-next-undeleted-message (- n)))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-first-message ()
+1.1 (roland 13-May-91): "Show first message in file."
+1.1 (roland 13-May-91): (interactive)
+1.1 (roland 13-May-91): (rmail-maybe-set-message-counters)
+1.1 (roland 13-May-91): (rmail-show-message 1))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-last-message ()
+1.1 (roland 13-May-91): "Show last message in file."
+1.1 (roland 13-May-91): (interactive)
+1.1 (roland 13-May-91): (rmail-maybe-set-message-counters)
+1.1 (roland 13-May-91): (rmail-show-message rmail-total-messages))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-what-message ()
+1.1 (roland 13-May-91): (let ((where (point))
+1.1 (roland 13-May-91): (low 1)
+1.1 (roland 13-May-91): (high rmail-total-messages)
+1.1 (roland 13-May-91): (mid (/ rmail-total-messages 2)))
+1.1 (roland 13-May-91): (while (> (- high low) 1)
+1.1 (roland 13-May-91): (if (>= where (rmail-msgbeg mid))
+1.1 (roland 13-May-91): (setq low mid)
+1.1 (roland 13-May-91): (setq high mid))
+1.1 (roland 13-May-91): (setq mid (+ low (/ (- high low) 2))))
+1.1 (roland 13-May-91): (if (>= where (rmail-msgbeg high)) high low)))
+1.1 (roland 13-May-91):
+1.39 (rms 09-Mar-93): (defun rmail-message-recipients-p (msg recipients &optional primary-only)
+1.39 (rms 09-Mar-93): (save-restriction
+1.39 (rms 09-Mar-93): (goto-char (rmail-msgbeg msg))
+1.261 (rms 18-Apr-98): (search-forward "\n*** EOOH ***\n")
+1.39 (rms 09-Mar-93): (narrow-to-region (point) (progn (search-forward "\n\n") (point)))
+1.39 (rms 09-Mar-93): (or (string-match recipients (or (mail-fetch-field "To") ""))
+1.39 (rms 09-Mar-93): (string-match recipients (or (mail-fetch-field "From") ""))
+1.39 (rms 09-Mar-93): (if (not primary-only)
+1.39 (rms 09-Mar-93): (string-match recipients (or (mail-fetch-field "Cc") ""))))))
+1.39 (rms 09-Mar-93):
+1.334 (gerd 26-Apr-01): (defun rmail-message-regexp-p (n regexp)
+1.334 (gerd 26-Apr-01): "Return t, if for message number N, regexp REGEXP matches in the header."
+1.334 (gerd 26-Apr-01): (let ((beg (rmail-msgbeg n))
+1.334 (gerd 26-Apr-01): (end (rmail-msgend n)))
+1.334 (gerd 26-Apr-01): (goto-char beg)
+1.334 (gerd 26-Apr-01): (forward-line 1)
+1.334 (gerd 26-Apr-01): (save-excursion
+1.334 (gerd 26-Apr-01): (save-restriction
+1.334 (gerd 26-Apr-01): (if (prog1 (= (following-char) ?0)
+1.334 (gerd 26-Apr-01): (forward-line 2)
+1.334 (gerd 26-Apr-01): ;; If there's a Summary-line in the (otherwise empty)
+1.334 (gerd 26-Apr-01): ;; header, we didn't yet get past the EOOH line.
+1.336 (gerd 30-Apr-01): (when (looking-at "^\\*\\*\\* EOOH \\*\\*\\*\n")
+1.336 (gerd 30-Apr-01): (forward-line 1))
+1.335 (gerd 27-Apr-01): (setq beg (point))
+1.334 (gerd 26-Apr-01): (narrow-to-region (point) end))
+1.358 (pot 06-May-02): (progn
+1.336 (gerd 30-Apr-01): (rfc822-goto-eoh)
+1.336 (gerd 30-Apr-01): (setq end (point)))
+1.335 (gerd 27-Apr-01): (setq beg (point))
+1.336 (gerd 30-Apr-01): (search-forward "\n*** EOOH ***\n" end t)
+1.336 (gerd 30-Apr-01): (setq end (1+ (match-beginning 0)))))
+1.335 (gerd 27-Apr-01): (goto-char beg)
+1.339 (gerd 08-May-01): (if rmail-enable-mime
+1.339 (gerd 08-May-01): (funcall rmail-search-mime-header-function n regexp end)
+1.339 (gerd 08-May-01): (re-search-forward regexp end t)))))
+1.339 (gerd 08-May-01):
+1.339 (gerd 08-May-01): (defun rmail-search-message (msg regexp)
+1.339 (gerd 08-May-01): "Return non-nil, if for message number MSG, regexp REGEXP matches."
+1.339 (gerd 08-May-01): (goto-char (rmail-msgbeg msg))
+1.339 (gerd 08-May-01): (if rmail-enable-mime
+1.339 (gerd 08-May-01): (funcall rmail-search-mime-message-function msg regexp)
+1.339 (gerd 08-May-01): (re-search-forward regexp (rmail-msgend msg) t)))
+1.39 (rms 09-Mar-93):
+1.1 (roland 13-May-91): (defvar rmail-search-last-regexp nil)
+1.19 (rms 26-Jul-92): (defun rmail-search (regexp &optional n)
+1.164 (kwzh 21-Dec-95): "Show message containing next match for REGEXP (but not the current msg).
+1.19 (rms 26-Jul-92): Prefix argument gives repeat count; negative argument means search
+1.19 (rms 26-Jul-92): backwards (through earlier messages).
+1.19 (rms 26-Jul-92): Interactively, empty argument means use same regexp used last time."
+1.1 (roland 13-May-91): (interactive
+1.1 (roland 13-May-91): (let* ((reversep (< (prefix-numeric-value current-prefix-arg) 0))
+1.1 (roland 13-May-91): (prompt
+1.415 (rfrancoi 24-Sep-05): (concat (if reversep "Reverse " "") "Rmail search (regexp"))
+1.1 (roland 13-May-91): regexp)
+1.415 (rfrancoi 24-Sep-05): (setq prompt
+1.415 (rfrancoi 24-Sep-05): (concat prompt
+1.415 (rfrancoi 24-Sep-05): (if rmail-search-last-regexp
+1.415 (rfrancoi 24-Sep-05): (concat ", default "
+1.415 (rfrancoi 24-Sep-05): rmail-search-last-regexp "): ")
+1.415 (rfrancoi 24-Sep-05): "): ")))
+1.1 (roland 13-May-91): (setq regexp (read-string prompt))
+1.1 (roland 13-May-91): (cond ((not (equal regexp ""))
+1.1 (roland 13-May-91): (setq rmail-search-last-regexp regexp))
+1.1 (roland 13-May-91): ((not rmail-search-last-regexp)
+1.1 (roland 13-May-91): (error "No previous Rmail search string")))
+1.19 (rms 26-Jul-92): (list rmail-search-last-regexp
+1.19 (rms 26-Jul-92): (prefix-numeric-value current-prefix-arg))))
+1.19 (rms 26-Jul-92): (or n (setq n 1))
+1.1 (roland 13-May-91): (message "%sRmail search for %s..."
+1.20 (rms 05-Aug-92): (if (< n 0) "Reverse " "")
+1.1 (roland 13-May-91): regexp)
+1.339 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.1 (roland 13-May-91): (rmail-maybe-set-message-counters)
+1.1 (roland 13-May-91): (let ((omin (point-min))
+1.1 (roland 13-May-91): (omax (point-max))
+1.1 (roland 13-May-91): (opoint (point))
+1.1 (roland 13-May-91): win
+1.19 (rms 26-Jul-92): (reversep (< n 0))
+1.1 (roland 13-May-91): (msg rmail-current-message))
+1.1 (roland 13-May-91): (unwind-protect
+1.1 (roland 13-May-91): (progn
+1.1 (roland 13-May-91): (widen)
+1.19 (rms 26-Jul-92): (while (/= n 0)
+1.19 (rms 26-Jul-92): ;; Check messages one by one, advancing message number up or down
+1.19 (rms 26-Jul-92): ;; but searching forward through each message.
+1.19 (rms 26-Jul-92): (if reversep
+1.19 (rms 26-Jul-92): (while (and (null win) (> msg 1))
+1.339 (gerd 08-May-01): (setq msg (1- msg)
+1.339 (gerd 08-May-01): win (rmail-search-message msg regexp)))
+1.19 (rms 26-Jul-92): (while (and (null win) (< msg rmail-total-messages))
+1.339 (gerd 08-May-01): (setq msg (1+ msg)
+1.339 (gerd 08-May-01): win (rmail-search-message msg regexp))))
+1.20 (rms 05-Aug-92): (setq n (+ n (if reversep 1 -1)))))
+1.1 (roland 13-May-91): (if win
+1.1 (roland 13-May-91): (progn
+1.339 (gerd 08-May-01): (rmail-show-message msg)
+1.339 (gerd 08-May-01): ;; Search forward (if this is a normal search) or backward
+1.339 (gerd 08-May-01): ;; (if this is a reverse search) through this message to
+1.339 (gerd 08-May-01): ;; position point. This search may fail because REGEXP
+1.339 (gerd 08-May-01): ;; was found in the hidden portion of this message. In
+1.339 (gerd 08-May-01): ;; that case, move point to the beginning of visible
+1.339 (gerd 08-May-01): ;; portion.
+1.1 (roland 13-May-91): (if reversep
+1.1 (roland 13-May-91): (progn
+1.339 (gerd 08-May-01): (goto-char (point-max))
+1.339 (gerd 08-May-01): (re-search-backward regexp nil 'move))
+1.339 (gerd 08-May-01): (goto-char (point-min))
+1.339 (gerd 08-May-01): (re-search-forward regexp nil t))
+1.1 (roland 13-May-91): (message "%sRmail search for %s...done"
+1.1 (roland 13-May-91): (if reversep "Reverse " "")
+1.339 (gerd 08-May-01): regexp))
+1.1 (roland 13-May-91): (goto-char opoint)
+1.1 (roland 13-May-91): (narrow-to-region omin omax)
+1.1 (roland 13-May-91): (ding)
+1.1 (roland 13-May-91): (message "Search failed: %s" regexp)))))
+1.19 (rms 26-Jul-92):
+1.19 (rms 26-Jul-92): (defun rmail-search-backwards (regexp &optional n)
+1.19 (rms 26-Jul-92): "Show message containing previous match for REGEXP.
+1.19 (rms 26-Jul-92): Prefix argument gives repeat count; negative argument means search
+1.19 (rms 26-Jul-92): forward (through later messages).
+1.19 (rms 26-Jul-92): Interactively, empty argument means use same regexp used last time."
+1.19 (rms 26-Jul-92): (interactive
+1.20 (rms 05-Aug-92): (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0))
+1.19 (rms 26-Jul-92): (prompt
+1.415 (rfrancoi 24-Sep-05): (concat (if reversep "Reverse " "") "Rmail search (regexp"))
+1.19 (rms 26-Jul-92): regexp)
+1.415 (rfrancoi 24-Sep-05): (setq prompt
+1.415 (rfrancoi 24-Sep-05): (concat prompt
+1.415 (rfrancoi 24-Sep-05): (if rmail-search-last-regexp
+1.415 (rfrancoi 24-Sep-05): (concat ", default "
+1.415 (rfrancoi 24-Sep-05): rmail-search-last-regexp "): ")
+1.415 (rfrancoi 24-Sep-05): "): ")))
+1.19 (rms 26-Jul-92): (setq regexp (read-string prompt))
+1.19 (rms 26-Jul-92): (cond ((not (equal regexp ""))
+1.19 (rms 26-Jul-92): (setq rmail-search-last-regexp regexp))
+1.19 (rms 26-Jul-92): ((not rmail-search-last-regexp)
+1.19 (rms 26-Jul-92): (error "No previous Rmail search string")))
+1.19 (rms 26-Jul-92): (list rmail-search-last-regexp
+1.19 (rms 26-Jul-92): (prefix-numeric-value current-prefix-arg))))
+1.154 (kwzh 13-Jun-95): (rmail-search regexp (- (or n 1))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;; Show the first message which has the `unseen' attribute.
+1.1 (roland 13-May-91): (defun rmail-first-unseen-message ()
+1.31 (jla 07-Oct-92): (rmail-maybe-set-message-counters)
+1.1 (roland 13-May-91): (let ((current 1)
+1.1 (roland 13-May-91): found)
+1.1 (roland 13-May-91): (save-restriction
+1.1 (roland 13-May-91): (widen)
+1.141 (rms 20-Dec-94): (while (and (not found) (<= current rmail-total-messages))
+1.1 (roland 13-May-91): (if (rmail-message-labels-p current ", ?\\(unseen\\),")
+1.4 (roland 23-Jul-91): (setq found current))
+1.4 (roland 23-Jul-91): (setq current (1+ current))))
+1.30 (jla 05-Oct-92): ;; Let the caller show the message.
+1.30 (jla 05-Oct-92): ;; (if found
+1.30 (jla 05-Oct-92): ;; (rmail-show-message found))
+1.30 (jla 05-Oct-92): found))
+1.144 (rms 05-Feb-95):
+1.417 (as 08-Jan-06): (defun rmail-current-subject ()
+1.417 (as 08-Jan-06): "Return the current subject.
+1.417 (as 08-Jan-06): The subject is stripped of leading and trailing whitespace, and
+1.417 (as 08-Jan-06): of typical reply prefixes such as Re:."
+1.417 (as 08-Jan-06): (let ((subject (or (mail-fetch-field "Subject") "")))
+1.251 (rms 08-Mar-98): (if (string-match "\\`[ \t]+" subject)
+1.251 (rms 08-Mar-98): (setq subject (substring subject (match-end 0))))
+1.417 (as 08-Jan-06): (if (string-match rmail-reply-regexp subject)
+1.191 (kwzh 21-Jul-96): (setq subject (substring subject (match-end 0))))
+1.251 (rms 08-Mar-98): (if (string-match "[ \t]+\\'" subject)
+1.251 (rms 08-Mar-98): (setq subject (substring subject 0 (match-beginning 0))))
+1.417 (as 08-Jan-06): subject))
+1.417 (as 08-Jan-06):
+1.417 (as 08-Jan-06): (defun rmail-current-subject-regexp ()
+1.417 (as 08-Jan-06): "Return a regular expression matching the current subject.
+1.417 (as 08-Jan-06): The regular expression matches the subject header line of
+1.417 (as 08-Jan-06): messages about the same subject. The subject itself is stripped
+1.417 (as 08-Jan-06): of leading and trailing whitespace, of typical reply prefixes
+1.417 (as 08-Jan-06): such as Re: and whitespace within the subject is replaced by a
+1.417 (as 08-Jan-06): regular expression matching whitespace in general in order to
+1.417 (as 08-Jan-06): take into account that subject header lines may include newlines
+1.417 (as 08-Jan-06): and more whitespace. The returned regular expressions contains
+1.417 (as 08-Jan-06): `rmail-reply-regexp' and ends with a newline."
+1.417 (as 08-Jan-06): (let ((subject (rmail-current-subject)))
+1.416 (eliz 10-Dec-05): ;; If Subject is long, mailers will break it into several lines at
+1.416 (eliz 10-Dec-05): ;; arbitrary places, so replace whitespace with a regexp that will
+1.416 (eliz 10-Dec-05): ;; match any sequence of spaces, TABs, and newlines.
+1.416 (eliz 10-Dec-05): (setq subject (regexp-quote subject))
+1.416 (eliz 10-Dec-05): (setq subject
+1.416 (eliz 10-Dec-05): (replace-regexp-in-string "[ \t\n]+" "[ \t\n]+" subject t t))
+1.441 (miles 21-Nov-07): ;; Some mailers insert extra spaces after "Subject:", so allow any
+1.441 (miles 21-Nov-07): ;; amount of them.
+1.441 (miles 21-Nov-07): (concat "^Subject:[ \t]+"
+1.417 (as 08-Jan-06): (if (string= "\\`" (substring rmail-reply-regexp 0 2))
+1.417 (as 08-Jan-06): (substring rmail-reply-regexp 2)
+1.417 (as 08-Jan-06): rmail-reply-regexp)
+1.417 (as 08-Jan-06): subject "[ \t]*\n")))
+1.417 (as 08-Jan-06):
+1.417 (as 08-Jan-06): (defun rmail-next-same-subject (n)
+1.417 (as 08-Jan-06): "Go to the next mail message having the same subject header.
+1.417 (as 08-Jan-06): With prefix argument N, do this N times.
+1.417 (as 08-Jan-06): If N is negative, go backwards instead."
+1.417 (as 08-Jan-06): (interactive "p")
+1.417 (as 08-Jan-06): (let ((search-regexp (rmail-current-subject-regexp))
+1.417 (as 08-Jan-06): (forward (> n 0))
+1.417 (as 08-Jan-06): (i rmail-current-message)
+1.417 (as 08-Jan-06): (case-fold-search t)
+1.417 (as 08-Jan-06): found)
+1.144 (rms 05-Feb-95): (save-excursion
+1.144 (rms 05-Feb-95): (save-restriction
+1.144 (rms 05-Feb-95): (widen)
+1.144 (rms 05-Feb-95): (while (and (/= n 0)
+1.144 (rms 05-Feb-95): (if forward
+1.144 (rms 05-Feb-95): (< i rmail-total-messages)
+1.144 (rms 05-Feb-95): (> i 1)))
+1.144 (rms 05-Feb-95): (let (done)
+1.144 (rms 05-Feb-95): (while (and (not done)
+1.144 (rms 05-Feb-95): (if forward
+1.144 (rms 05-Feb-95): (< i rmail-total-messages)
+1.144 (rms 05-Feb-95): (> i 1)))
+1.144 (rms 05-Feb-95): (setq i (if forward (1+ i) (1- i)))
+1.144 (rms 05-Feb-95): (goto-char (rmail-msgbeg i))
+1.144 (rms 05-Feb-95): (search-forward "\n*** EOOH ***\n")
+1.144 (rms 05-Feb-95): (let ((beg (point)) end)
+1.144 (rms 05-Feb-95): (search-forward "\n\n")
+1.144 (rms 05-Feb-95): (setq end (point))
+1.144 (rms 05-Feb-95): (goto-char beg)
+1.144 (rms 05-Feb-95): (setq done (re-search-forward search-regexp end t))))
+1.144 (rms 05-Feb-95): (if done (setq found i)))
+1.144 (rms 05-Feb-95): (setq n (if forward (1- n) (1+ n))))))
+1.144 (rms 05-Feb-95): (if found
+1.144 (rms 05-Feb-95): (rmail-show-message found)
+1.144 (rms 05-Feb-95): (error "No %s message with same subject"
+1.144 (rms 05-Feb-95): (if forward "following" "previous")))))
+1.144 (rms 05-Feb-95):
+1.144 (rms 05-Feb-95): (defun rmail-previous-same-subject (n)
+1.144 (rms 05-Feb-95): "Go to the previous mail message having the same subject header.
+1.144 (rms 05-Feb-95): With prefix argument N, do this N times.
+1.144 (rms 05-Feb-95): If N is negative, go forwards instead."
+1.144 (rms 05-Feb-95): (interactive "p")
+1.144 (rms 05-Feb-95): (rmail-next-same-subject (- n)))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;;;; *** Rmail Message Deletion Commands ***
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-message-deleted-p (n)
+1.1 (roland 13-May-91): (= (aref rmail-deleted-vector n) ?D))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-set-message-deleted-p (n state)
+1.1 (roland 13-May-91): (aset rmail-deleted-vector n (if state ?D ?\ )))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-delete-message ()
+1.1 (roland 13-May-91): "Delete this message and stay on it."
+1.1 (roland 13-May-91): (interactive)
+1.161 (rms 10-Nov-95): (rmail-set-attribute "deleted" t)
+1.161 (rms 10-Nov-95): (run-hooks 'rmail-delete-message-hook))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-undelete-previous-message ()
+1.1 (roland 13-May-91): "Back up to deleted message, select it, and undelete it."
+1.1 (roland 13-May-91): (interactive)
+1.339 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.1 (roland 13-May-91): (let ((msg rmail-current-message))
+1.1 (roland 13-May-91): (while (and (> msg 0)
+1.1 (roland 13-May-91): (not (rmail-message-deleted-p msg)))
+1.1 (roland 13-May-91): (setq msg (1- msg)))
+1.1 (roland 13-May-91): (if (= msg 0)
+1.1 (roland 13-May-91): (error "No previous deleted message")
+1.1 (roland 13-May-91): (if (/= msg rmail-current-message)
+1.1 (roland 13-May-91): (rmail-show-message msg))
+1.39 (rms 09-Mar-93): (rmail-set-attribute "deleted" nil)
+1.39 (rms 09-Mar-93): (if (rmail-summary-exists)
+1.39 (rms 09-Mar-93): (save-excursion
+1.39 (rms 09-Mar-93): (set-buffer rmail-summary-buffer)
+1.39 (rms 09-Mar-93): (rmail-summary-mark-undeleted msg)))
+1.39 (rms 09-Mar-93): (rmail-maybe-display-summary))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-delete-forward (&optional backward)
+1.1 (roland 13-May-91): "Delete this message and move to next nondeleted one.
+1.1 (roland 13-May-91): Deleted messages stay in the file until the \\[rmail-expunge] command is given.
+1.68 (rms 09-Oct-93): With prefix argument, delete and move backward.
+1.68 (rms 09-Oct-93):
+1.68 (rms 09-Oct-93): Returns t if a new message is displayed after the delete, or nil otherwise."
+1.1 (roland 13-May-91): (interactive "P")
+1.1 (roland 13-May-91): (rmail-set-attribute "deleted" t)
+1.161 (rms 10-Nov-95): (run-hooks 'rmail-delete-message-hook)
+1.39 (rms 09-Mar-93): (let ((del-msg rmail-current-message))
+1.39 (rms 09-Mar-93): (if (rmail-summary-exists)
+1.133 (rms 08-Oct-94): (rmail-select-summary
+1.133 (rms 08-Oct-94): (rmail-summary-mark-deleted del-msg)))
+1.68 (rms 09-Oct-93): (prog1 (rmail-next-undeleted-message (if backward -1 1))
+1.68 (rms 09-Oct-93): (rmail-maybe-display-summary))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-delete-backward ()
+1.1 (roland 13-May-91): "Delete this message and move to previous nondeleted one.
+1.1 (roland 13-May-91): Deleted messages stay in the file until the \\[rmail-expunge] command is given."
+1.1 (roland 13-May-91): (interactive)
+1.1 (roland 13-May-91): (rmail-delete-forward t))
+1.1 (roland 13-May-91):
+1.131 (rms 27-Sep-94): ;; Compute the message number a given message would have after expunging.
+1.131 (rms 27-Sep-94): ;; The present number of the message is OLDNUM.
+1.131 (rms 27-Sep-94): ;; DELETEDVEC should be rmail-deleted-vector.
+1.131 (rms 27-Sep-94): ;; The value is nil for a message that would be deleted.
+1.131 (rms 27-Sep-94): (defun rmail-msg-number-after-expunge (deletedvec oldnum)
+1.131 (rms 27-Sep-94): (if (or (null oldnum) (= (aref deletedvec oldnum) ?D))
+1.131 (rms 27-Sep-94): nil
+1.131 (rms 27-Sep-94): (let ((i 0)
+1.131 (rms 27-Sep-94): (newnum 0))
+1.131 (rms 27-Sep-94): (while (< i oldnum)
+1.131 (rms 27-Sep-94): (if (/= (aref deletedvec i) ?D)
+1.131 (rms 27-Sep-94): (setq newnum (1+ newnum)))
+1.131 (rms 27-Sep-94): (setq i (1+ i)))
+1.131 (rms 27-Sep-94): newnum)))
+1.131 (rms 27-Sep-94):
+1.325 (gerd 04-Dec-00): (defun rmail-expunge-confirmed ()
+1.325 (gerd 04-Dec-00): "Return t if deleted message should be expunged. If necessary, ask the user.
+1.325 (gerd 04-Dec-00): See also user-option `rmail-confirm-expunge'."
+1.339 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.325 (gerd 04-Dec-00): (or (not (stringp rmail-deleted-vector))
+1.325 (gerd 04-Dec-00): (not (string-match "D" rmail-deleted-vector))
+1.325 (gerd 04-Dec-00): (null rmail-confirm-expunge)
+1.325 (gerd 04-Dec-00): (funcall rmail-confirm-expunge
+1.325 (gerd 04-Dec-00): "Erase deleted messages from Rmail file? ")))
+1.325 (gerd 04-Dec-00):
+1.380 (uid65566 16-Jan-04): (defun rmail-only-expunge (&optional dont-show)
+1.1 (roland 13-May-91): "Actually erase all deleted messages in the file."
+1.1 (roland 13-May-91): (interactive)
+1.339 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.1 (roland 13-May-91): (message "Expunging deleted messages...")
+1.1 (roland 13-May-91): ;; Discard all undo records for this buffer.
+1.1 (roland 13-May-91): (or (eq buffer-undo-list t)
+1.1 (roland 13-May-91): (setq buffer-undo-list nil))
+1.1 (roland 13-May-91): (rmail-maybe-set-message-counters)
+1.1 (roland 13-May-91): (let* ((omax (- (buffer-size) (point-max)))
+1.1 (roland 13-May-91): (omin (- (buffer-size) (point-min)))
+1.1 (roland 13-May-91): (opoint (if (and (> rmail-current-message 0)
+1.96 (kwzh 23-Apr-94): (rmail-message-deleted-p rmail-current-message))
+1.96 (kwzh 23-Apr-94): 0
+1.339 (gerd 08-May-01): (if rmail-enable-mime
+1.339 (gerd 08-May-01): (with-current-buffer rmail-view-buffer
+1.339 (gerd 08-May-01): (- (point)(point-min)))
+1.339 (gerd 08-May-01): (- (point) (point-min)))))
+1.1 (roland 13-May-91): (messages-head (cons (aref rmail-message-vector 0) nil))
+1.1 (roland 13-May-91): (messages-tail messages-head)
+1.1 (roland 13-May-91): ;; Don't make any undo records for the expunging.
+1.1 (roland 13-May-91): (buffer-undo-list t)
+1.1 (roland 13-May-91): (win))
+1.1 (roland 13-May-91): (unwind-protect
+1.1 (roland 13-May-91): (save-excursion
+1.1 (roland 13-May-91): (widen)
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.1 (roland 13-May-91): (let ((counter 0)
+1.1 (roland 13-May-91): (number 1)
+1.1 (roland 13-May-91): (total rmail-total-messages)
+1.1 (roland 13-May-91): (new-message-number rmail-current-message)
+1.1 (roland 13-May-91): (new-summary nil)
+1.218 (rms 02-May-97): (new-msgref (list (list 0)))
+1.131 (rms 27-Sep-94): (rmailbuf (current-buffer))
+1.1 (roland 13-May-91): (buffer-read-only nil)
+1.1 (roland 13-May-91): (messages rmail-message-vector)
+1.1 (roland 13-May-91): (deleted rmail-deleted-vector)
+1.1 (roland 13-May-91): (summary rmail-summary-vector))
+1.1 (roland 13-May-91): (setq rmail-total-messages nil
+1.1 (roland 13-May-91): rmail-current-message nil
+1.1 (roland 13-May-91): rmail-message-vector nil
+1.1 (roland 13-May-91): rmail-deleted-vector nil
+1.1 (roland 13-May-91): rmail-summary-vector nil)
+1.131 (rms 27-Sep-94):
+1.1 (roland 13-May-91): (while (<= number total)
+1.1 (roland 13-May-91): (if (= (aref deleted number) ?D)
+1.1 (roland 13-May-91): (progn
+1.1 (roland 13-May-91): (delete-region
+1.1 (roland 13-May-91): (marker-position (aref messages number))
+1.1 (roland 13-May-91): (marker-position (aref messages (1+ number))))
+1.1 (roland 13-May-91): (move-marker (aref messages number) nil)
+1.1 (roland 13-May-91): (if (> new-message-number counter)
+1.1 (roland 13-May-91): (setq new-message-number (1- new-message-number))))
+1.1 (roland 13-May-91): (setq counter (1+ counter))
+1.1 (roland 13-May-91): (setq messages-tail
+1.1 (roland 13-May-91): (setcdr messages-tail
+1.1 (roland 13-May-91): (cons (aref messages number) nil)))
+1.1 (roland 13-May-91): (setq new-summary
+1.1 (roland 13-May-91): (cons (if (= counter number) (aref summary (1- number)))
+1.218 (rms 02-May-97): new-summary))
+1.218 (rms 02-May-97): (setq new-msgref
+1.218 (rms 02-May-97): (cons (aref rmail-msgref-vector number)
+1.218 (rms 02-May-97): new-msgref))
+1.218 (rms 02-May-97): (setcar (car new-msgref) counter))
+1.1 (roland 13-May-91): (if (zerop (% (setq number (1+ number)) 20))
+1.1 (roland 13-May-91): (message "Expunging deleted messages...%d" number)))
+1.1 (roland 13-May-91): (setq messages-tail
+1.1 (roland 13-May-91): (setcdr messages-tail
+1.1 (roland 13-May-91): (cons (aref messages number) nil)))
+1.1 (roland 13-May-91): (setq rmail-current-message new-message-number
+1.1 (roland 13-May-91): rmail-total-messages counter
+1.1 (roland 13-May-91): rmail-message-vector (apply 'vector messages-head)
+1.1 (roland 13-May-91): rmail-deleted-vector (make-string (1+ counter) ?\ )
+1.1 (roland 13-May-91): rmail-summary-vector (vconcat (nreverse new-summary))
+1.218 (rms 02-May-97): rmail-msgref-vector (apply 'vector (nreverse new-msgref))
+1.1 (roland 13-May-91): win t)))
+1.1 (roland 13-May-91): (message "Expunging deleted messages...done")
+1.1 (roland 13-May-91): (if (not win)
+1.1 (roland 13-May-91): (narrow-to-region (- (buffer-size) omin) (- (buffer-size) omax)))
+1.380 (uid65566 16-Jan-04): (if (not dont-show)
+1.380 (uid65566 16-Jan-04): (rmail-show-message
+1.406 (rms 08-Jul-05): (if (zerop rmail-current-message) 1 nil)))
+1.406 (rms 08-Jul-05): (if rmail-enable-mime
+1.406 (rms 08-Jul-05): (goto-char (+ (point-min) opoint))
+1.406 (rms 08-Jul-05): (goto-char (+ (point) opoint))))))
+1.39 (rms 09-Mar-93):
+1.39 (rms 09-Mar-93): (defun rmail-expunge ()
+1.39 (rms 09-Mar-93): "Erase deleted messages from Rmail file and summary buffer."
+1.39 (rms 09-Mar-93): (interactive)
+1.325 (gerd 04-Dec-00): (when (rmail-expunge-confirmed)
+1.313 (gerd 24-Mar-00): (rmail-only-expunge)
+1.313 (gerd 24-Mar-00): (if (rmail-summary-exists)
+1.325 (gerd 04-Dec-00): (rmail-select-summary (rmail-update-summary)))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): ;;;; *** Rmail Mailing Commands ***
+1.1 (roland 13-May-91):
+1.203 (rms 07-Dec-96): (defun rmail-start-mail (&optional noerase to subject in-reply-to cc
+1.203 (rms 07-Dec-96): replybuffer sendactions same-window others)
+1.203 (rms 07-Dec-96): (let (yank-action)
+1.203 (rms 07-Dec-96): (if replybuffer
+1.203 (rms 07-Dec-96): (setq yank-action (list 'insert-buffer replybuffer)))
+1.203 (rms 07-Dec-96): (setq others (cons (cons "cc" cc) others))
+1.203 (rms 07-Dec-96): (setq others (cons (cons "in-reply-to" in-reply-to) others))
+1.203 (rms 07-Dec-96): (if same-window
+1.203 (rms 07-Dec-96): (compose-mail to subject others
+1.203 (rms 07-Dec-96): noerase nil
+1.203 (rms 07-Dec-96): yank-action sendactions)
+1.390 (eliz 24-Apr-04): (if rmail-mail-new-frame
+1.203 (rms 07-Dec-96): (prog1
+1.203 (rms 07-Dec-96): (compose-mail to subject others
+1.203 (rms 07-Dec-96): noerase 'switch-to-buffer-other-frame
+1.203 (rms 07-Dec-96): yank-action sendactions)
+1.203 (rms 07-Dec-96): ;; This is not a standard frame parameter;
+1.203 (rms 07-Dec-96): ;; nothing except sendmail.el looks at it.
+1.203 (rms 07-Dec-96): (modify-frame-parameters (selected-frame)
+1.203 (rms 07-Dec-96): '((mail-dedicated-frame . t))))
+1.203 (rms 07-Dec-96): (compose-mail to subject others
+1.203 (rms 07-Dec-96): noerase 'switch-to-buffer-other-window
+1.203 (rms 07-Dec-96): yank-action sendactions)))))
+1.57 (rms 16-Jul-93):
+1.1 (roland 13-May-91): (defun rmail-mail ()
+1.39 (rms 09-Mar-93): "Send mail in another window.
+1.39 (rms 09-Mar-93): While composing the message, use \\[mail-yank-original] to yank the
+1.39 (rms 09-Mar-93): original message into it."
+1.1 (roland 13-May-91): (interactive)
+1.212 (handa 26-Feb-97): (rmail-start-mail nil nil nil nil nil rmail-view-buffer))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-continue ()
+1.1 (roland 13-May-91): "Continue composing outgoing message previously being composed."
+1.1 (roland 13-May-91): (interactive)
+1.57 (rms 16-Jul-93): (rmail-start-mail t))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-reply (just-sender)
+1.1 (roland 13-May-91): "Reply to the current message.
+1.1 (roland 13-May-91): Normally include CC: to all other recipients of original message;
+1.1 (roland 13-May-91): prefix argument means ignore them. While composing the reply,
+1.1 (roland 13-May-91): use \\[mail-yank-original] to yank the original message into it."
+1.1 (roland 13-May-91): (interactive "P")
+1.207 (rms 31-Jan-97): (let (from reply-to cc subject date to message-id references
+1.202 (rms 26-Oct-96): resent-to resent-cc resent-reply-to
+1.212 (handa 26-Feb-97): (msgnum rmail-current-message))
+1.1 (roland 13-May-91): (save-excursion
+1.1 (roland 13-May-91): (save-restriction
+1.345 (gerd 06-Jul-01): (if rmail-enable-mime
+1.345 (gerd 06-Jul-01): (narrow-to-region
+1.345 (gerd 06-Jul-01): (goto-char (point-min))
+1.345 (gerd 06-Jul-01): (if (search-forward "\n\n" nil 'move)
+1.345 (gerd 06-Jul-01): (1+ (match-beginning 0))
+1.345 (gerd 06-Jul-01): (point)))
+1.339 (gerd 08-May-01): (widen)
+1.339 (gerd 08-May-01): (goto-char (rmail-msgbeg rmail-current-message))
+1.339 (gerd 08-May-01): (forward-line 1)
+1.339 (gerd 08-May-01): (if (= (following-char) ?0)
+1.339 (gerd 08-May-01): (narrow-to-region
+1.339 (gerd 08-May-01): (progn (forward-line 2)
+1.339 (gerd 08-May-01): (point))
+1.339 (gerd 08-May-01): (progn (search-forward "\n\n" (rmail-msgend rmail-current-message)
+1.339 (gerd 08-May-01): 'move)
+1.339 (gerd 08-May-01): (point)))
+1.339 (gerd 08-May-01): (narrow-to-region (point)
+1.339 (gerd 08-May-01): (progn (search-forward "\n*** EOOH ***\n")
+1.339 (gerd 08-May-01): (beginning-of-line) (point)))))
+1.202 (rms 26-Oct-96): (setq from (mail-fetch-field "from")
+1.413 (rms 15-Aug-05): reply-to (or (mail-fetch-field "mail-reply-to" nil t)
+1.397 (rms 18-Mar-05): (mail-fetch-field "reply-to" nil t)
+1.1 (roland 13-May-91): from)
+1.202 (rms 26-Oct-96): subject (mail-fetch-field "subject")
+1.202 (rms 26-Oct-96): date (mail-fetch-field "date")
+1.202 (rms 26-Oct-96): message-id (mail-fetch-field "message-id")
+1.207 (rms 31-Jan-97): references (mail-fetch-field "references" nil nil t)
+1.207 (rms 31-Jan-97): resent-reply-to (mail-fetch-field "resent-reply-to" nil t)
+1.202 (rms 26-Oct-96): resent-cc (and (not just-sender)
+1.202 (rms 26-Oct-96): (mail-fetch-field "resent-cc" nil t))
+1.202 (rms 26-Oct-96): resent-to (or (mail-fetch-field "resent-to" nil t) "")
+1.202 (rms 26-Oct-96): ;;; resent-subject (mail-fetch-field "resent-subject")
+1.202 (rms 26-Oct-96): ;;; resent-date (mail-fetch-field "resent-date")
+1.202 (rms 26-Oct-96): ;;; resent-message-id (mail-fetch-field "resent-message-id")
+1.413 (rms 15-Aug-05): )
+1.413 (rms 15-Aug-05): (unless just-sender
+1.413 (rms 15-Aug-05): (if (mail-fetch-field "mail-followup-to" nil t)
+1.413 (rms 15-Aug-05): ;; If this header field is present, use it instead of the To and CC fields.
+1.413 (rms 15-Aug-05): (setq to (mail-fetch-field "mail-followup-to" nil t))
+1.413 (rms 15-Aug-05): (setq cc (or (mail-fetch-field "cc" nil t) "")
+1.413 (rms 15-Aug-05): to (or (mail-fetch-field "to" nil t) ""))))
+1.413 (rms 15-Aug-05):
+1.413 (rms 15-Aug-05): ))
+1.413 (rms 15-Aug-05):
+1.202 (rms 26-Oct-96): ;; Merge the resent-to and resent-cc into the to and cc.
+1.202 (rms 26-Oct-96): (if (and resent-to (not (equal resent-to "")))
+1.202 (rms 26-Oct-96): (if (not (equal to ""))
+1.202 (rms 26-Oct-96): (setq to (concat to ", " resent-to))
+1.202 (rms 26-Oct-96): (setq to resent-to)))
+1.202 (rms 26-Oct-96): (if (and resent-cc (not (equal resent-cc "")))
+1.202 (rms 26-Oct-96): (if (not (equal cc ""))
+1.202 (rms 26-Oct-96): (setq cc (concat cc ", " resent-cc))
+1.202 (rms 26-Oct-96): (setq cc resent-cc)))
+1.202 (rms 26-Oct-96): ;; Add `Re: ' to subject if not there already.
+1.39 (rms 09-Mar-93): (and (stringp subject)
+1.143 (kwzh 03-Feb-95): (setq subject
+1.143 (kwzh 03-Feb-95): (concat rmail-reply-prefix
+1.211 (kwzh 23-Feb-97): (if (let ((case-fold-search t))
+1.211 (kwzh 23-Feb-97): (string-match rmail-reply-regexp subject))
+1.143 (kwzh 03-Feb-95): (substring subject (match-end 0))
+1.143 (kwzh 03-Feb-95): subject))))
+1.226 (rms 01-Jun-97): (rmail-start-mail
+1.226 (rms 01-Jun-97): nil
+1.226 (rms 01-Jun-97): ;; Using mail-strip-quoted-names is undesirable with newer mailers
+1.226 (rms 01-Jun-97): ;; since they can handle the names unstripped.
+1.226 (rms 01-Jun-97): ;; I don't know whether there are other mailers that still
+1.226 (rms 01-Jun-97): ;; need the names to be stripped.
+1.366 (rms 01-Jan-03): ;;; (mail-strip-quoted-names reply-to)
+1.403 (eliz 21-May-05): ;; Remove unwanted names from reply-to, since Mail-Followup-To
+1.403 (eliz 21-May-05): ;; header causes all the names in it to wind up in reply-to, not
+1.403 (eliz 21-May-05): ;; in cc. But if what's left is an empty list, use the original.
+1.403 (eliz 21-May-05): (let* ((reply-to-list (rmail-dont-reply-to reply-to)))
+1.403 (eliz 21-May-05): (if (string= reply-to-list "") reply-to reply-to-list))
+1.226 (rms 01-Jun-97): subject
+1.226 (rms 01-Jun-97): (rmail-make-in-reply-to-field from date message-id)
+1.226 (rms 01-Jun-97): (if just-sender
+1.226 (rms 01-Jun-97): nil
+1.226 (rms 01-Jun-97): ;; mail-strip-quoted-names is NOT necessary for rmail-dont-reply-to
+1.226 (rms 01-Jun-97): ;; to do its job.
+1.226 (rms 01-Jun-97): (let* ((cc-list (rmail-dont-reply-to
+1.226 (rms 01-Jun-97): (mail-strip-quoted-names
+1.226 (rms 01-Jun-97): (if (null cc) to (concat to ", " cc))))))
+1.226 (rms 01-Jun-97): (if (string= cc-list "") nil cc-list)))
+1.226 (rms 01-Jun-97): rmail-view-buffer
+1.226 (rms 01-Jun-97): (list (list 'rmail-mark-message
+1.339 (gerd 08-May-01): rmail-buffer
+1.339 (gerd 08-May-01): (with-current-buffer rmail-buffer
+1.339 (gerd 08-May-01): (aref rmail-msgref-vector msgnum))
+1.226 (rms 01-Jun-97): "answered"))
+1.226 (rms 01-Jun-97): nil
+1.226 (rms 01-Jun-97): (list (cons "References" (concat (mapconcat 'identity references " ")
+1.226 (rms 01-Jun-97): " " message-id))))))
+1.217 (rms 26-Apr-97):
+1.218 (rms 02-May-97): (defun rmail-mark-message (buffer msgnum-list attribute)
+1.218 (rms 02-May-97): "Give BUFFER's message number in MSGNUM-LIST the attribute ATTRIBUTE.
+1.218 (rms 02-May-97): This is use in the send-actions for message buffers.
+1.218 (rms 02-May-97): MSGNUM-LIST is a list of the form (MSGNUM)
+1.218 (rms 02-May-97): which is an element of rmail-msgref-vector."
+1.217 (rms 26-Apr-97): (save-excursion
+1.217 (rms 26-Apr-97): (set-buffer buffer)
+1.218 (rms 02-May-97): (if (car msgnum-list)
+1.218 (rms 02-May-97): (rmail-set-attribute attribute t (car msgnum-list)))))
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): (defun rmail-make-in-reply-to-field (from date message-id)
+1.1 (roland 13-May-91): (cond ((not from)
+1.1 (roland 13-May-91): (if message-id
+1.1 (roland 13-May-91): message-id
+1.1 (roland 13-May-91): nil))
+1.1 (roland 13-May-91): (mail-use-rfc822
+1.1 (roland 13-May-91): (require 'rfc822)
+1.1 (roland 13-May-91): (let ((tem (car (rfc822-addresses from))))
+1.1 (roland 13-May-91): (if message-id
+1.233 (rms 12-Aug-97): (if (or (not tem)
+1.233 (rms 12-Aug-97): (string-match
+1.233 (rms 12-Aug-97): (regexp-quote (if (string-match "@[^@]*\\'" tem)
+1.233 (rms 12-Aug-97): (substring tem 0
+1.233 (rms 12-Aug-97): (match-beginning 0))
+1.233 (rms 12-Aug-97): tem))
+1.233 (rms 12-Aug-97): message-id))
+1.233 (rms 12-Aug-97): ;; missing From, or Message-ID is sufficiently informative
+1.1 (roland 13-May-91): message-id
+1.1 (roland 13-May-91): (concat message-id " (" tem ")"))
+1.82 (rms 29-Jan-94): ;; Copy TEM, discarding text properties.
+1.82 (rms 29-Jan-94): (setq tem (copy-sequence tem))
+1.82 (rms 29-Jan-94): (set-text-properties 0 (length tem) nil tem)
+1.82 (rms 29-Jan-94): (setq tem (copy-sequence tem))
+1.82 (rms 29-Jan-94): ;; Use prin1 to fake RFC822 quoting
+1.82 (rms 29-Jan-94): (let ((field (prin1-to-string tem)))
+1.82 (rms 29-Jan-94): (if date
+1.82 (rms 29-Jan-94): (concat field "'s message of " date)
+1.82 (rms 29-Jan-94): field)))))
+1.243 (rms 19-Jan-98): ((let* ((foo "[^][\000-\037()<>@,;:\\\" ]+")
+1.243 (rms 19-Jan-98): (bar "[^][\000-\037()<>@,;:\\\"]+"))
+1.243 (rms 19-Jan-98): ;; These strings both match all non-ASCII characters.
+1.1 (roland 13-May-91): (or (string-match (concat "\\`[ \t]*\\(" bar
+1.1 (roland 13-May-91): "\\)\\(<" foo "@" foo ">\\)?[ \t]*\\'")
+1.1 (roland 13-May-91): ;; "Unix Loser <Foo@bar.edu>" => "Unix Loser"
+1.1 (roland 13-May-91): from)
+1.1 (roland 13-May-91): (string-match (concat "\\`[ \t]*<" foo "@" foo ">[ \t]*(\\("
+1.1 (roland 13-May-91): bar "\\))[ \t]*\\'")
+1.1 (roland 13-May-91): ;; "<Bugs@bar.edu>" (Losing Unix) => "Losing Unix"
+1.1 (roland 13-May-91): from)))
+1.1 (roland 13-May-91): (let ((start (match-beginning 1))
+1.1 (roland 13-May-91): (end (match-end 1)))
+1.1 (roland 13-May-91): ;; Trim whitespace which above regexp match allows
+1.1 (roland 13-May-91): (while (and (< start end)
+1.1 (roland 13-May-91): (memq (aref from start) '(?\t ?\ )))
+1.1 (roland 13-May-91): (setq start (1+ start)))
+1.1 (roland 13-May-91): (while (and (< start end)
+1.1 (roland 13-May-91): (memq (aref from (1- end)) '(?\t ?\ )))
+1.1 (roland 13-May-91): (setq end (1- end)))
+1.1 (roland 13-May-91): (let ((field (substring from start end)))
+1.1 (roland 13-May-91): (if date (setq field (concat "message from " field " on " date)))
+1.1 (roland 13-May-91): (if message-id
+1.1 (roland 13-May-91): ;; "<AA259@bar.edu> (message from Unix Loser on 1-Apr-89)"
+1.1 (roland 13-May-91): (concat message-id " (" field ")")
+1.1 (roland 13-May-91): field))))
+1.1 (roland 13-May-91): (t
+1.1 (roland 13-May-91): ;; If we can't kludge it simply, do it correctly
+1.1 (roland 13-May-91): (let ((mail-use-rfc822 t))
+1.1 (roland 13-May-91): (rmail-make-in-reply-to-field from date message-id)))))
+1.147 (rms 12-Mar-95):
+1.42 (rms 07-May-93): (defun rmail-forward (resend)
+1.42 (rms 07-May-93): "Forward the current message to another user.
+1.42 (rms 07-May-93): With prefix argument, \"resend\" the message instead of forwarding it;
+1.42 (rms 07-May-93): see the documentation of `rmail-resend'."
+1.42 (rms 07-May-93): (interactive "P")
+1.42 (rms 07-May-93): (if resend
+1.42 (rms 07-May-93): (call-interactively 'rmail-resend)
+1.339 (gerd 08-May-01): (let ((forward-buffer rmail-buffer)
+1.131 (rms 27-Sep-94): (msgnum rmail-current-message)
+1.42 (rms 07-May-93): (subject (concat "["
+1.42 (rms 07-May-93): (let ((from (or (mail-fetch-field "From")
+1.42 (rms 07-May-93): (mail-fetch-field ">From"))))
+1.42 (rms 07-May-93): (if from
+1.42 (rms 07-May-93): (concat (mail-strip-quoted-names from) ": ")
+1.42 (rms 07-May-93): ""))
+1.42 (rms 07-May-93): (or (mail-fetch-field "Subject") "")
+1.42 (rms 07-May-93): "]")))
+1.203 (rms 07-Dec-96): (if (rmail-start-mail
+1.203 (rms 07-Dec-96): nil nil subject nil nil nil
+1.217 (rms 26-Apr-97): (list (list 'rmail-mark-message
+1.218 (rms 02-May-97): forward-buffer
+1.339 (gerd 08-May-01): (with-current-buffer rmail-buffer
+1.339 (gerd 08-May-01): (aref rmail-msgref-vector msgnum))
+1.217 (rms 26-Apr-97): "forwarded"))
+1.203 (rms 07-Dec-96): ;; If only one window, use it for the mail buffer.
+1.203 (rms 07-Dec-96): ;; Otherwise, use another window for the mail buffer
+1.203 (rms 07-Dec-96): ;; so that the Rmail buffer remains visible
+1.203 (rms 07-Dec-96): ;; and sending the mail will get back to it.
+1.203 (rms 07-Dec-96): (and (not rmail-mail-new-frame) (one-window-p t)))
+1.131 (rms 27-Sep-94): ;; The mail buffer is now current.
+1.58 (rms 24-Jul-93): (save-excursion
+1.65 (rms 15-Sep-93): ;; Insert after header separator--before signature if any.
+1.264 (rms 30-Apr-98): (goto-char (mail-text-start))
+1.350 (zsh 25-Nov-01): (if (or rmail-enable-mime rmail-enable-mime-composing)
+1.339 (gerd 08-May-01): (funcall rmail-insert-mime-forwarded-message-function
+1.339 (gerd 08-May-01): forward-buffer)
+1.339 (gerd 08-May-01): (insert "------- Start of forwarded message -------\n")
+1.339 (gerd 08-May-01): ;; Quote lines with `- ' if they start with `-'.
+1.339 (gerd 08-May-01): (let ((beg (point)) end)
+1.339 (gerd 08-May-01): (setq end (point-marker))
+1.339 (gerd 08-May-01): (set-marker-insertion-type end t)
+1.339 (gerd 08-May-01): (insert-buffer-substring forward-buffer)
+1.339 (gerd 08-May-01): (goto-char beg)
+1.339 (gerd 08-May-01): (while (re-search-forward "^-" end t)
+1.339 (gerd 08-May-01): (beginning-of-line)
+1.339 (gerd 08-May-01): (insert "- ")
+1.339 (gerd 08-May-01): (forward-line 1))
+1.339 (gerd 08-May-01): (goto-char end)
+1.339 (gerd 08-May-01): (skip-chars-backward "\n")
+1.339 (gerd 08-May-01): (if (< (point) end)
+1.339 (gerd 08-May-01): (forward-char 1))
+1.339 (gerd 08-May-01): (delete-region (point) end)
+1.339 (gerd 08-May-01): (set-marker end nil))
+1.339 (gerd 08-May-01): (insert "------- End of forwarded message -------\n"))
+1.131 (rms 27-Sep-94): (push-mark))))))
+1.147 (rms 12-Mar-95):
+1.1 (roland 13-May-91): (defun rmail-resend (address &optional from comment mail-alias-file)
+1.1 (roland 13-May-91): "Resend current message to ADDRESSES.
+1.73 (rms 23-Dec-93): ADDRESSES should be a single address, a string consisting of several
+1.1 (roland 13-May-91): addresses separated by commas, or a list of addresses.
+1.1 (roland 13-May-91):
+1.1 (roland 13-May-91): Optional FROM is the address to resend the message from, and
+1.232 (rms 29-Jul-97): defaults from the value of `user-mail-address'.
+1.232 (rms 29-Jul-97): Optional COMMENT is a string to insert as a comment in the resent message.
+1.1 (roland 13-May-91): Optional ALIAS-FILE is alternate aliases file to be used by sendmail,
+1.1 (roland 13-May-91): typically for purposes of moderating a list."
+1.1 (roland 13-May-91): (interactive "sResend to: ")
+1.46 (rms 04-Jun-93): (require 'sendmail)
+1.46 (rms 04-Jun-93): (require 'mailalias)
+1.342 (gerd 31-May-01): (unless (or (eq rmail-view-buffer (current-buffer))
+1.342 (gerd 31-May-01): (eq rmail-buffer (current-buffer)))
+1.311 (gerd 25-Feb-00): (error "Not an Rmail buffer"))
+1.232 (rms 29-Jul-97): (if (not from) (setq from user-mail-address))
+1.1 (roland 13-May-91): (let ((tembuf (generate-new-buffer " sendmail temp"))
+1.1 (roland 13-May-91): (case-fold-search nil)
+1.394 (rms 27-Dec-04): (mail-personal-alias-file
+1.394 (rms 27-Dec-04): (or mail-alias-file mail-personal-alias-file))
+1.288 (kwzh 21-Sep-98): (mailbuf rmail-buffer))
+1.1 (roland 13-May-91): (unwind-protect
+1.288 (kwzh 21-Sep-98): (with-current-buffer tembuf
+1.1 (roland 13-May-91): ;;>> Copy message into temp buffer
+1.342 (gerd 31-May-01): (if rmail-enable-mime
+1.342 (gerd 31-May-01): (funcall rmail-insert-mime-resent-message-function mailbuf)
+1.342 (gerd 31-May-01): (insert-buffer-substring mailbuf))
+1.1 (roland 13-May-91): (goto-char (point-min))
+1.167 (rms 05-Jan-96): ;; Delete any Sender field, since that's not specifiable.
+1.73 (rms 23-Dec-93): ; Only delete Sender fields in the actual header.
+1.73 (rms 23-Dec-93): (re-search-forward "^$" nil 'move)
+1.73 (rms 23-Dec-93): ; Using "while" here rather than "if" because some buggy mail
+1.73 (rms 23-Dec-93): ; software may have inserted multiple Sender fields.
+1.73 (rms 23-Dec-93): (while (re-search-backward "^Sender:" nil t)
+1.73 (rms 23-Dec-93): (let (beg)
+1.73 (rms 23-Dec-93): (setq beg (point))
+1.73 (rms 23-Dec-93): (forward-line 1)
+1.73 (rms 23-Dec-93): (while (looking-at "[ \t]")
+1.73 (rms 23-Dec-93): (forward-line 1))
+1.73 (rms 23-Dec-93): (delete-region beg (point))))
+1.73 (rms 23-Dec-93): ; Go back to the beginning of the buffer so the Resent- fields
+1.73 (rms 23-Dec-93): ; are inserted there.
+1.73 (rms 23-Dec-93): (goto-char (point-min))
+1.1 (roland 13-May-91): ;;>> Insert resent-from:
+1.1 (roland 13-May-91): (insert "Resent-From: " from "\n")
+1.55 (rms 07-Jul-93): (insert "Resent-Date: " (mail-rfc822-date) "\n")
+1.1 (roland 13-May-91): ;;>> Insert resent-to: and bcc if need be.
+1.1 (roland 13-May-91): (let ((before (point)))
+1.68 (rms 09-Oct-93): (if mail-self-blind
+1.68 (rms 09-Oct-93): (insert "Resent-Bcc: " (user-login-name) "\n"))
+1.1 (roland 13-May-91): (insert "Resent-To: " (if (stringp address)
+1.1 (roland 13-May-91): address
+1.1 (roland 13-May-91): (mapconcat 'identity address ",\n\t"))
+1.1 (roland 13-May-91): "\n")
+1.150 (rms 14-Apr-95): ;; Expand abbrevs in the recipients.
+1.121 (rms 14-Aug-94): (save-excursion
+1.150 (rms 14-Apr-95): (if (featurep 'mailabbrev)
+1.152 (rms 24-Apr-95): (let ((end (point-marker))
+1.152 (rms 24-Apr-95): (local-abbrev-table mail-abbrevs)
+1.152 (rms 24-Apr-95): (old-syntax-table (syntax-table)))
+1.152 (rms 24-Apr-95): (if (and (not (vectorp mail-abbrevs))
+1.152 (rms 24-Apr-95): (file-exists-p mail-personal-alias-file))
+1.152 (rms 24-Apr-95): (build-mail-abbrevs))
+1.357 (rms 25-Mar-02): (unless mail-abbrev-syntax-table
+1.357 (rms 25-Mar-02): (mail-abbrev-make-syntax-table))
+1.152 (rms 24-Apr-95): (set-syntax-table mail-abbrev-syntax-table)
+1.152 (rms 24-Apr-95): (goto-char before)
+1.152 (rms 24-Apr-95): (while (and (< (point) end)
+1.152 (rms 24-Apr-95): (progn (forward-word 1)
+1.152 (rms 24-Apr-95): (<= (point) end)))
+1.152 (rms 24-Apr-95): (expand-abbrev))
+1.152 (rms 24-Apr-95): (set-syntax-table old-syntax-table))
+1.150 (rms 14-Apr-95): (expand-mail-aliases before (point)))))
+1.1 (roland 13-May-91): ;;>> Set up comment, if any.
+1.1 (roland 13-May-91): (if (and (sequencep comment) (not (zerop (length comment))))
+1.1 (roland 13-May-91): (let ((before (point))
+1.1 (roland 13-May-91): after)
+1.1 (roland 13-May-91): (insert comment)
+1.1 (roland 13-May-91): (or (eolp) (insert "\n"))
+1.1 (roland 13-May-91): (setq after (point))
+1.1 (roland 13-May-91): (goto-char before)
+1.1 (roland 13-May-91): (while (< (point) after)
+1.1 (roland 13-May-91): (insert "Resent-Comment: ")
+1.1 (roland 13-May-91): (forward-line 1))))
+1.1 (roland 13-May-91): ;; Don't expand aliases in the destination fields
+1.1 (roland 13-May-91): ;; of the original message.
+1.1 (roland 13-May-91): (let (mail-aliases)
+1.78 (rms 06-Jan-94): (funcall send-mail-function)))
+1.42 (rms 07-May-93): (kill-buffer tembuf))
+1.288 (kwzh 21-Sep-98): (with-current-buffer rmail-buffer
+1.288 (kwzh 21-Sep-98): (rmail-set-attribute "resent" t rmail-current-message))))
+1.147 (rms 12-Mar-95):
+1.29 (rms 29-Sep-92): (defvar mail-unsent-separator
+1.32 (rms 09-Oct-92): (concat "^ *---+ +Unsent message follows +---+ *$\\|"
+1.32 (rms 09-Oct-92): "^ *---+ +Returned message +---+ *$\\|"
+1.269 (rms 20-May-98): "^ *---+ *Returned mail follows *---+ *$\\|"
+1.146 (rms 24-Feb-95): "^Start of returned message$\\|"
+1.279 (rms 25-Jun-98): "^---+ Below this line is a copy of the message.$\\|"
+1.33 (rms 09-Oct-92): "^ *---+ +Original message +---+ *$\\|"
+1.37 (rms 09-Jan-93): "^ *--+ +begin message +--+ *$\\|"
+1.68 (rms 09-Oct-93): "^ *---+ +Original message follows +---+ *$\\|"
+1.250 (kwzh 25-Feb-98): "^ *---+ +Your message follows +---+ *$\\|"
+1.305 (rms 07-Jul-99): "^|? *---+ +Message text follows: +---+ *|?$\\|"
+1.319 (gerd 06-Jul-00): "^ *---+ +This is a copy of \\w+ message, including all the headers.*---+ *$")
+1.122 (rms 19-Aug-94): "A regexp that matches the separator before the text of a failed message.")
+1.1 (roland 13-May-91):
+1.214 (rms 20-Mar-97): (defvar mail-mime-unsent-header "^Content-Type: message/rfc822 *$"
+1.214 (rms 20-Mar-97): "A regexp that matches the header of a MIME body part with a failed message.")
+1.214 (rms 20-Mar-97):
+1.1 (roland 13-May-91): (defun rmail-retry-failure ()
+1.1 (roland 13-May-91): "Edit a mail message which is based on the contents of the current message.
+1.1 (roland 13-May-91): For a message rejected by the mail system, extract the interesting headers and
+1.122 (rms 19-Aug-94): the body of the original message.
+1.214 (rms 20-Mar-97): If the failed message is a MIME multipart message, it is searched for a
+1.214 (rms 20-Mar-97): body part with a header which matches the variable `mail-mime-unsent-header'.
+1.214 (rms 20-Mar-97): Otherwise, the variable `mail-unsent-separator' should match the string that
+1.128 (rms 23-Sep-94): delimits the returned original message.
+1.128 (rms 23-Sep-94): The variable `rmail-retry-ignored-headers' is a regular expression
+1.128 (rms 23-Sep-94): specifying headers which should not be copied into the new message."
+1.1 (roland 13-May-91): (interactive)
+1.1 (roland 13-May-91): (require 'mail-utils)
+1.223 (rms 15-May-97): (let ((rmail-this-buffer (current-buffer))
+1.164 (kwzh 21-Dec-95): (msgnum rmail-current-message)
+1.344 (rms 29-Jun-01): bounce-start bounce-end bounce-indent resending
+1.344 (rms 29-Jun-01): ;; Fetch any content-type header in current message
+1.344 (rms 29-Jun-01): ;; Must search thru the whole unpruned header.
+1.344 (rms 29-Jun-01): (content-type
+1.344 (rms 29-Jun-01): (save-excursion
+1.344 (rms 29-Jun-01): (save-restriction
+1.344 (rms 29-Jun-01): (rmail-narrow-to-non-pruned-header)
+1.344 (rms 29-Jun-01): (mail-fetch-field "Content-Type") ))))
+1.344 (rms 29-Jun-01): (save-excursion
+1.344 (rms 29-Jun-01): (goto-char (point-min))
+1.344 (rms 29-Jun-01): (let ((case-fold-search t))
+1.358 (pot 06-May-02): (if (and content-type
+1.358 (pot 06-May-02): (string-match
+1.358 (pot 06-May-02): ";[\n\t ]*boundary=\"?\\([-0-9a-z'()+_,./:=? ]+\\)\"?"
+1.344 (rms 29-Jun-01): content-type))
+1.344 (rms 29-Jun-01): ;; Handle a MIME multipart bounce message.
+1.344 (rms 29-Jun-01): (let ((codestring
+1.344 (rms 29-Jun-01): (concat "\n--"
+1.358 (pot 06-May-02): (substring content-type (match-beginning 1)
+1.344 (rms 29-Jun-01): (match-end 1)))))
+1.344 (rms 29-Jun-01): (unless (re-search-forward mail-mime-unsent-header nil t)
+1.344 (rms 29-Jun-01): (error "Cannot find beginning of header in failed message"))
+1.344 (rms 29-Jun-01): (unless (search-forward "\n\n" nil t)
+1.344 (rms 29-Jun-01): (error "Cannot find start of Mime data in failed message"))
+1.344 (rms 29-Jun-01): (setq bounce-start (point))
+1.344 (rms 29-Jun-01): (if (search-forward codestring nil t)
+1.344 (rms 29-Jun-01): (setq bounce-end (match-beginning 0))
+1.344 (rms 29-Jun-01): (setq bounce-end (point-max))))
+1.344 (rms 29-Jun-01): ;; Non-MIME bounce.
+1.344 (rms 29-Jun-01): (or (re-search-forward mail-unsent-separator nil t)
+1.344 (rms 29-Jun-01): (error "Cannot parse this as a failure message"))
+1.344 (rms 29-Jun-01): (skip-chars-forward "\n")
+1.344 (rms 29-Jun-01): ;; Support a style of failure message in which the original
+1.344 (rms 29-Jun-01): ;; message is indented, and included within lines saying
+1.344 (rms 29-Jun-01): ;; `Start of returned message' and `End of returned message'.
+1.344 (rms 29-Jun-01): (if (looking-at " +Received:")
+1.344 (rms 29-Jun-01): (progn
+1.344 (rms 29-Jun-01): (setq bounce-start (point))
+1.344 (rms 29-Jun-01): (skip-chars-forward " ")
+1.344 (rms 29-Jun-01): (setq bounce-indent (- (current-column)))
+1.344 (rms 29-Jun-01): (goto-char (point-max))
+1.344 (rms 29-Jun-01): (re-search-backward "^End of returned message$" nil t)
+1.344 (rms 29-Jun-01): (setq bounce-end (point)))
+1.344 (rms 29-Jun-01): ;; One message contained a few random lines before
+1.344 (rms 29-Jun-01): ;; the old message header. The first line of the
+1.344 (rms 29-Jun-01): ;; message started with two hyphens. A blank line
+1.344 (rms 29-Jun-01): ;; followed these random lines. The same line
+1.344 (rms 29-Jun-01): ;; beginning with two hyphens was possibly marking
+1.344 (rms 29-Jun-01): ;; the end of the message.
+1.344 (rms 29-Jun-01): (if (looking-at "^--")
+1.344 (rms 29-Jun-01): (let ((boundary (buffer-substring-no-properties
+1.344 (rms 29-Jun-01): (point)
+1.344 (rms 29-Jun-01): (progn (end-of-line) (point)))))
+1.344 (rms 29-Jun-01): (search-forward "\n\n")
+1.344 (rms 29-Jun-01): (skip-chars-forward "\n")
+1.344 (rms 29-Jun-01): (setq bounce-start (point))
+1.344 (rms 29-Jun-01): (goto-char (point-max))
+1.344 (rms 29-Jun-01): (search-backward (concat "\n\n" boundary) bounce-start t)
+1.344 (rms 29-Jun-01): (setq bounce-end (point)))
+1.344 (rms 29-Jun-01): (setq bounce-start (point)
+1.344 (rms 29-Jun-01): bounce-end (point-max)))
+1.344 (rms 29-Jun-01): (unless (search-forward "\n\n" nil t)
+1.344 (rms 29-Jun-01): (error "Cannot find end of header in failed message"))))))
+1.344 (rms 29-Jun-01): ;; We have found the message that bounced, within the current message.
+1.344 (rms 29-Jun-01): ;; Now start sending new message; default header fields from original.
+1.344 (rms 29-Jun-01): ;; Turn off the usual actions for initializing the message body
+1.344 (rms 29-Jun-01): ;; because we want to get only the text from the failure message.
+1.344 (rms 29-Jun-01): (let (mail-signature mail-setup-hook)
+1.344 (rms 29-Jun-01): (if (rmail-start-mail nil nil nil nil nil rmail-this-buffer
+1.344 (rms 29-Jun-01): (list (list 'rmail-mark-message
+1.344 (rms 29-Jun-01): rmail-this-buffer
+1.344 (rms 29-Jun-01): (aref rmail-msgref-vector msgnum)
+1.344 (rms 29-Jun-01): "retried")))
+1.344 (rms 29-Jun-01): ;; Insert original text as initial text of new draft message.
+1.344 (rms 29-Jun-01): ;; Bind inhibit-read-only since the header delimiter
+1.344 (rms 29-Jun-01): ;; of the previous message was probably read-only.
+1.344 (rms 29-Jun-01): (let ((inhibit-read-only t)
+1.344 (rms 29-Jun-01): rmail-displayed-headers
+1.344 (rms 29-Jun-01): rmail-ignored-headers)
+1.344 (rms 29-Jun-01): (erase-buffer)
+1.344 (rms 29-Jun-01): (insert-buffer-substring rmail-this-buffer
+1.344 (rms 29-Jun-01): bounce-start bounce-end)
+1.344 (rms 29-Jun-01): (goto-char (point-min))
+1.344 (rms 29-Jun-01): (if bounce-indent
+1.344 (rms 29-Jun-01): (indent-rigidly (point-min) (point-max) bounce-indent))
+1.344 (rms 29-Jun-01): (rmail-clear-headers rmail-retry-ignored-headers)
+1.344 (rms 29-Jun-01): (rmail-clear-headers "^sender:\\|^return-path:\\|^received:")
+1.344 (rms 29-Jun-01): (mail-sendmail-delimit-header)
+1.344 (rms 29-Jun-01): (save-restriction
+1.344 (rms 29-Jun-01): (narrow-to-region (point-min) (mail-header-end))
+1.344 (rms 29-Jun-01): (setq resending (mail-fetch-field "resent-to"))
+1.344 (rms 29-Jun-01): (if mail-self-blind
+1.344 (rms 29-Jun-01): (if resending
+1.344 (rms 29-Jun-01): (insert "Resent-Bcc: " (user-login-name) "\n")
+1.344 (rms 29-Jun-01): (insert "BCC: " (user-login-name) "\n"))))
+1.344 (rms 29-Jun-01): (goto-char (point-min))
+1.344 (rms 29-Jun-01): (mail-position-on-field (if resending "Resent-To" "To") t))))))
+1.147 (rms 12-Mar-95):
+1.39 (rms 09-Mar-93): (defun rmail-summary-exists ()
+1.437 (miles 13-Aug-07): "Non-nil if in an RMAIL buffer and an associated summary buffer exists.
+1.91 (rms 18-Mar-94): In fact, the non-nil value returned is the summary buffer itself."
+1.39 (rms 09-Mar-93): (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
+1.39 (rms 09-Mar-93): rmail-summary-buffer))
+1.39 (rms 09-Mar-93):
+1.39 (rms 09-Mar-93): (defun rmail-summary-displayed ()
+1.437 (miles 13-Aug-07): "t if in RMAIL buffer and an associated summary buffer is displayed."
+1.39 (rms 09-Mar-93): (and rmail-summary-buffer (get-buffer-window rmail-summary-buffer)))
+1.39 (rms 09-Mar-93):
+1.219 (rms 03-May-97): (defcustom rmail-redisplay-summary nil
+1.39 (rms 09-Mar-93): "*Non-nil means Rmail should show the summary when it changes.
+1.219 (rms 03-May-97): This has an effect only if a summary buffer exists."
+1.219 (rms 03-May-97): :type 'boolean
+1.219 (rms 03-May-97): :group 'rmail-summary)
+1.219 (rms 03-May-97):
+1.219 (rms 03-May-97): (defcustom rmail-summary-window-size nil
+1.219 (rms 03-May-97): "*Non-nil means specify the height for an Rmail summary window."
+1.238 (kwzh 15-Nov-97): :type '(choice (const :tag "Disabled" nil) integer)
+1.219 (rms 03-May-97): :group 'rmail-summary)
+1.91 (rms 18-Mar-94):
+1.39 (rms 09-Mar-93): ;; Put the summary buffer back on the screen, if user wants that.
+1.39 (rms 09-Mar-93): (defun rmail-maybe-display-summary ()
+1.91 (rms 18-Mar-94): (let ((selected (selected-window))
+1.91 (rms 18-Mar-94): window)
+1.91 (rms 18-Mar-94): ;; If requested, make sure the summary is displayed.
+1.91 (rms 18-Mar-94): (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
+1.91 (rms 18-Mar-94): rmail-redisplay-summary
+1.120 (rms 13-Aug-94): (if (get-buffer-window rmail-summary-buffer 0)
+1.120 (rms 13-Aug-94): ;; It's already in some frame; show that one.
+1.120 (rms 13-Aug-94): (let ((frame (window-frame
+1.120 (rms 13-Aug-94): (get-buffer-window rmail-summary-buffer 0))))
+1.120 (rms 13-Aug-94): (make-frame-visible frame)
+1.120 (rms 13-Aug-94): (raise-frame frame))
+1.120 (rms 13-Aug-94): (display-buffer rmail-summary-buffer)))
+1.91 (rms 18-Mar-94): ;; If requested, set the height of the summary window.
+1.91 (rms 18-Mar-94): (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
+1.91 (rms 18-Mar-94): rmail-summary-window-size
+1.91 (rms 18-Mar-94): (setq window (get-buffer-window rmail-summary-buffer))
+1.120 (rms 13-Aug-94): ;; Don't try to change the size if just one window in frame.
+1.120 (rms 13-Aug-94): (not (eq window (frame-root-window (window-frame window))))
+1.358 (pot 06-May-02): (unwind-protect
+1.91 (rms 18-Mar-94): (progn
+1.91 (rms 18-Mar-94): (select-window window)
+1.180 (simon 07-Mar-96): (enlarge-window (- rmail-summary-window-size (window-height))))
+1.91 (rms 18-Mar-94): (select-window selected)))))
+1.171 (simon 26-Jan-96):
+1.171 (simon 26-Jan-96): ;;;; *** Rmail Local Fontification ***
+1.171 (simon 26-Jan-96):
+1.171 (simon 26-Jan-96): (defun rmail-fontify-buffer-function ()
+1.171 (simon 26-Jan-96): ;; This function's symbol is bound to font-lock-fontify-buffer-function.
+1.172 (simon 02-Feb-96): (add-hook 'rmail-show-message-hook 'rmail-fontify-message nil t)
+1.180 (simon 07-Mar-96): ;; If we're already showing a message, fontify it now.
+1.180 (simon 07-Mar-96): (if rmail-current-message (rmail-fontify-message))
+1.180 (simon 07-Mar-96): ;; Prevent Font Lock mode from kicking in.
+1.172 (simon 02-Feb-96): (setq font-lock-fontified t))
+1.171 (simon 26-Jan-96):
+1.171 (simon 26-Jan-96): (defun rmail-unfontify-buffer-function ()
+1.171 (simon 26-Jan-96): ;; This function's symbol is bound to font-lock-fontify-unbuffer-function.
+1.172 (simon 02-Feb-96): (let ((modified (buffer-modified-p))
+1.172 (simon 02-Feb-96): (buffer-undo-list t) (inhibit-read-only t)
+1.172 (simon 02-Feb-96): before-change-functions after-change-functions
+1.172 (simon 02-Feb-96): buffer-file-name buffer-file-truename)
+1.172 (simon 02-Feb-96): (save-restriction
+1.172 (simon 02-Feb-96): (widen)
+1.172 (simon 02-Feb-96): (remove-hook 'rmail-show-message-hook 'rmail-fontify-message t)
+1.172 (simon 02-Feb-96): (remove-text-properties (point-min) (point-max) '(rmail-fontified nil))
+1.181 (rms 27-Mar-96): (font-lock-default-unfontify-buffer)
+1.181 (rms 27-Mar-96): (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil)))))
+1.171 (simon 26-Jan-96):
+1.171 (simon 26-Jan-96): (defun rmail-fontify-message ()
+1.171 (simon 26-Jan-96): ;; Fontify the current message if it is not already fontified.
+1.171 (simon 26-Jan-96): (if (text-property-any (point-min) (point-max) 'rmail-fontified nil)
+1.171 (simon 26-Jan-96): (let ((modified (buffer-modified-p))
+1.171 (simon 26-Jan-96): (buffer-undo-list t) (inhibit-read-only t)
+1.171 (simon 26-Jan-96): before-change-functions after-change-functions
+1.171 (simon 26-Jan-96): buffer-file-name buffer-file-truename)
+1.171 (simon 26-Jan-96): (save-excursion
+1.171 (simon 26-Jan-96): (save-match-data
+1.171 (simon 26-Jan-96): (add-text-properties (point-min) (point-max) '(rmail-fontified t))
+1.181 (rms 27-Mar-96): (font-lock-fontify-region (point-min) (point-max))
+1.181 (rms 27-Mar-96): (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil)))))))
+1.281 (kwzh 10-Jul-98):
+1.281 (kwzh 10-Jul-98): ;;; Speedbar support for RMAIL files.
+1.281 (kwzh 10-Jul-98): (eval-when-compile (require 'speedbar))
+1.179 (rms 04-Mar-96):
+1.281 (kwzh 10-Jul-98): (defvar rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$"
+1.363 (jpw 24-Aug-02): "*This regex is used to match folder names to be displayed in speedbar.
+1.281 (kwzh 10-Jul-98): Enabling this will permit speedbar to display your folders for easy
+1.281 (kwzh 10-Jul-98): browsing, and moving of messages.")
+1.244 (zappo 23-Jan-98):
+1.244 (zappo 23-Jan-98): (defvar rmail-speedbar-last-user nil
+1.244 (zappo 23-Jan-98): "The last user to be displayed in the speedbar.")
+1.244 (zappo 23-Jan-98):
+1.281 (kwzh 10-Jul-98): (defvar rmail-speedbar-key-map nil
+1.281 (kwzh 10-Jul-98): "Keymap used when in rmail display mode.")
+1.281 (kwzh 10-Jul-98):
+1.281 (kwzh 10-Jul-98): (defun rmail-install-speedbar-variables ()
+1.281 (kwzh 10-Jul-98): "Install those variables used by speedbar to enhance rmail."
+1.281 (kwzh 10-Jul-98): (if rmail-speedbar-key-map
+1.281 (kwzh 10-Jul-98): nil
+1.281 (kwzh 10-Jul-98): (setq rmail-speedbar-key-map (speedbar-make-specialized-keymap))
+1.281 (kwzh 10-Jul-98):
+1.281 (kwzh 10-Jul-98): (define-key rmail-speedbar-key-map "e" 'speedbar-edit-line)
+1.281 (kwzh 10-Jul-98): (define-key rmail-speedbar-key-map "r" 'speedbar-edit-line)
+1.281 (kwzh 10-Jul-98): (define-key rmail-speedbar-key-map "\C-m" 'speedbar-edit-line)
+1.281 (kwzh 10-Jul-98): (define-key rmail-speedbar-key-map "M"
+1.281 (kwzh 10-Jul-98): 'rmail-speedbar-move-message-to-folder-on-line)))
+1.281 (kwzh 10-Jul-98):
+1.244 (zappo 23-Jan-98): (defvar rmail-speedbar-menu-items
+1.281 (kwzh 10-Jul-98): '(["Read Folder" speedbar-edit-line t]
+1.281 (kwzh 10-Jul-98): ["Move message to folder" rmail-speedbar-move-message-to-folder-on-line
+1.244 (zappo 23-Jan-98): (save-excursion (beginning-of-line)
+1.244 (zappo 23-Jan-98): (looking-at "<M> "))])
+1.244 (zappo 23-Jan-98): "Additional menu-items to add to speedbar frame.")
+1.244 (zappo 23-Jan-98):
+1.281 (kwzh 10-Jul-98): ;; Make sure our special speedbar major mode is loaded
+1.281 (kwzh 10-Jul-98): (if (featurep 'speedbar)
+1.281 (kwzh 10-Jul-98): (rmail-install-speedbar-variables)
+1.281 (kwzh 10-Jul-98): (add-hook 'speedbar-load-hook 'rmail-install-speedbar-variables))
+1.281 (kwzh 10-Jul-98):
+1.244 (zappo 23-Jan-98): (defun rmail-speedbar-buttons (buffer)
+1.244 (zappo 23-Jan-98): "Create buttons for BUFFER containing rmail messages.
+1.244 (zappo 23-Jan-98): Click on the address under Reply to: to reply to this person.
+1.244 (zappo 23-Jan-98): Under Folders: Click a name to read it, or on the <M> to move the
+1.244 (zappo 23-Jan-98): current message into that RMAIL folder."
+1.244 (zappo 23-Jan-98): (let ((from nil))
+1.244 (zappo 23-Jan-98): (save-excursion
+1.244 (zappo 23-Jan-98): (set-buffer buffer)
+1.244 (zappo 23-Jan-98): (goto-char (point-min))
+1.244 (zappo 23-Jan-98): (if (not (re-search-forward "^Reply-To: " nil t))
+1.244 (zappo 23-Jan-98): (if (not (re-search-forward "^From:? " nil t))
+1.244 (zappo 23-Jan-98): (setq from t)))
+1.244 (zappo 23-Jan-98): (if from
+1.244 (zappo 23-Jan-98): nil
+1.244 (zappo 23-Jan-98): (setq from (buffer-substring (point) (save-excursion
+1.244 (zappo 23-Jan-98): (end-of-line)
+1.244 (zappo 23-Jan-98): (point))))))
+1.244 (zappo 23-Jan-98): (goto-char (point-min))
+1.244 (zappo 23-Jan-98): (if (and (looking-at "Reply to:")
+1.244 (zappo 23-Jan-98): (equal from rmail-speedbar-last-user))
+1.244 (zappo 23-Jan-98): nil
+1.244 (zappo 23-Jan-98): (setq rmail-speedbar-last-user from)
+1.244 (zappo 23-Jan-98): (erase-buffer)
+1.244 (zappo 23-Jan-98): (insert "Reply To:\n")
+1.244 (zappo 23-Jan-98): (if (stringp from)
+1.244 (zappo 23-Jan-98): (speedbar-insert-button from 'speedbar-directory-face 'highlight
+1.244 (zappo 23-Jan-98): 'rmail-speedbar-button 'rmail-reply))
+1.244 (zappo 23-Jan-98): (insert "Folders:\n")
+1.244 (zappo 23-Jan-98): (let* ((case-fold-search nil)
+1.244 (zappo 23-Jan-98): (df (directory-files (save-excursion (set-buffer buffer)
+1.244 (zappo 23-Jan-98): default-directory)
+1.281 (kwzh 10-Jul-98): nil rmail-speedbar-match-folder-regexp)))
+1.244 (zappo 23-Jan-98): (while df
+1.244 (zappo 23-Jan-98): (speedbar-insert-button "<M>" 'speedbar-button-face 'highlight
+1.244 (zappo 23-Jan-98): 'rmail-speedbar-move-message (car df))
+1.244 (zappo 23-Jan-98): (speedbar-insert-button (car df) 'speedbar-file-face 'highlight
+1.244 (zappo 23-Jan-98): 'rmail-speedbar-find-file nil t)
+1.244 (zappo 23-Jan-98): (setq df (cdr df)))))))
+1.244 (zappo 23-Jan-98):
+1.244 (zappo 23-Jan-98): (defun rmail-speedbar-button (text token indent)
+1.244 (zappo 23-Jan-98): "Execute an rmail command specified by TEXT.
+1.244 (zappo 23-Jan-98): The command used is TOKEN. INDENT is not used."
+1.244 (zappo 23-Jan-98): (speedbar-with-attached-buffer
+1.244 (zappo 23-Jan-98): (funcall token t)))
+1.244 (zappo 23-Jan-98):
+1.244 (zappo 23-Jan-98): (defun rmail-speedbar-find-file (text token indent)
+1.244 (zappo 23-Jan-98): "Load in the rmail file TEXT.
+1.244 (zappo 23-Jan-98): TOKEN and INDENT are not used."
+1.244 (zappo 23-Jan-98): (speedbar-with-attached-buffer
+1.244 (zappo 23-Jan-98): (message "Loading in RMAIL file %s..." text)
+1.244 (zappo 23-Jan-98): (find-file text)))
+1.244 (zappo 23-Jan-98):
+1.281 (kwzh 10-Jul-98): (defun rmail-speedbar-move-message-to-folder-on-line ()
+1.244 (zappo 23-Jan-98): "If the current line is a folder, move current message to it."
+1.244 (zappo 23-Jan-98): (interactive)
+1.244 (zappo 23-Jan-98): (save-excursion
+1.244 (zappo 23-Jan-98): (beginning-of-line)
+1.244 (zappo 23-Jan-98): (if (re-search-forward "<M> " (save-excursion (end-of-line) (point)) t)
+1.244 (zappo 23-Jan-98): (progn
+1.244 (zappo 23-Jan-98): (forward-char -2)
+1.244 (zappo 23-Jan-98): (speedbar-do-function-pointer)))))
+1.244 (zappo 23-Jan-98):
+1.244 (zappo 23-Jan-98): (defun rmail-speedbar-move-message (text token indent)
+1.244 (zappo 23-Jan-98): "From button TEXT, copy current message to the rmail file specified by TOKEN.
+1.244 (zappo 23-Jan-98): TEXT and INDENT are not used."
+1.244 (zappo 23-Jan-98): (speedbar-with-attached-buffer
+1.244 (zappo 23-Jan-98): (message "Moving message to %s" token)
+1.244 (zappo 23-Jan-98): (rmail-output-to-rmail-file token)))
+1.244 (zappo 23-Jan-98):
+1.282 (rms 27-Jul-98): ; Functions for setting, getting and encoding the POP password.
+1.282 (rms 27-Jul-98): ; The password is encoded to prevent it from being easily accessible
+1.282 (rms 27-Jul-98): ; to "prying eyes." Obviously, this encoding isn't "real security,"
+1.282 (rms 27-Jul-98): ; nor is it meant to be.
+1.282 (rms 27-Jul-98):
+1.282 (rms 27-Jul-98): ;;;###autoload
+1.395 (eliz 15-Jan-05): (defun rmail-set-remote-password (password)
+1.395 (eliz 15-Jan-05): "Set PASSWORD to be used for retrieving mail from a POP or IMAP server."
+1.282 (rms 27-Jul-98): (interactive "sPassword: ")
+1.282 (rms 27-Jul-98): (if password
+1.395 (eliz 15-Jan-05): (setq rmail-encoded-remote-password
+1.282 (rms 27-Jul-98): (rmail-encode-string password (emacs-pid)))
+1.395 (eliz 15-Jan-05): (setq rmail-remote-password nil)
+1.395 (eliz 15-Jan-05): (setq rmail-encoded-remote-password nil)))
+1.282 (rms 27-Jul-98):
+1.395 (eliz 15-Jan-05): (defun rmail-get-remote-password (imap)
+1.395 (eliz 15-Jan-05): "Get the password for retrieving mail from a POP or IMAP server. If none
+1.282 (rms 27-Jul-98): has been set, then prompt the user for one."
+1.395 (eliz 15-Jan-05): (when (not rmail-encoded-remote-password)
+1.395 (eliz 15-Jan-05): (if (not rmail-remote-password)
+1.395 (eliz 15-Jan-05): (setq rmail-remote-password
+1.395 (eliz 15-Jan-05): (read-passwd (if imap
+1.395 (eliz 15-Jan-05): "IMAP password: "
+1.395 (eliz 15-Jan-05): "POP password: "))))
+1.395 (eliz 15-Jan-05): (rmail-set-remote-password rmail-remote-password)
+1.395 (eliz 15-Jan-05): (setq rmail-remote-password nil))
+1.395 (eliz 15-Jan-05): (rmail-encode-string rmail-encoded-remote-password (emacs-pid)))
+1.282 (rms 27-Jul-98):
+1.282 (rms 27-Jul-98): (defun rmail-have-password ()
+1.395 (eliz 15-Jan-05): (or rmail-remote-password rmail-encoded-remote-password))
+1.282 (rms 27-Jul-98):
+1.282 (rms 27-Jul-98): (defun rmail-encode-string (string mask)
+1.282 (rms 27-Jul-98): "Encode STRING with integer MASK, by taking the exclusive OR of the
+1.282 (rms 27-Jul-98): lowest byte in the mask with the first character of string, the
+1.282 (rms 27-Jul-98): second-lowest-byte with the second character of the string, etc.,
+1.282 (rms 27-Jul-98): restarting at the lowest byte of the mask whenever it runs out.
+1.282 (rms 27-Jul-98): Returns the encoded string. Calling the function again with an
+1.282 (rms 27-Jul-98): encoded string (and the same mask) will decode the string."
+1.293 (rms 31-Dec-98): (setq mask (abs mask)) ; doesn't work if negative
+1.358 (pot 06-May-02): (let* ((string-vector (string-to-vector string)) (i 0)
+1.282 (rms 27-Jul-98): (len (length string-vector)) (curmask mask) charmask)
+1.282 (rms 27-Jul-98): (while (< i len)
+1.282 (rms 27-Jul-98): (if (= curmask 0)
+1.282 (rms 27-Jul-98): (setq curmask mask))
+1.282 (rms 27-Jul-98): (setq charmask (% curmask 256))
+1.282 (rms 27-Jul-98): (setq curmask (lsh curmask -8))
+1.282 (rms 27-Jul-98): (aset string-vector i (logxor charmask (aref string-vector i)))
+1.282 (rms 27-Jul-98): (setq i (1+ i)))
+1.282 (rms 27-Jul-98): (concat string-vector)))
+1.389 (lh 21-Apr-04):
+1.389 (lh 21-Apr-04): ;;;; Desktop support
+1.389 (lh 21-Apr-04):
+1.389 (lh 21-Apr-04): (defun rmail-restore-desktop-buffer (desktop-buffer-file-name
+1.389 (lh 21-Apr-04): desktop-buffer-name
+1.389 (lh 21-Apr-04): desktop-buffer-misc)
+1.389 (lh 21-Apr-04): "Restore an rmail buffer specified in a desktop file."
+1.389 (lh 21-Apr-04): (condition-case error
+1.389 (lh 21-Apr-04): (progn
+1.389 (lh 21-Apr-04): (rmail-input desktop-buffer-file-name)
+1.389 (lh 21-Apr-04): (if (eq major-mode 'rmail-mode)
+1.389 (lh 21-Apr-04): (current-buffer)
+1.389 (lh 21-Apr-04): rmail-buffer))
+1.389 (lh 21-Apr-04): (file-locked
+1.389 (lh 21-Apr-04): (kill-buffer (current-buffer))
+1.389 (lh 21-Apr-04): nil)))
+1.409 (lh 10-Aug-05):
+1.412 (schwab 14-Aug-05): (add-to-list 'desktop-buffer-mode-handlers
+1.412 (schwab 14-Aug-05): '(rmail-mode . rmail-restore-desktop-buffer))
+1.244 (zappo 23-Jan-98):
+1.9 (jimb 16-Mar-92): (provide 'rmail)
+1.9 (jimb 16-Mar-92):
+1.453 (monnier 10-Apr-08): ;; arch-tag: cff0a950-57fe-4f73-a86e-91ff75afd06c
+1.12 (eric 30-May-92): ;;; rmail.el ends here
diff --git a/lisp/mail/mbox-trunk-annotations/rmailedit.el.annotation b/lisp/mail/mbox-trunk-annotations/rmailedit.el.annotation
new file mode 100644
index 00000000000..6a6867e89a1
--- /dev/null
+++ b/lisp/mail/mbox-trunk-annotations/rmailedit.el.annotation
@@ -0,0 +1,164 @@
+1.25 (pj 15-Jul-01): ;;; rmailedit.el --- "RMAIL edit mode" Edit the current message
+1.3 (eric 30-May-92):
+1.40 (gm 12-Jun-08): ;; Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004, 2005, 2006,
+1.40 (gm 12-Jun-08): ;; 2007, 2008 Free Software Foundation, Inc.
+1.6 (eric 22-Jul-92):
+1.4 (eric 16-Jul-92): ;; Maintainer: FSF
+1.5 (eric 17-Jul-92): ;; Keywords: mail
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; This file is part of GNU Emacs.
+1.1 (jla 31-Oct-89):
+1.39 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify
+1.1 (jla 31-Oct-89): ;; it under the terms of the GNU General Public License as published by
+1.39 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or
+1.39 (gm 06-May-08): ;; (at your option) any later version.
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; GNU Emacs is distributed in the hope that it will be useful,
+1.1 (jla 31-Oct-89): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+1.1 (jla 31-Oct-89): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+1.1 (jla 31-Oct-89): ;; GNU General Public License for more details.
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; You should have received a copy of the GNU General Public License
+1.39 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+1.25 (pj 15-Jul-01):
+1.25 (pj 15-Jul-01): ;;; Commentary:
+1.1 (jla 31-Oct-89):
+1.4 (eric 16-Jul-92): ;;; Code:
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): (require 'rmail)
+1.1 (jla 31-Oct-89):
+1.23 (gerd 07-May-01): (defcustom rmail-edit-mode-hook nil
+1.23 (gerd 07-May-01): "List of functions to call when editing an RMAIL message."
+1.23 (gerd 07-May-01): :type 'hook
+1.24 (gerd 07-May-01): :version "21.1"
+1.23 (gerd 07-May-01): :group 'rmail-edit)
+1.23 (gerd 07-May-01):
+1.18 (kwzh 08-Apr-98): (defvar rmail-old-text)
+1.18 (kwzh 08-Apr-98):
+1.1 (jla 31-Oct-89): (defvar rmail-edit-map nil)
+1.1 (jla 31-Oct-89): (if rmail-edit-map
+1.1 (jla 31-Oct-89): nil
+1.7 (rms 20-Jul-93): ;; Make a keymap that inherits text-mode-map.
+1.18 (kwzh 08-Apr-98): (setq rmail-edit-map (make-sparse-keymap))
+1.18 (kwzh 08-Apr-98): (set-keymap-parent rmail-edit-map text-mode-map)
+1.1 (jla 31-Oct-89): (define-key rmail-edit-map "\C-c\C-c" 'rmail-cease-edit)
+1.1 (jla 31-Oct-89): (define-key rmail-edit-map "\C-c\C-]" 'rmail-abort-edit))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; Rmail Edit mode is suitable only for specially formatted data.
+1.1 (jla 31-Oct-89): (put 'rmail-edit-mode 'mode-class 'special)
+1.1 (jla 31-Oct-89):
+1.36 (dann 25-Nov-07): (declare-function rmail-summary-disable "" ())
+1.36 (dann 25-Nov-07): (declare-function rmail-summary-enable "rmailsum" ())
+1.36 (dann 25-Nov-07):
+1.1 (jla 31-Oct-89): (defun rmail-edit-mode ()
+1.1 (jla 31-Oct-89): "Major mode for editing the contents of an RMAIL message.
+1.1 (jla 31-Oct-89): The editing commands are the same as in Text mode, together with two commands
+1.1 (jla 31-Oct-89): to return to regular RMAIL:
+1.23 (gerd 07-May-01): * \\[rmail-abort-edit] cancels the changes
+1.1 (jla 31-Oct-89): you have made and returns to RMAIL
+1.23 (gerd 07-May-01): * \\[rmail-cease-edit] makes them permanent.
+1.23 (gerd 07-May-01): This functions runs the normal hook `rmail-edit-mode-hook'.
+1.1 (jla 31-Oct-89): \\{rmail-edit-map}"
+1.29 (lute 14-Jun-05): (delay-mode-hooks (text-mode))
+1.1 (jla 31-Oct-89): (use-local-map rmail-edit-map)
+1.1 (jla 31-Oct-89): (setq major-mode 'rmail-edit-mode)
+1.1 (jla 31-Oct-89): (setq mode-name "RMAIL Edit")
+1.1 (jla 31-Oct-89): (if (boundp 'mode-line-modified)
+1.1 (jla 31-Oct-89): (setq mode-line-modified (default-value 'mode-line-modified))
+1.1 (jla 31-Oct-89): (setq mode-line-format (default-value 'mode-line-format)))
+1.9 (kwzh 07-Apr-94): (if (rmail-summary-exists)
+1.10 (kwzh 07-Apr-94): (save-excursion
+1.10 (kwzh 07-Apr-94): (set-buffer rmail-summary-buffer)
+1.10 (kwzh 07-Apr-94): (rmail-summary-disable)))
+1.28 (lute 26-May-05): (run-mode-hooks 'rmail-edit-mode-hook))
+1.1 (jla 31-Oct-89):
+1.20 (rms 27-May-98): (defvar rmail-old-pruned nil)
+1.20 (rms 27-May-98): (put 'rmail-old-pruned 'permanent-local t)
+1.20 (rms 27-May-98):
+1.21 (rms 13-Jul-98): (defvar rmail-edit-saved-coding-system nil)
+1.21 (rms 13-Jul-98): (put 'rmail-edit-saved-coding-system 'permanent-local t)
+1.21 (rms 13-Jul-98):
+1.17 (rms 27-Sep-96): ;;;###autoload
+1.1 (jla 31-Oct-89): (defun rmail-edit-current-message ()
+1.1 (jla 31-Oct-89): "Edit the contents of this message."
+1.1 (jla 31-Oct-89): (interactive)
+1.20 (rms 27-May-98): (make-local-variable 'rmail-old-pruned)
+1.20 (rms 27-May-98): (setq rmail-old-pruned (rmail-msg-is-pruned))
+1.21 (rms 13-Jul-98): (make-local-variable 'rmail-edit-saved-coding-system)
+1.21 (rms 13-Jul-98): (setq rmail-edit-saved-coding-system save-buffer-coding-system)
+1.20 (rms 27-May-98): (rmail-toggle-header 0)
+1.1 (jla 31-Oct-89): (rmail-edit-mode)
+1.21 (rms 13-Jul-98): ;; As the local value of save-buffer-coding-system is deleted by
+1.21 (rms 13-Jul-98): ;; rmail-edit-mode, we restore the original value.
+1.21 (rms 13-Jul-98): (make-local-variable 'save-buffer-coding-system)
+1.21 (rms 13-Jul-98): (setq save-buffer-coding-system rmail-edit-saved-coding-system)
+1.1 (jla 31-Oct-89): (make-local-variable 'rmail-old-text)
+1.1 (jla 31-Oct-89): (setq rmail-old-text (buffer-substring (point-min) (point-max)))
+1.1 (jla 31-Oct-89): (setq buffer-read-only nil)
+1.14 (kwzh 25-Apr-95): (force-mode-line-update)
+1.1 (jla 31-Oct-89): (if (and (eq (key-binding "\C-c\C-c") 'rmail-cease-edit)
+1.1 (jla 31-Oct-89): (eq (key-binding "\C-c\C-]") 'rmail-abort-edit))
+1.1 (jla 31-Oct-89): (message "Editing: Type C-c C-c to return to Rmail, C-c C-] to abort")
+1.16 (kwzh 25-Jan-96): (message "%s" (substitute-command-keys
+1.20 (rms 27-May-98): "Editing: Type \\[rmail-cease-edit] to return to Rmail, \\[rmail-abort-edit] to abort"))))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): (defun rmail-cease-edit ()
+1.1 (jla 31-Oct-89): "Finish editing message; switch back to Rmail proper."
+1.1 (jla 31-Oct-89): (interactive)
+1.9 (kwzh 07-Apr-94): (if (rmail-summary-exists)
+1.10 (kwzh 07-Apr-94): (save-excursion
+1.10 (kwzh 07-Apr-94): (set-buffer rmail-summary-buffer)
+1.10 (kwzh 07-Apr-94): (rmail-summary-enable)))
+1.1 (jla 31-Oct-89): ;; Make sure buffer ends with a newline.
+1.1 (jla 31-Oct-89): (save-excursion
+1.1 (jla 31-Oct-89): (goto-char (point-max))
+1.1 (jla 31-Oct-89): (if (/= (preceding-char) ?\n)
+1.1 (jla 31-Oct-89): (insert "\n"))
+1.1 (jla 31-Oct-89): ;; Adjust the marker that points to the end of this message.
+1.1 (jla 31-Oct-89): (set-marker (aref rmail-message-vector (1+ rmail-current-message))
+1.1 (jla 31-Oct-89): (point)))
+1.1 (jla 31-Oct-89): (let ((old rmail-old-text))
+1.14 (kwzh 25-Apr-95): (force-mode-line-update)
+1.18 (kwzh 08-Apr-98): (kill-all-local-variables)
+1.1 (jla 31-Oct-89): (rmail-mode-1)
+1.40 (gm 12-Jun-08): (if (boundp 'tool-bar-map)
+1.40 (gm 12-Jun-08): (set (make-local-variable 'tool-bar-map) rmail-tool-bar-map))
+1.18 (kwzh 08-Apr-98): (rmail-variables)
+1.21 (rms 13-Jul-98): ;; As the local value of save-buffer-coding-system is changed by
+1.21 (rms 13-Jul-98): ;; rmail-variables, we restore the original value.
+1.21 (rms 13-Jul-98): (setq save-buffer-coding-system rmail-edit-saved-coding-system)
+1.1 (jla 31-Oct-89): (if (and (= (length old) (- (point-max) (point-min)))
+1.1 (jla 31-Oct-89): (string= old (buffer-substring (point-min) (point-max))))
+1.1 (jla 31-Oct-89): ()
+1.1 (jla 31-Oct-89): (setq old nil)
+1.1 (jla 31-Oct-89): (rmail-set-attribute "edited" t)
+1.1 (jla 31-Oct-89): (if (boundp 'rmail-summary-vector)
+1.1 (jla 31-Oct-89): (progn
+1.1 (jla 31-Oct-89): (aset rmail-summary-vector (1- rmail-current-message) nil)
+1.1 (jla 31-Oct-89): (save-excursion
+1.1 (jla 31-Oct-89): (rmail-widen-to-current-msgbeg
+1.19 (rms 01-May-98): (function (lambda ()
+1.1 (jla 31-Oct-89): (forward-line 2)
+1.1 (jla 31-Oct-89): (if (looking-at "Summary-line: ")
+1.1 (jla 31-Oct-89): (let ((buffer-read-only nil))
+1.1 (jla 31-Oct-89): (delete-region (point)
+1.1 (jla 31-Oct-89): (progn (forward-line 1)
+1.19 (rms 01-May-98): (point))))))))))))
+1.19 (rms 01-May-98): (save-excursion
+1.20 (rms 27-May-98): (rmail-show-message)
+1.20 (rms 27-May-98): (rmail-toggle-header (if rmail-old-pruned 1 0))))
+1.22 (gerd 18-Nov-99): (run-hooks 'rmail-mode-hook)
+1.1 (jla 31-Oct-89): (setq buffer-read-only t))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): (defun rmail-abort-edit ()
+1.1 (jla 31-Oct-89): "Abort edit of current message; restore original contents."
+1.1 (jla 31-Oct-89): (interactive)
+1.1 (jla 31-Oct-89): (delete-region (point-min) (point-max))
+1.1 (jla 31-Oct-89): (insert rmail-old-text)
+1.13 (rms 09-Aug-94): (rmail-cease-edit)
+1.13 (rms 09-Aug-94): (rmail-highlight-headers))
+1.1 (jla 31-Oct-89):
+1.26 (rost 15-Nov-02): (provide 'rmailedit)
+1.26 (rost 15-Nov-02):
+1.38 (monnier 10-Apr-08): ;; arch-tag: 93c22709-a14a-46c1-ab91-52c3f5a0ec12
+1.3 (eric 30-May-92): ;;; rmailedit.el ends here
diff --git a/lisp/mail/mbox-trunk-annotations/rmailkwd.el.annotation b/lisp/mail/mbox-trunk-annotations/rmailkwd.el.annotation
new file mode 100644
index 00000000000..387fe97a1ad
--- /dev/null
+++ b/lisp/mail/mbox-trunk-annotations/rmailkwd.el.annotation
@@ -0,0 +1,290 @@
+1.14 (pj 15-Jul-01): ;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs
+1.3 (eric 30-May-92):
+1.17 (ttn 06-Aug-05): ;; Copyright (C) 1985, 1988, 1994, 2001, 2002, 2003, 2004,
+1.23 (miles 08-Jan-08): ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+1.6 (eric 22-Jul-92):
+1.4 (eric 16-Jul-92): ;; Maintainer: FSF
+1.5 (eric 17-Jul-92): ;; Keywords: mail
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; This file is part of GNU Emacs.
+1.1 (jla 31-Oct-89):
+1.25 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify
+1.1 (jla 31-Oct-89): ;; it under the terms of the GNU General Public License as published by
+1.25 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or
+1.25 (gm 06-May-08): ;; (at your option) any later version.
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; GNU Emacs is distributed in the hope that it will be useful,
+1.1 (jla 31-Oct-89): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+1.1 (jla 31-Oct-89): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+1.1 (jla 31-Oct-89): ;; GNU General Public License for more details.
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; You should have received a copy of the GNU General Public License
+1.25 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+1.14 (pj 15-Jul-01):
+1.14 (pj 15-Jul-01): ;;; Commentary:
+1.1 (jla 31-Oct-89):
+1.4 (eric 16-Jul-92): ;;; Code:
+1.1 (jla 31-Oct-89):
+1.18 (lektu 29-Aug-05): (defvar rmail-buffer)
+1.18 (lektu 29-Aug-05): (defvar rmail-current-message)
+1.18 (lektu 29-Aug-05): (defvar rmail-last-label)
+1.18 (lektu 29-Aug-05): (defvar rmail-last-multi-labels)
+1.18 (lektu 29-Aug-05): (defvar rmail-summary-vector)
+1.18 (lektu 29-Aug-05): (defvar rmail-total-messages)
+1.18 (lektu 29-Aug-05):
+1.1 (jla 31-Oct-89): ;; Global to all RMAIL buffers. It exists primarily for the sake of
+1.1 (jla 31-Oct-89): ;; completion. It is better to use strings with the label functions
+1.1 (jla 31-Oct-89): ;; and let them worry about making the label.
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): (defvar rmail-label-obarray (make-vector 47 0))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; Named list of symbols representing valid message attributes in RMAIL.
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): (defconst rmail-attributes
+1.1 (jla 31-Oct-89): (cons 'rmail-keywords
+1.9 (kwzh 21-Apr-95): (mapcar (function (lambda (s) (intern s rmail-label-obarray)))
+1.9 (kwzh 21-Apr-95): '("deleted" "answered" "filed" "forwarded" "unseen" "edited"
+1.9 (kwzh 21-Apr-95): "resent"))))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): (defconst rmail-deleted-label (intern "deleted" rmail-label-obarray))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; Named list of symbols representing valid message keywords in RMAIL.
+1.1 (jla 31-Oct-89):
+1.11 (rms 22-Sep-96): (defvar rmail-keywords)
+1.1 (jla 31-Oct-89):
+1.12 (rms 27-Sep-96): ;;;###autoload
+1.1 (jla 31-Oct-89): (defun rmail-add-label (string)
+1.1 (jla 31-Oct-89): "Add LABEL to labels associated with current RMAIL message.
+1.1 (jla 31-Oct-89): Completion is performed over known labels when reading."
+1.1 (jla 31-Oct-89): (interactive (list (rmail-read-label "Add label")))
+1.1 (jla 31-Oct-89): (rmail-set-label string t))
+1.1 (jla 31-Oct-89):
+1.12 (rms 27-Sep-96): ;;;###autoload
+1.1 (jla 31-Oct-89): (defun rmail-kill-label (string)
+1.1 (jla 31-Oct-89): "Remove LABEL from labels associated with current RMAIL message.
+1.1 (jla 31-Oct-89): Completion is performed over known labels when reading."
+1.1 (jla 31-Oct-89): (interactive (list (rmail-read-label "Remove label")))
+1.1 (jla 31-Oct-89): (rmail-set-label string nil))
+1.1 (jla 31-Oct-89):
+1.12 (rms 27-Sep-96): ;;;###autoload
+1.1 (jla 31-Oct-89): (defun rmail-read-label (prompt)
+1.13 (gerd 08-May-01): (with-current-buffer rmail-buffer
+1.13 (gerd 08-May-01): (if (not rmail-keywords) (rmail-parse-file-keywords))
+1.13 (gerd 08-May-01): (let ((result
+1.13 (gerd 08-May-01): (completing-read (concat prompt
+1.13 (gerd 08-May-01): (if rmail-last-label
+1.13 (gerd 08-May-01): (concat " (default "
+1.13 (gerd 08-May-01): (symbol-name rmail-last-label)
+1.13 (gerd 08-May-01): "): ")
+1.13 (gerd 08-May-01): ": "))
+1.13 (gerd 08-May-01): rmail-label-obarray
+1.13 (gerd 08-May-01): nil
+1.13 (gerd 08-May-01): nil)))
+1.13 (gerd 08-May-01): (if (string= result "")
+1.13 (gerd 08-May-01): rmail-last-label
+1.13 (gerd 08-May-01): (setq rmail-last-label (rmail-make-label result t))))))
+1.1 (jla 31-Oct-89):
+1.22 (dann 27-Nov-07): (declare-function rmail-maybe-set-message-counters "rmail" ())
+1.22 (dann 27-Nov-07): (declare-function rmail-display-labels "rmail" ())
+1.22 (dann 27-Nov-07): (declare-function rmail-msgbeg "rmail" (n))
+1.22 (dann 27-Nov-07): (declare-function rmail-set-message-deleted-p "rmail" (n state))
+1.22 (dann 27-Nov-07): (declare-function rmail-message-labels-p "rmail" (msg labels))
+1.22 (dann 27-Nov-07): (declare-function rmail-show-message "rmail" (&optional n no-summary))
+1.22 (dann 27-Nov-07): (declare-function mail-comma-list-regexp "mail-utils" (labels))
+1.22 (dann 27-Nov-07): (declare-function mail-parse-comma-list "mail-utils.el" ())
+1.22 (dann 27-Nov-07):
+1.1 (jla 31-Oct-89): (defun rmail-set-label (l state &optional n)
+1.13 (gerd 08-May-01): (with-current-buffer rmail-buffer
+1.13 (gerd 08-May-01): (rmail-maybe-set-message-counters)
+1.13 (gerd 08-May-01): (if (not n) (setq n rmail-current-message))
+1.13 (gerd 08-May-01): (aset rmail-summary-vector (1- n) nil)
+1.13 (gerd 08-May-01): (let* ((attribute (rmail-attribute-p l))
+1.13 (gerd 08-May-01): (keyword (and (not attribute)
+1.13 (gerd 08-May-01): (or (rmail-keyword-p l)
+1.13 (gerd 08-May-01): (rmail-install-keyword l))))
+1.13 (gerd 08-May-01): (label (or attribute keyword)))
+1.13 (gerd 08-May-01): (if label
+1.13 (gerd 08-May-01): (let ((omax (- (buffer-size) (point-max)))
+1.13 (gerd 08-May-01): (omin (- (buffer-size) (point-min)))
+1.13 (gerd 08-May-01): (buffer-read-only nil)
+1.13 (gerd 08-May-01): (case-fold-search t))
+1.13 (gerd 08-May-01): (unwind-protect
+1.13 (gerd 08-May-01): (save-excursion
+1.13 (gerd 08-May-01): (widen)
+1.13 (gerd 08-May-01): (goto-char (rmail-msgbeg n))
+1.13 (gerd 08-May-01): (forward-line 1)
+1.13 (gerd 08-May-01): (if (not (looking-at "[01],"))
+1.13 (gerd 08-May-01): nil
+1.13 (gerd 08-May-01): (let ((start (1+ (point)))
+1.13 (gerd 08-May-01): (bound))
+1.13 (gerd 08-May-01): (narrow-to-region (point) (progn (end-of-line) (point)))
+1.13 (gerd 08-May-01): (setq bound (point-max))
+1.13 (gerd 08-May-01): (search-backward ",," nil t)
+1.13 (gerd 08-May-01): (if attribute
+1.13 (gerd 08-May-01): (setq bound (1+ (point)))
+1.13 (gerd 08-May-01): (setq start (1+ (point))))
+1.13 (gerd 08-May-01): (goto-char start)
+1.13 (gerd 08-May-01): ; (while (re-search-forward "[ \t]*,[ \t]*" nil t)
+1.13 (gerd 08-May-01): ; (replace-match ","))
+1.13 (gerd 08-May-01): ; (goto-char start)
+1.13 (gerd 08-May-01): (if (re-search-forward
+1.1 (jla 31-Oct-89): (concat ", " (rmail-quote-label-name label) ",")
+1.1 (jla 31-Oct-89): bound
+1.1 (jla 31-Oct-89): 'move)
+1.13 (gerd 08-May-01): (if (not state) (replace-match ","))
+1.13 (gerd 08-May-01): (if state (insert " " (symbol-name label) ",")))
+1.13 (gerd 08-May-01): (if (eq label rmail-deleted-label)
+1.13 (gerd 08-May-01): (rmail-set-message-deleted-p n state)))))
+1.13 (gerd 08-May-01): (narrow-to-region (- (buffer-size) omin) (- (buffer-size) omax))
+1.13 (gerd 08-May-01): (if (= n rmail-current-message) (rmail-display-labels))))))))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; Commented functions aren't used by RMAIL but might be nice for user
+1.1 (jla 31-Oct-89): ;; packages that do stuff with RMAIL. Note that rmail-message-labels-p
+1.2 (jimb 23-Feb-91): ;; is in rmail.el now.
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;(defun rmail-message-label-p (label &optional n)
+1.1 (jla 31-Oct-89): ; "Returns symbol if LABEL (attribute or keyword) on NTH or current message."
+1.7 (kwzh 01-Apr-94): ; (rmail-message-labels-p (or n rmail-current-message) (regexp-quote label)))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;(defun rmail-parse-message-labels (&optional n)
+1.1 (jla 31-Oct-89): ; "Returns labels associated with NTH or current RMAIL message.
+1.7 (kwzh 01-Apr-94): ;The result is a list of two lists of strings. The first is the
+1.7 (kwzh 01-Apr-94): ;message attributes and the second is the message keywords."
+1.7 (kwzh 01-Apr-94): ; (let (atts keys)
+1.7 (kwzh 01-Apr-94): ; (save-restriction
+1.7 (kwzh 01-Apr-94): ; (widen)
+1.7 (kwzh 01-Apr-94): ; (goto-char (rmail-msgbeg (or n rmail-current-message)))
+1.7 (kwzh 01-Apr-94): ; (forward-line 1)
+1.7 (kwzh 01-Apr-94): ; (or (looking-at "[01],") (error "Malformed label line"))
+1.7 (kwzh 01-Apr-94): ; (forward-char 2)
+1.7 (kwzh 01-Apr-94): ; (while (looking-at "[ \t]*\\([^ \t\n,]+\\),")
+1.7 (kwzh 01-Apr-94): ; (setq atts (cons (buffer-substring (match-beginning 1) (match-end 1))
+1.7 (kwzh 01-Apr-94): ; atts))
+1.7 (kwzh 01-Apr-94): ; (goto-char (match-end 0)))
+1.7 (kwzh 01-Apr-94): ; (or (looking-at ",") (error "Malformed label line"))
+1.7 (kwzh 01-Apr-94): ; (forward-char 1)
+1.7 (kwzh 01-Apr-94): ; (while (looking-at "[ \t]*\\([^ \t\n,]+\\),")
+1.7 (kwzh 01-Apr-94): ; (setq keys (cons (buffer-substring (match-beginning 1) (match-end 1))
+1.7 (kwzh 01-Apr-94): ; keys))
+1.7 (kwzh 01-Apr-94): ; (goto-char (match-end 0)))
+1.7 (kwzh 01-Apr-94): ; (or (looking-at "[ \t]*$") (error "Malformed label line"))
+1.7 (kwzh 01-Apr-94): ; (list (nreverse atts) (nreverse keys)))))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): (defun rmail-attribute-p (s)
+1.1 (jla 31-Oct-89): (let ((symbol (rmail-make-label s)))
+1.1 (jla 31-Oct-89): (if (memq symbol (cdr rmail-attributes)) symbol)))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): (defun rmail-keyword-p (s)
+1.1 (jla 31-Oct-89): (let ((symbol (rmail-make-label s)))
+1.1 (jla 31-Oct-89): (if (memq symbol (cdr (rmail-keywords))) symbol)))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): (defun rmail-make-label (s &optional forcep)
+1.1 (jla 31-Oct-89): (cond ((symbolp s) s)
+1.1 (jla 31-Oct-89): (forcep (intern (downcase s) rmail-label-obarray))
+1.1 (jla 31-Oct-89): (t (intern-soft (downcase s) rmail-label-obarray))))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): (defun rmail-force-make-label (s)
+1.1 (jla 31-Oct-89): (intern (downcase s) rmail-label-obarray))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): (defun rmail-quote-label-name (label)
+1.1 (jla 31-Oct-89): (regexp-quote (symbol-name (rmail-make-label label t))))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; Motion on messages with keywords.
+1.1 (jla 31-Oct-89):
+1.12 (rms 27-Sep-96): ;;;###autoload
+1.2 (jimb 23-Feb-91): (defun rmail-previous-labeled-message (n labels)
+1.2 (jimb 23-Feb-91): "Show previous message with one of the labels LABELS.
+1.2 (jimb 23-Feb-91): LABELS should be a comma-separated list of label names.
+1.2 (jimb 23-Feb-91): If LABELS is empty, the last set of labels specified is used.
+1.1 (jla 31-Oct-89): With prefix argument N moves backward N messages with these labels."
+1.1 (jla 31-Oct-89): (interactive "p\nsMove to previous msg with labels: ")
+1.2 (jimb 23-Feb-91): (rmail-next-labeled-message (- n) labels))
+1.1 (jla 31-Oct-89):
+1.12 (rms 27-Sep-96): ;;;###autoload
+1.1 (jla 31-Oct-89): (defun rmail-next-labeled-message (n labels)
+1.2 (jimb 23-Feb-91): "Show next message with one of the labels LABELS.
+1.2 (jimb 23-Feb-91): LABELS should be a comma-separated list of label names.
+1.2 (jimb 23-Feb-91): If LABELS is empty, the last set of labels specified is used.
+1.1 (jla 31-Oct-89): With prefix argument N moves forward N messages with these labels."
+1.1 (jla 31-Oct-89): (interactive "p\nsMove to next msg with labels: ")
+1.1 (jla 31-Oct-89): (if (string= labels "")
+1.1 (jla 31-Oct-89): (setq labels rmail-last-multi-labels))
+1.1 (jla 31-Oct-89): (or labels
+1.1 (jla 31-Oct-89): (error "No labels to find have been specified previously"))
+1.13 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.1 (jla 31-Oct-89): (setq rmail-last-multi-labels labels)
+1.1 (jla 31-Oct-89): (rmail-maybe-set-message-counters)
+1.1 (jla 31-Oct-89): (let ((lastwin rmail-current-message)
+1.1 (jla 31-Oct-89): (current rmail-current-message)
+1.1 (jla 31-Oct-89): (regexp (concat ", ?\\("
+1.1 (jla 31-Oct-89): (mail-comma-list-regexp labels)
+1.1 (jla 31-Oct-89): "\\),")))
+1.1 (jla 31-Oct-89): (save-restriction
+1.1 (jla 31-Oct-89): (widen)
+1.1 (jla 31-Oct-89): (while (and (> n 0) (< current rmail-total-messages))
+1.1 (jla 31-Oct-89): (setq current (1+ current))
+1.1 (jla 31-Oct-89): (if (rmail-message-labels-p current regexp)
+1.1 (jla 31-Oct-89): (setq lastwin current n (1- n))))
+1.1 (jla 31-Oct-89): (while (and (< n 0) (> current 1))
+1.1 (jla 31-Oct-89): (setq current (1- current))
+1.1 (jla 31-Oct-89): (if (rmail-message-labels-p current regexp)
+1.1 (jla 31-Oct-89): (setq lastwin current n (1+ n)))))
+1.1 (jla 31-Oct-89): (rmail-show-message lastwin)
+1.1 (jla 31-Oct-89): (if (< n 0)
+1.1 (jla 31-Oct-89): (message "No previous message with labels %s" labels))
+1.1 (jla 31-Oct-89): (if (> n 0)
+1.1 (jla 31-Oct-89): (message "No following message with labels %s" labels))))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;;; Manipulate the file's Labels option.
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; Return a list of symbols for all
+1.1 (jla 31-Oct-89): ;; the keywords (labels) recorded in this file's Labels option.
+1.1 (jla 31-Oct-89): (defun rmail-keywords ()
+1.1 (jla 31-Oct-89): (or rmail-keywords (rmail-parse-file-keywords)))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; Set rmail-keywords to a list of symbols for all
+1.1 (jla 31-Oct-89): ;; the keywords (labels) recorded in this file's Labels option.
+1.1 (jla 31-Oct-89): (defun rmail-parse-file-keywords ()
+1.1 (jla 31-Oct-89): (save-restriction
+1.1 (jla 31-Oct-89): (save-excursion
+1.1 (jla 31-Oct-89): (widen)
+1.1 (jla 31-Oct-89): (goto-char 1)
+1.1 (jla 31-Oct-89): (setq rmail-keywords
+1.1 (jla 31-Oct-89): (if (search-forward "\nLabels:" (rmail-msgbeg 1) t)
+1.1 (jla 31-Oct-89): (progn
+1.1 (jla 31-Oct-89): (narrow-to-region (point) (progn (end-of-line) (point)))
+1.1 (jla 31-Oct-89): (goto-char (point-min))
+1.1 (jla 31-Oct-89): (cons 'rmail-keywords
+1.1 (jla 31-Oct-89): (mapcar 'rmail-force-make-label
+1.1 (jla 31-Oct-89): (mail-parse-comma-list)))))))))
+1.1 (jla 31-Oct-89):
+1.1 (jla 31-Oct-89): ;; Add WORD to the list in the file's Labels option.
+1.1 (jla 31-Oct-89): ;; Any keyword used for the first time needs this done.
+1.1 (jla 31-Oct-89): (defun rmail-install-keyword (word)
+1.1 (jla 31-Oct-89): (let ((keyword (rmail-make-label word t))
+1.1 (jla 31-Oct-89): (keywords (rmail-keywords)))
+1.1 (jla 31-Oct-89): (if (not (or (rmail-attribute-p keyword)
+1.1 (jla 31-Oct-89): (rmail-keyword-p keyword)))
+1.1 (jla 31-Oct-89): (let ((omin (- (buffer-size) (point-min)))
+1.1 (jla 31-Oct-89): (omax (- (buffer-size) (point-max))))
+1.1 (jla 31-Oct-89): (unwind-protect
+1.1 (jla 31-Oct-89): (save-excursion
+1.1 (jla 31-Oct-89): (widen)
+1.1 (jla 31-Oct-89): (goto-char 1)
+1.1 (jla 31-Oct-89): (let ((case-fold-search t)
+1.1 (jla 31-Oct-89): (buffer-read-only nil))
+1.1 (jla 31-Oct-89): (or (search-forward "\nLabels:" nil t)
+1.1 (jla 31-Oct-89): (progn
+1.1 (jla 31-Oct-89): (end-of-line)
+1.1 (jla 31-Oct-89): (insert "\nLabels:")))
+1.1 (jla 31-Oct-89): (delete-region (point) (progn (end-of-line) (point)))
+1.1 (jla 31-Oct-89): (setcdr keywords (cons keyword (cdr keywords)))
+1.1 (jla 31-Oct-89): (while (setq keywords (cdr keywords))
+1.1 (jla 31-Oct-89): (insert (symbol-name (car keywords)) ","))
+1.1 (jla 31-Oct-89): (delete-char -1)))
+1.1 (jla 31-Oct-89): (narrow-to-region (- (buffer-size) omin)
+1.1 (jla 31-Oct-89): (- (buffer-size) omax)))))
+1.1 (jla 31-Oct-89): keyword))
+1.3 (eric 30-May-92):
+1.24 (monnier 10-Apr-08): ;; arch-tag: b26b3392-99ca-4e1d-933a-dab59b04e9a8
+1.3 (eric 30-May-92): ;;; rmailkwd.el ends here
diff --git a/lisp/mail/mbox-trunk-annotations/rmailmsc.el.annotation b/lisp/mail/mbox-trunk-annotations/rmailmsc.el.annotation
new file mode 100644
index 00000000000..93bcb129e10
--- /dev/null
+++ b/lisp/mail/mbox-trunk-annotations/rmailmsc.el.annotation
@@ -0,0 +1,67 @@
+1.2 (eric 30-May-92): ;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader
+1.2 (eric 30-May-92):
+1.18 (gm 09-Dec-06): ;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005,
+1.22 (miles 08-Jan-08): ;; 2006, 2007, 2008 Free Software Foundation, Inc.
+1.5 (eric 22-Jul-92):
+1.3 (eric 16-Jul-92): ;; Maintainer: FSF
+1.4 (eric 17-Jul-92): ;; Keywords: mail
+1.1 (jimb 31-Oct-89):
+1.1 (jimb 31-Oct-89): ;; This file is part of GNU Emacs.
+1.1 (jimb 31-Oct-89):
+1.24 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify
+1.1 (jimb 31-Oct-89): ;; it under the terms of the GNU General Public License as published by
+1.24 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or
+1.24 (gm 06-May-08): ;; (at your option) any later version.
+1.1 (jimb 31-Oct-89):
+1.1 (jimb 31-Oct-89): ;; GNU Emacs is distributed in the hope that it will be useful,
+1.1 (jimb 31-Oct-89): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+1.1 (jimb 31-Oct-89): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+1.1 (jimb 31-Oct-89): ;; GNU General Public License for more details.
+1.1 (jimb 31-Oct-89):
+1.1 (jimb 31-Oct-89): ;; You should have received a copy of the GNU General Public License
+1.24 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+1.1 (jimb 31-Oct-89):
+1.12 (pj 15-Jul-01): ;;; Commentary:
+1.12 (pj 15-Jul-01):
+1.6 (eric 17-Mar-93): ;;; Code:
+1.1 (jimb 31-Oct-89):
+1.16 (lektu 29-Aug-05): (defvar rmail-current-message)
+1.16 (lektu 29-Aug-05): (defvar rmail-inbox-list)
+1.16 (lektu 29-Aug-05):
+1.21 (dann 25-Nov-07): (declare-function rmail-parse-file-inboxes "rmail" ())
+1.21 (dann 25-Nov-07): (declare-function rmail-show-message "rmail" (&optional n no-summary))
+1.21 (dann 25-Nov-07):
+1.10 (rms 27-Sep-96): ;;;###autoload
+1.1 (jimb 31-Oct-89): (defun set-rmail-inbox-list (file-name)
+1.1 (jimb 31-Oct-89): "Set the inbox list of the current RMAIL file to FILE-NAME.
+1.8 (rms 06-Sep-94): You can specify one file name, or several names separated by commas.
+1.8 (rms 06-Sep-94): If FILE-NAME is empty, remove any existing inbox list."
+1.1 (jimb 31-Oct-89): (interactive "sSet mailbox list to (comma-separated list of filenames): ")
+1.11 (rms 08-Aug-98):
+1.11 (rms 08-Aug-98): (unless (eq major-mode 'rmail-mode)
+1.11 (rms 08-Aug-98): (error "set-rmail-inbox-list works only for an Rmail file"))
+1.11 (rms 08-Aug-98):
+1.1 (jimb 31-Oct-89): (save-excursion
+1.1 (jimb 31-Oct-89): (let ((names (rmail-parse-file-inboxes))
+1.1 (jimb 31-Oct-89): (standard-output nil))
+1.1 (jimb 31-Oct-89): (if (or (not names)
+1.1 (jimb 31-Oct-89): (y-or-n-p (concat "Replace "
+1.1 (jimb 31-Oct-89): (mapconcat 'identity names ", ")
+1.1 (jimb 31-Oct-89): "? ")))
+1.1 (jimb 31-Oct-89): (let ((buffer-read-only nil))
+1.1 (jimb 31-Oct-89): (widen)
+1.1 (jimb 31-Oct-89): (goto-char (point-min))
+1.1 (jimb 31-Oct-89): (search-forward "\n\^_")
+1.1 (jimb 31-Oct-89): (re-search-backward "^Mail" nil t)
+1.1 (jimb 31-Oct-89): (forward-line 0)
+1.1 (jimb 31-Oct-89): (if (looking-at "Mail:")
+1.1 (jimb 31-Oct-89): (delete-region (point)
+1.1 (jimb 31-Oct-89): (progn (forward-line 1)
+1.1 (jimb 31-Oct-89): (point))))
+1.1 (jimb 31-Oct-89): (if (not (string= file-name ""))
+1.7 (rms 18-Jun-94): (insert-before-markers "Mail: " file-name "\n"))))))
+1.1 (jimb 31-Oct-89): (setq rmail-inbox-list (rmail-parse-file-inboxes))
+1.1 (jimb 31-Oct-89): (rmail-show-message rmail-current-message))
+1.2 (eric 30-May-92):
+1.23 (monnier 10-Apr-08): ;; arch-tag: 74ed1d50-2c25-4cbd-b5ae-d29ed8aba6e4
+1.2 (eric 30-May-92): ;;; rmailmsc.el ends here
diff --git a/lisp/mail/mbox-trunk-annotations/rmailout.el.annotation b/lisp/mail/mbox-trunk-annotations/rmailout.el.annotation
new file mode 100644
index 00000000000..a7900d4c4f4
--- /dev/null
+++ b/lisp/mail/mbox-trunk-annotations/rmailout.el.annotation
@@ -0,0 +1,420 @@
+1.65 (pj 15-Jul-01): ;;; rmailout.el --- "RMAIL" mail reader for Emacs: output message to a file
+1.4 (eric 30-May-92):
+1.69 (ttn 06-Aug-05): ;; Copyright (C) 1985, 1987, 1993, 1994, 2001, 2002, 2003, 2004,
+1.79 (miles 08-Jan-08): ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+1.9 (eric 22-Jul-92):
+1.6 (eric 15-Jul-92): ;; Maintainer: FSF
+1.8 (eric 17-Jul-92): ;; Keywords: mail
+1.1 (root 22-May-90):
+1.1 (root 22-May-90): ;; This file is part of GNU Emacs.
+1.1 (root 22-May-90):
+1.81 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify
+1.1 (root 22-May-90): ;; it under the terms of the GNU General Public License as published by
+1.81 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or
+1.81 (gm 06-May-08): ;; (at your option) any later version.
+1.1 (root 22-May-90):
+1.1 (root 22-May-90): ;; GNU Emacs is distributed in the hope that it will be useful,
+1.1 (root 22-May-90): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+1.1 (root 22-May-90): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+1.1 (root 22-May-90): ;; GNU General Public License for more details.
+1.1 (root 22-May-90):
+1.1 (root 22-May-90): ;; You should have received a copy of the GNU General Public License
+1.81 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+1.65 (pj 15-Jul-01):
+1.65 (pj 15-Jul-01): ;;; Commentary:
+1.1 (root 22-May-90):
+1.6 (eric 15-Jul-92): ;;; Code:
+1.1 (root 22-May-90):
+1.30 (kwzh 09-Feb-94): (require 'rmail)
+1.59 (rms 04-Jan-99): (provide 'rmailout)
+1.30 (kwzh 09-Feb-94):
+1.44 (rms 14-Sep-96): ;;;###autoload
+1.49 (rms 03-May-97): (defcustom rmail-output-file-alist nil
+1.2 (rms 24-Dec-90): "*Alist matching regexps to suggested output Rmail files.
+1.16 (rms 09-Jul-93): This is a list of elements of the form (REGEXP . NAME-EXP).
+1.21 (roland 14-Oct-93): The suggestion is taken if REGEXP matches anywhere in the message buffer.
+1.16 (rms 09-Jul-93): NAME-EXP may be a string constant giving the file name to use,
+1.16 (rms 09-Jul-93): or more generally it may be any kind of expression that returns
+1.49 (rms 03-May-97): a file name as a string."
+1.49 (rms 03-May-97): :type '(repeat (cons regexp
+1.49 (rms 03-May-97): (choice :value ""
+1.49 (rms 03-May-97): (string :tag "File Name")
+1.49 (rms 03-May-97): sexp)))
+1.49 (rms 03-May-97): :group 'rmail-output)
+1.2 (rms 24-Dec-90):
+1.59 (rms 04-Jan-99): (defun rmail-output-read-rmail-file-name ()
+1.59 (rms 04-Jan-99): "Read the file name to use for `rmail-output-to-rmail-file'.
+1.59 (rms 04-Jan-99): Set `rmail-default-rmail-file' to this name as well as returning it."
+1.59 (rms 04-Jan-99): (let ((default-file
+1.59 (rms 04-Jan-99): (let (answer tail)
+1.59 (rms 04-Jan-99): (setq tail rmail-output-file-alist)
+1.59 (rms 04-Jan-99): ;; Suggest a file based on a pattern match.
+1.59 (rms 04-Jan-99): (while (and tail (not answer))
+1.59 (rms 04-Jan-99): (save-excursion
+1.63 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.59 (rms 04-Jan-99): (goto-char (point-min))
+1.59 (rms 04-Jan-99): (if (re-search-forward (car (car tail)) nil t)
+1.59 (rms 04-Jan-99): (setq answer (eval (cdr (car tail)))))
+1.59 (rms 04-Jan-99): (setq tail (cdr tail))))
+1.59 (rms 04-Jan-99): ;; If no suggestions, use same file as last time.
+1.59 (rms 04-Jan-99): (expand-file-name (or answer rmail-default-rmail-file)))))
+1.59 (rms 04-Jan-99): (let ((read-file
+1.59 (rms 04-Jan-99): (expand-file-name
+1.59 (rms 04-Jan-99): (read-file-name
+1.70 (rfrancoi 24-Sep-05): (concat "Output message to Rmail file (default "
+1.59 (rms 04-Jan-99): (file-name-nondirectory default-file)
+1.70 (rfrancoi 24-Sep-05): "): ")
+1.59 (rms 04-Jan-99): (file-name-directory default-file)
+1.59 (rms 04-Jan-99): (abbreviate-file-name default-file))
+1.59 (rms 04-Jan-99): (file-name-directory default-file))))
+1.59 (rms 04-Jan-99): ;; If the user enters just a directory,
+1.59 (rms 04-Jan-99): ;; use the name within that directory chosen by the default.
+1.59 (rms 04-Jan-99): (setq rmail-default-rmail-file
+1.59 (rms 04-Jan-99): (if (file-directory-p read-file)
+1.59 (rms 04-Jan-99): (expand-file-name (file-name-nondirectory default-file)
+1.59 (rms 04-Jan-99): read-file)
+1.59 (rms 04-Jan-99): read-file)))))
+1.59 (rms 04-Jan-99):
+1.59 (rms 04-Jan-99): (defun rmail-output-read-file-name ()
+1.59 (rms 04-Jan-99): "Read the file name to use for `rmail-output'.
+1.59 (rms 04-Jan-99): Set `rmail-default-file' to this name as well as returning it."
+1.59 (rms 04-Jan-99): (let ((default-file
+1.59 (rms 04-Jan-99): (let (answer tail)
+1.59 (rms 04-Jan-99): (setq tail rmail-output-file-alist)
+1.59 (rms 04-Jan-99): ;; Suggest a file based on a pattern match.
+1.59 (rms 04-Jan-99): (while (and tail (not answer))
+1.59 (rms 04-Jan-99): (save-excursion
+1.59 (rms 04-Jan-99): (goto-char (point-min))
+1.59 (rms 04-Jan-99): (if (re-search-forward (car (car tail)) nil t)
+1.59 (rms 04-Jan-99): (setq answer (eval (cdr (car tail)))))
+1.59 (rms 04-Jan-99): (setq tail (cdr tail))))
+1.59 (rms 04-Jan-99): ;; If no suggestion, use same file as last time.
+1.59 (rms 04-Jan-99): (or answer rmail-default-file))))
+1.59 (rms 04-Jan-99): (let ((read-file
+1.59 (rms 04-Jan-99): (expand-file-name
+1.59 (rms 04-Jan-99): (read-file-name
+1.70 (rfrancoi 24-Sep-05): (concat "Output message to Unix mail file (default "
+1.59 (rms 04-Jan-99): (file-name-nondirectory default-file)
+1.70 (rfrancoi 24-Sep-05): "): ")
+1.59 (rms 04-Jan-99): (file-name-directory default-file)
+1.59 (rms 04-Jan-99): (abbreviate-file-name default-file))
+1.59 (rms 04-Jan-99): (file-name-directory default-file))))
+1.59 (rms 04-Jan-99): (setq rmail-default-file
+1.59 (rms 04-Jan-99): (if (file-directory-p read-file)
+1.59 (rms 04-Jan-99): (expand-file-name (file-name-nondirectory default-file)
+1.59 (rms 04-Jan-99): read-file)
+1.59 (rms 04-Jan-99): (expand-file-name
+1.59 (rms 04-Jan-99): (or read-file (file-name-nondirectory default-file))
+1.59 (rms 04-Jan-99): (file-name-directory default-file)))))))
+1.59 (rms 04-Jan-99):
+1.77 (dann 25-Nov-07): (declare-function rmail-update-summary "rmailsum" (&rest ignore))
+1.77 (dann 25-Nov-07):
+1.55 (rms 16-Aug-98): ;;; There are functions elsewhere in Emacs that use this function;
+1.55 (rms 16-Aug-98): ;;; look at them before you change the calling method.
+1.45 (rms 27-Sep-96): ;;;###autoload
+1.61 (fx 24-May-00): (defun rmail-output-to-rmail-file (file-name &optional count stay)
+1.1 (root 22-May-90): "Append the current message to an Rmail file named FILE-NAME.
+1.1 (root 22-May-90): If the file does not exist, ask if it should be created.
+1.1 (root 22-May-90): If file is being visited, the message is appended to the Emacs
+1.1 (root 22-May-90): buffer visiting that file.
+1.50 (rms 20-Sep-97): If the file exists and is not an Rmail file, the message is
+1.50 (rms 20-Sep-97): appended in inbox format, the same way `rmail-output' does it.
+1.16 (rms 09-Jul-93):
+1.37 (rms 05-May-94): The default file name comes from `rmail-default-rmail-file',
+1.28 (rms 15-Jan-94): which is updated to the name you use in this command.
+1.28 (rms 15-Jan-94):
+1.71 (eliz 04-Nov-05): A prefix argument COUNT says to output that many consecutive messages,
+1.61 (fx 24-May-00): starting with the current one. Deleted messages are skipped and don't count.
+1.61 (fx 24-May-00):
+1.71 (eliz 04-Nov-05): If the optional argument STAY is non-nil, then leave the last filed
+1.71 (eliz 04-Nov-05): message up instead of moving forward to the next non-deleted message."
+1.13 (rms 11-Jun-93): (interactive
+1.59 (rms 04-Jan-99): (list (rmail-output-read-rmail-file-name)
+1.59 (rms 04-Jan-99): (prefix-numeric-value current-prefix-arg)))
+1.11 (jimb 14-Feb-93): (or count (setq count 1))
+1.3 (jimb 01-Mar-91): (setq file-name
+1.3 (jimb 01-Mar-91): (expand-file-name file-name
+1.27 (rms 15-Jan-94): (file-name-directory rmail-default-rmail-file)))
+1.42 (rms 21-Sep-95): (if (and (file-readable-p file-name) (not (mail-file-babyl-p file-name)))
+1.16 (rms 09-Jul-93): (rmail-output file-name count)
+1.16 (rms 09-Jul-93): (rmail-maybe-set-message-counters)
+1.16 (rms 09-Jul-93): (setq file-name (abbreviate-file-name file-name))
+1.47 (rms 30-Mar-97): (or (find-buffer-visiting file-name)
+1.16 (rms 09-Jul-93): (file-exists-p file-name)
+1.16 (rms 09-Jul-93): (if (yes-or-no-p
+1.16 (rms 09-Jul-93): (concat "\"" file-name "\" does not exist, create it? "))
+1.16 (rms 09-Jul-93): (let ((file-buffer (create-file-buffer file-name)))
+1.1 (root 22-May-90): (save-excursion
+1.16 (rms 09-Jul-93): (set-buffer file-buffer)
+1.16 (rms 09-Jul-93): (rmail-insert-rmail-file-header)
+1.62 (eliz 11-Mar-01): (let ((require-final-newline nil)
+1.62 (eliz 11-Mar-01): (coding-system-for-write
+1.62 (eliz 11-Mar-01): (or rmail-file-coding-system
+1.62 (eliz 11-Mar-01): 'emacs-mule-unix)))
+1.16 (rms 09-Jul-93): (write-region (point-min) (point-max) file-name t 1)))
+1.16 (rms 09-Jul-93): (kill-buffer file-buffer))
+1.16 (rms 09-Jul-93): (error "Output file does not exist")))
+1.16 (rms 09-Jul-93): (while (> count 0)
+1.16 (rms 09-Jul-93): (let (redelete)
+1.16 (rms 09-Jul-93): (unwind-protect
+1.16 (rms 09-Jul-93): (progn
+1.63 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.24 (rms 23-Dec-93): ;; Temporarily turn off Deleted attribute.
+1.24 (rms 23-Dec-93): ;; Do this outside the save-restriction, since it would
+1.24 (rms 23-Dec-93): ;; shift the place in the buffer where the visible text starts.
+1.24 (rms 23-Dec-93): (if (rmail-message-deleted-p rmail-current-message)
+1.24 (rms 23-Dec-93): (progn (setq redelete t)
+1.24 (rms 23-Dec-93): (rmail-set-attribute "deleted" nil)))
+1.16 (rms 09-Jul-93): (save-restriction
+1.16 (rms 09-Jul-93): (widen)
+1.16 (rms 09-Jul-93): ;; Decide whether to append to a file or to an Emacs buffer.
+1.16 (rms 09-Jul-93): (save-excursion
+1.47 (rms 30-Mar-97): (let ((buf (find-buffer-visiting file-name))
+1.16 (rms 09-Jul-93): (cur (current-buffer))
+1.16 (rms 09-Jul-93): (beg (1+ (rmail-msgbeg rmail-current-message)))
+1.52 (rms 27-May-98): (end (1+ (rmail-msgend rmail-current-message)))
+1.52 (rms 27-May-98): (coding-system-for-write
+1.52 (rms 27-May-98): (or rmail-file-coding-system
+1.52 (rms 27-May-98): 'emacs-mule-unix)))
+1.16 (rms 09-Jul-93): (if (not buf)
+1.40 (rms 17-Nov-94): ;; Output to a file.
+1.40 (rms 17-Nov-94): (if rmail-fields-not-to-output
+1.40 (rms 17-Nov-94): ;; Delete some fields while we output.
+1.40 (rms 17-Nov-94): (let ((obuf (current-buffer)))
+1.40 (rms 17-Nov-94): (set-buffer (get-buffer-create " rmail-out-temp"))
+1.40 (rms 17-Nov-94): (insert-buffer-substring obuf beg end)
+1.40 (rms 17-Nov-94): (rmail-delete-unwanted-fields)
+1.40 (rms 17-Nov-94): (append-to-file (point-min) (point-max) file-name)
+1.40 (rms 17-Nov-94): (set-buffer obuf)
+1.40 (rms 17-Nov-94): (kill-buffer (get-buffer " rmail-out-temp")))
+1.40 (rms 17-Nov-94): (append-to-file beg end file-name))
+1.16 (rms 09-Jul-93): (if (eq buf (current-buffer))
+1.16 (rms 09-Jul-93): (error "Can't output message to same file it's already in"))
+1.16 (rms 09-Jul-93): ;; File has been visited, in buffer BUF.
+1.16 (rms 09-Jul-93): (set-buffer buf)
+1.16 (rms 09-Jul-93): (let ((buffer-read-only nil)
+1.16 (rms 09-Jul-93): (msg (and (boundp 'rmail-current-message)
+1.16 (rms 09-Jul-93): rmail-current-message)))
+1.16 (rms 09-Jul-93): ;; If MSG is non-nil, buffer is in RMAIL mode.
+1.16 (rms 09-Jul-93): (if msg
+1.16 (rms 09-Jul-93): (progn
+1.25 (rms 24-Dec-93): ;; Turn on auto save mode, if it's off in this
+1.25 (rms 24-Dec-93): ;; buffer but enabled by default.
+1.25 (rms 24-Dec-93): (and (not buffer-auto-save-file-name)
+1.25 (rms 24-Dec-93): auto-save-default
+1.25 (rms 24-Dec-93): (auto-save-mode t))
+1.16 (rms 09-Jul-93): (rmail-maybe-set-message-counters)
+1.16 (rms 09-Jul-93): (widen)
+1.16 (rms 09-Jul-93): (narrow-to-region (point-max) (point-max))
+1.16 (rms 09-Jul-93): (insert-buffer-substring cur beg end)
+1.16 (rms 09-Jul-93): (goto-char (point-min))
+1.16 (rms 09-Jul-93): (widen)
+1.16 (rms 09-Jul-93): (search-backward "\n\^_")
+1.16 (rms 09-Jul-93): (narrow-to-region (point) (point-max))
+1.40 (rms 17-Nov-94): (rmail-delete-unwanted-fields)
+1.16 (rms 09-Jul-93): (rmail-count-new-messages t)
+1.24 (rms 23-Dec-93): (if (rmail-summary-exists)
+1.24 (rms 23-Dec-93): (rmail-select-summary
+1.24 (rms 23-Dec-93): (rmail-update-summary)))
+1.16 (rms 09-Jul-93): (rmail-show-message msg))
+1.52 (rms 27-May-98): ;; Output file not in rmail mode => just insert at the end.
+1.52 (rms 27-May-98): (narrow-to-region (point-min) (1+ (buffer-size)))
+1.52 (rms 27-May-98): (goto-char (point-max))
+1.52 (rms 27-May-98): (insert-buffer-substring cur beg end)
+1.52 (rms 27-May-98): (rmail-delete-unwanted-fields)))))))
+1.16 (rms 09-Jul-93): (rmail-set-attribute "filed" t))
+1.16 (rms 09-Jul-93): (if redelete (rmail-set-attribute "deleted" t))))
+1.16 (rms 09-Jul-93): (setq count (1- count))
+1.16 (rms 09-Jul-93): (if rmail-delete-after-output
+1.66 (pot 04-Feb-03): (unless
+1.61 (fx 24-May-00): (if (and (= count 0) stay)
+1.61 (fx 24-May-00): (rmail-delete-message)
+1.61 (fx 24-May-00): (rmail-delete-forward))
+1.61 (fx 24-May-00): (setq count 0))
+1.16 (rms 09-Jul-93): (if (> count 0)
+1.66 (pot 04-Feb-03): (unless
+1.61 (fx 24-May-00): (if (not stay) (rmail-next-undeleted-message 1))
+1.61 (fx 24-May-00): (setq count 0)))))))
+1.16 (rms 09-Jul-93):
+1.45 (rms 27-Sep-96): ;;;###autoload
+1.49 (rms 03-May-97): (defcustom rmail-fields-not-to-output nil
+1.49 (rms 03-May-97): "*Regexp describing fields to exclude when outputting a message to a file."
+1.49 (rms 03-May-97): :type '(choice (const :tag "None" nil)
+1.49 (rms 03-May-97): regexp)
+1.49 (rms 03-May-97): :group 'rmail-output)
+1.40 (rms 17-Nov-94):
+1.40 (rms 17-Nov-94): ;; Delete from the buffer header fields we don't want output.
+1.40 (rms 17-Nov-94): ;; NOT-RMAIL if t means this buffer does not have the full header
+1.40 (rms 17-Nov-94): ;; and *** EOOH *** that a message in an Rmail file has.
+1.40 (rms 17-Nov-94): (defun rmail-delete-unwanted-fields (&optional not-rmail)
+1.66 (pot 04-Feb-03): (if rmail-fields-not-to-output
+1.40 (rms 17-Nov-94): (save-excursion
+1.40 (rms 17-Nov-94): (goto-char (point-min))
+1.40 (rms 17-Nov-94): ;; Find the end of the header.
+1.40 (rms 17-Nov-94): (if (and (or not-rmail (search-forward "\n*** EOOH ***\n" nil t))
+1.40 (rms 17-Nov-94): (search-forward "\n\n" nil t))
+1.40 (rms 17-Nov-94): (let ((end (point-marker)))
+1.40 (rms 17-Nov-94): (goto-char (point-min))
+1.40 (rms 17-Nov-94): (while (re-search-forward rmail-fields-not-to-output end t)
+1.40 (rms 17-Nov-94): (beginning-of-line)
+1.40 (rms 17-Nov-94): (delete-region (point)
+1.40 (rms 17-Nov-94): (progn (forward-line 1) (point)))))))))
+1.40 (rms 17-Nov-94):
+1.55 (rms 16-Aug-98): ;;; There are functions elsewhere in Emacs that use this function;
+1.55 (rms 16-Aug-98): ;;; look at them before you change the calling method.
+1.45 (rms 27-Sep-96): ;;;###autoload
+1.22 (rms 15-Nov-93): (defun rmail-output (file-name &optional count noattribute from-gnus)
+1.32 (rms 03-Apr-94): "Append this message to system-inbox-format mail file named FILE-NAME.
+1.71 (eliz 04-Nov-05): A prefix argument COUNT says to output that many consecutive messages,
+1.11 (jimb 14-Feb-93): starting with the current one. Deleted messages are skipped and don't count.
+1.71 (eliz 04-Nov-05): When called from lisp code, COUNT may be omitted and defaults to 1.
+1.19 (rms 25-Jul-93):
+1.20 (rms 09-Oct-93): If the pruned message header is shown on the current message, then
+1.20 (rms 09-Oct-93): messages will be appended with pruned headers; otherwise, messages
+1.20 (rms 09-Oct-93): will be appended with their original headers.
+1.28 (rms 15-Jan-94):
+1.38 (rms 19-May-94): The default file name comes from `rmail-default-file',
+1.28 (rms 15-Jan-94): which is updated to the name you use in this command.
+1.20 (rms 09-Oct-93):
+1.19 (rms 25-Jul-93): The optional third argument NOATTRIBUTE, if non-nil, says not
+1.22 (rms 15-Nov-93): to set the `filed' attribute, and not to display a message.
+1.22 (rms 15-Nov-93):
+1.22 (rms 15-Nov-93): The optional fourth argument FROM-GNUS is set when called from GNUS."
+1.1 (root 22-May-90): (interactive
+1.59 (rms 04-Jan-99): (list (rmail-output-read-file-name)
+1.59 (rms 04-Jan-99): (prefix-numeric-value current-prefix-arg)))
+1.11 (jimb 14-Feb-93): (or count (setq count 1))
+1.3 (jimb 01-Mar-91): (setq file-name
+1.3 (jimb 01-Mar-91): (expand-file-name file-name
+1.27 (rms 15-Jan-94): (and rmail-default-file
+1.27 (rms 15-Jan-94): (file-name-directory rmail-default-file))))
+1.42 (rms 21-Sep-95): (if (and (file-readable-p file-name) (mail-file-babyl-p file-name))
+1.16 (rms 09-Jul-93): (rmail-output-to-rmail-file file-name count)
+1.63 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.20 (rms 09-Oct-93): (let ((orig-count count)
+1.20 (rms 09-Oct-93): (rmailbuf (current-buffer))
+1.20 (rms 09-Oct-93): (case-fold-search t)
+1.20 (rms 09-Oct-93): (tembuf (get-buffer-create " rmail-output"))
+1.20 (rms 09-Oct-93): (original-headers-p
+1.22 (rms 15-Nov-93): (and (not from-gnus)
+1.66 (pot 04-Feb-03): (save-excursion
+1.22 (rms 15-Nov-93): (save-restriction
+1.22 (rms 15-Nov-93): (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
+1.22 (rms 15-Nov-93): (goto-char (point-min))
+1.22 (rms 15-Nov-93): (forward-line 1)
+1.22 (rms 15-Nov-93): (= (following-char) ?0)))))
+1.20 (rms 09-Oct-93): header-beginning
+1.66 (pot 04-Feb-03): mail-from mime-version content-type)
+1.20 (rms 09-Oct-93): (while (> count 0)
+1.55 (rms 16-Aug-98): ;; Preserve the Mail-From and MIME-Version fields
+1.55 (rms 16-Aug-98): ;; even if they have been pruned.
+1.22 (rms 15-Nov-93): (or from-gnus
+1.55 (rms 16-Aug-98): (save-excursion
+1.55 (rms 16-Aug-98): (save-restriction
+1.55 (rms 16-Aug-98): (widen)
+1.55 (rms 16-Aug-98): (goto-char (rmail-msgbeg rmail-current-message))
+1.55 (rms 16-Aug-98): (setq header-beginning (point))
+1.55 (rms 16-Aug-98): (search-forward "\n*** EOOH ***\n")
+1.55 (rms 16-Aug-98): (narrow-to-region header-beginning (point))
+1.66 (pot 04-Feb-03): (setq mail-from (mail-fetch-field "Mail-From"))
+1.66 (pot 04-Feb-03): (unless rmail-enable-mime
+1.66 (pot 04-Feb-03): (setq mime-version (mail-fetch-field "MIME-Version")
+1.66 (pot 04-Feb-03): content-type (mail-fetch-field "Content-type"))))))
+1.16 (rms 09-Jul-93): (save-excursion
+1.16 (rms 09-Jul-93): (set-buffer tembuf)
+1.16 (rms 09-Jul-93): (erase-buffer)
+1.16 (rms 09-Jul-93): (insert-buffer-substring rmailbuf)
+1.64 (gerd 06-Jul-01): (when rmail-enable-mime
+1.64 (gerd 06-Jul-01): (if original-headers-p
+1.64 (gerd 06-Jul-01): (delete-region (goto-char (point-min))
+1.64 (gerd 06-Jul-01): (if (search-forward "\n*** EOOH ***\n")
+1.64 (gerd 06-Jul-01): (match-end 0)))
+1.64 (gerd 06-Jul-01): (goto-char (point-min))
+1.64 (gerd 06-Jul-01): (forward-line 2)
+1.64 (gerd 06-Jul-01): (delete-region (point-min)(point))
+1.64 (gerd 06-Jul-01): (search-forward "\n*** EOOH ***\n")
+1.64 (gerd 06-Jul-01): (delete-region (match-beginning 0)
+1.64 (gerd 06-Jul-01): (if (search-forward "\n\n")
+1.64 (gerd 06-Jul-01): (1- (match-end 0)))))
+1.64 (gerd 06-Jul-01): (setq buffer-file-coding-system (or rmail-file-coding-system
+1.64 (gerd 06-Jul-01): 'raw-text)))
+1.40 (rms 17-Nov-94): (rmail-delete-unwanted-fields t)
+1.56 (rms 21-Oct-98): (or (bolp) (insert "\n"))
+1.16 (rms 09-Jul-93): (goto-char (point-min))
+1.20 (rms 09-Oct-93): (if mail-from
+1.20 (rms 09-Oct-93): (insert mail-from "\n")
+1.20 (rms 09-Oct-93): (insert "From "
+1.20 (rms 09-Oct-93): (mail-strip-quoted-names (or (mail-fetch-field "from")
+1.20 (rms 09-Oct-93): (mail-fetch-field "really-from")
+1.20 (rms 09-Oct-93): (mail-fetch-field "sender")
+1.20 (rms 09-Oct-93): "unknown"))
+1.20 (rms 09-Oct-93): " " (current-time-string) "\n"))
+1.72 (eliz 21-Jan-06): (when mime-version
+1.72 (eliz 21-Jan-06): (insert "MIME-Version: " mime-version)
+1.72 (eliz 21-Jan-06): ;; Some malformed MIME messages set content-type to nil.
+1.72 (eliz 21-Jan-06): (when content-type
+1.72 (eliz 21-Jan-06): (insert "\nContent-type: " content-type "\n")))
+1.16 (rms 09-Jul-93): ;; ``Quote'' "\nFrom " as "\n>From "
+1.16 (rms 09-Jul-93): ;; (note that this isn't really quoting, as there is no requirement
+1.16 (rms 09-Jul-93): ;; that "\n[>]+From " be quoted in the same transparent way.)
+1.41 (kwzh 02-Dec-94): (let ((case-fold-search nil))
+1.41 (kwzh 02-Dec-94): (while (search-forward "\nFrom " nil t)
+1.41 (kwzh 02-Dec-94): (forward-char -5)
+1.41 (kwzh 02-Dec-94): (insert ?>)))
+1.19 (rms 25-Jul-93): (write-region (point-min) (point-max) file-name t
+1.19 (rms 25-Jul-93): (if noattribute 'nomsg)))
+1.20 (rms 09-Oct-93): (or noattribute
+1.20 (rms 09-Oct-93): (if (equal major-mode 'rmail-mode)
+1.20 (rms 09-Oct-93): (rmail-set-attribute "filed" t)))
+1.20 (rms 09-Oct-93): (setq count (1- count))
+1.22 (rms 15-Nov-93): (or from-gnus
+1.22 (rms 15-Nov-93): (let ((next-message-p
+1.22 (rms 15-Nov-93): (if rmail-delete-after-output
+1.22 (rms 15-Nov-93): (rmail-delete-forward)
+1.22 (rms 15-Nov-93): (if (> count 0)
+1.22 (rms 15-Nov-93): (rmail-next-undeleted-message 1))))
+1.22 (rms 15-Nov-93): (num-appended (- orig-count count)))
+1.22 (rms 15-Nov-93): (if (and next-message-p original-headers-p)
+1.22 (rms 15-Nov-93): (rmail-toggle-header))
+1.22 (rms 15-Nov-93): (if (and (> count 0) (not next-message-p))
+1.66 (pot 04-Feb-03): (progn
+1.78 (deego 06-Dec-07): (error "%s"
+1.22 (rms 15-Nov-93): (save-excursion
+1.22 (rms 15-Nov-93): (set-buffer rmailbuf)
+1.22 (rms 15-Nov-93): (format "Only %d message%s appended" num-appended
+1.22 (rms 15-Nov-93): (if (= num-appended 1) "" "s"))))
+1.22 (rms 15-Nov-93): (setq count 0))))))
+1.20 (rms 09-Oct-93): (kill-buffer tembuf))))
+1.4 (eric 30-May-92):
+1.46 (rms 30-Mar-97): ;;;###autoload
+1.48 (rms 05-Apr-97): (defun rmail-output-body-to-file (file-name)
+1.46 (rms 30-Mar-97): "Write this message body to the file FILE-NAME.
+1.46 (rms 30-Mar-97): FILE-NAME defaults, interactively, from the Subject field of the message."
+1.46 (rms 30-Mar-97): (interactive
+1.46 (rms 30-Mar-97): (let ((default-file
+1.51 (rms 23-May-98): (or (mail-fetch-field "Subject")
+1.51 (rms 23-May-98): rmail-default-body-file)))
+1.51 (rms 23-May-98): (list (setq rmail-default-body-file
+1.51 (rms 23-May-98): (read-file-name
+1.51 (rms 23-May-98): "Output message body to file: "
+1.51 (rms 23-May-98): (and default-file (file-name-directory default-file))
+1.51 (rms 23-May-98): default-file
+1.51 (rms 23-May-98): nil default-file)))))
+1.51 (rms 23-May-98): (setq file-name
+1.51 (rms 23-May-98): (expand-file-name file-name
+1.51 (rms 23-May-98): (and rmail-default-body-file
+1.51 (rms 23-May-98): (file-name-directory rmail-default-body-file))))
+1.46 (rms 30-Mar-97): (save-excursion
+1.46 (rms 30-Mar-97): (goto-char (point-min))
+1.46 (rms 30-Mar-97): (search-forward "\n\n")
+1.48 (rms 05-Apr-97): (and (file-exists-p file-name)
+1.74 (lektu 13-Nov-06): (not (y-or-n-p (format "File %s exists; overwrite? " file-name)))
+1.48 (rms 05-Apr-97): (error "Operation aborted"))
+1.46 (rms 30-Mar-97): (write-region (point) (point-max) file-name)
+1.46 (rms 30-Mar-97): (if (equal major-mode 'rmail-mode)
+1.46 (rms 30-Mar-97): (rmail-set-attribute "stored" t)))
+1.46 (rms 30-Mar-97): (if rmail-delete-after-output
+1.46 (rms 30-Mar-97): (rmail-delete-forward)))
+1.46 (rms 30-Mar-97):
+1.80 (monnier 10-Apr-08): ;; arch-tag: 447117c6-1a9a-4b88-aa43-3101b043e3a4
+1.4 (eric 30-May-92): ;;; rmailout.el ends here
diff --git a/lisp/mail/mbox-trunk-annotations/rmailsort.el.annotation b/lisp/mail/mbox-trunk-annotations/rmailsort.el.annotation
new file mode 100644
index 00000000000..96601607f03
--- /dev/null
+++ b/lisp/mail/mbox-trunk-annotations/rmailsort.el.annotation
@@ -0,0 +1,250 @@
+1.28 (pj 15-Jul-01): ;;; rmailsort.el --- Rmail: sort messages
+1.7 (eric 30-May-92):
+1.32 (ttn 06-Aug-05): ;; Copyright (C) 1990, 1993, 1994, 2001, 2002, 2003, 2004,
+1.37 (miles 08-Jan-08): ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+1.11 (eric 22-Jul-92):
+1.14 (rms 26-May-93): ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp>
+1.26 (rms 10-Feb-97): ;; Maintainer: FSF
+1.10 (eric 17-Jul-92): ;; Keywords: mail
+1.9 (eric 16-Jul-92):
+1.8 (rms 14-Jul-92): ;; This file is part of GNU Emacs.
+1.1 (rms 10-Sep-90):
+1.39 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify
+1.8 (rms 14-Jul-92): ;; it under the terms of the GNU General Public License as published by
+1.39 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or
+1.39 (gm 06-May-08): ;; (at your option) any later version.
+1.1 (rms 10-Sep-90):
+1.1 (rms 10-Sep-90): ;; GNU Emacs is distributed in the hope that it will be useful,
+1.8 (rms 14-Jul-92): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+1.8 (rms 14-Jul-92): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+1.8 (rms 14-Jul-92): ;; GNU General Public License for more details.
+1.8 (rms 14-Jul-92):
+1.8 (rms 14-Jul-92): ;; You should have received a copy of the GNU General Public License
+1.39 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+1.28 (pj 15-Jul-01):
+1.28 (pj 15-Jul-01): ;;; Commentary:
+1.1 (rms 10-Sep-90):
+1.9 (eric 16-Jul-92): ;;; Code:
+1.1 (rms 10-Sep-90):
+1.1 (rms 10-Sep-90): (require 'sort)
+1.24 (kwzh 20-Jan-96):
+1.24 (kwzh 20-Jan-96): ;; For rmail-select-summary
+1.24 (kwzh 20-Jan-96): (require 'rmail)
+1.1 (rms 10-Sep-90):
+1.14 (rms 26-May-93): (autoload 'timezone-make-date-sortable "timezone")
+1.14 (rms 26-May-93):
+1.14 (rms 26-May-93): ;; Sorting messages in Rmail buffer
+1.14 (rms 26-May-93):
+1.25 (rms 27-Sep-96): ;;;###autoload
+1.1 (rms 10-Sep-90): (defun rmail-sort-by-date (reverse)
+1.1 (rms 10-Sep-90): "Sort messages of current Rmail file by date.
+1.1 (rms 10-Sep-90): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.1 (rms 10-Sep-90): (interactive "P")
+1.1 (rms 10-Sep-90): (rmail-sort-messages reverse
+1.1 (rms 10-Sep-90): (function
+1.1 (rms 10-Sep-90): (lambda (msg)
+1.14 (rms 26-May-93): (rmail-make-date-sortable
+1.1 (rms 10-Sep-90): (rmail-fetch-field msg "Date"))))))
+1.1 (rms 10-Sep-90):
+1.25 (rms 27-Sep-96): ;;;###autoload
+1.1 (rms 10-Sep-90): (defun rmail-sort-by-subject (reverse)
+1.1 (rms 10-Sep-90): "Sort messages of current Rmail file by subject.
+1.1 (rms 10-Sep-90): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.1 (rms 10-Sep-90): (interactive "P")
+1.1 (rms 10-Sep-90): (rmail-sort-messages reverse
+1.1 (rms 10-Sep-90): (function
+1.1 (rms 10-Sep-90): (lambda (msg)
+1.1 (rms 10-Sep-90): (let ((key (or (rmail-fetch-field msg "Subject") ""))
+1.1 (rms 10-Sep-90): (case-fold-search t))
+1.1 (rms 10-Sep-90): ;; Remove `Re:'
+1.18 (kwzh 23-Mar-94): (if (string-match "^\\(re:[ \t]*\\)*" key)
+1.18 (kwzh 23-Mar-94): (substring key (match-end 0))
+1.18 (kwzh 23-Mar-94): key))))))
+1.1 (rms 10-Sep-90):
+1.25 (rms 27-Sep-96): ;;;###autoload
+1.1 (rms 10-Sep-90): (defun rmail-sort-by-author (reverse)
+1.1 (rms 10-Sep-90): "Sort messages of current Rmail file by author.
+1.1 (rms 10-Sep-90): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.1 (rms 10-Sep-90): (interactive "P")
+1.1 (rms 10-Sep-90): (rmail-sort-messages reverse
+1.1 (rms 10-Sep-90): (function
+1.1 (rms 10-Sep-90): (lambda (msg)
+1.14 (rms 26-May-93): (downcase ;Canonical name
+1.14 (rms 26-May-93): (mail-strip-quoted-names
+1.14 (rms 26-May-93): (or (rmail-fetch-field msg "From")
+1.14 (rms 26-May-93): (rmail-fetch-field msg "Sender") "")))))))
+1.1 (rms 10-Sep-90):
+1.25 (rms 27-Sep-96): ;;;###autoload
+1.1 (rms 10-Sep-90): (defun rmail-sort-by-recipient (reverse)
+1.1 (rms 10-Sep-90): "Sort messages of current Rmail file by recipient.
+1.1 (rms 10-Sep-90): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.1 (rms 10-Sep-90): (interactive "P")
+1.1 (rms 10-Sep-90): (rmail-sort-messages reverse
+1.1 (rms 10-Sep-90): (function
+1.1 (rms 10-Sep-90): (lambda (msg)
+1.14 (rms 26-May-93): (downcase ;Canonical name
+1.14 (rms 26-May-93): (mail-strip-quoted-names
+1.14 (rms 26-May-93): (or (rmail-fetch-field msg "To")
+1.14 (rms 26-May-93): (rmail-fetch-field msg "Apparently-To") "")
+1.14 (rms 26-May-93): ))))))
+1.1 (rms 10-Sep-90):
+1.25 (rms 27-Sep-96): ;;;###autoload
+1.3 (rms 03-Dec-90): (defun rmail-sort-by-correspondent (reverse)
+1.3 (rms 03-Dec-90): "Sort messages of current Rmail file by other correspondent.
+1.3 (rms 03-Dec-90): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.3 (rms 03-Dec-90): (interactive "P")
+1.3 (rms 03-Dec-90): (rmail-sort-messages reverse
+1.3 (rms 03-Dec-90): (function
+1.3 (rms 03-Dec-90): (lambda (msg)
+1.3 (rms 03-Dec-90): (rmail-select-correspondent
+1.3 (rms 03-Dec-90): msg
+1.3 (rms 03-Dec-90): '("From" "Sender" "To" "Apparently-To"))))))
+1.3 (rms 03-Dec-90):
+1.3 (rms 03-Dec-90): (defun rmail-select-correspondent (msg fields)
+1.3 (rms 03-Dec-90): (let ((ans ""))
+1.14 (rms 26-May-93): (while (and fields (string= ans ""))
+1.14 (rms 26-May-93): (setq ans
+1.14 (rms 26-May-93): (rmail-dont-reply-to
+1.14 (rms 26-May-93): (mail-strip-quoted-names
+1.14 (rms 26-May-93): (or (rmail-fetch-field msg (car fields)) ""))))
+1.14 (rms 26-May-93): (setq fields (cdr fields)))
+1.14 (rms 26-May-93): ans))
+1.4 (rms 27-Dec-90):
+1.25 (rms 27-Sep-96): ;;;###autoload
+1.14 (rms 26-May-93): (defun rmail-sort-by-lines (reverse)
+1.15 (rms 22-Jun-93): "Sort messages of current Rmail file by number of lines.
+1.4 (rms 27-Dec-90): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.4 (rms 27-Dec-90): (interactive "P")
+1.4 (rms 27-Dec-90): (rmail-sort-messages reverse
+1.4 (rms 27-Dec-90): (function
+1.4 (rms 27-Dec-90): (lambda (msg)
+1.17 (kwzh 12-Mar-94): (count-lines (rmail-msgbeg msg)
+1.17 (kwzh 12-Mar-94): (rmail-msgend msg))))))
+1.21 (kwzh 07-Apr-94):
+1.25 (rms 27-Sep-96): ;;;###autoload
+1.27 (gerd 07-May-01): (defun rmail-sort-by-labels (reverse labels)
+1.21 (kwzh 07-Apr-94): "Sort messages of current Rmail file by labels.
+1.21 (kwzh 07-Apr-94): If prefix argument REVERSE is non-nil, sort them in reverse order.
+1.21 (kwzh 07-Apr-94): KEYWORDS is a comma-separated list of labels."
+1.21 (kwzh 07-Apr-94): (interactive "P\nsSort by labels: ")
+1.21 (kwzh 07-Apr-94): (or (string-match "[^ \t]" labels)
+1.21 (kwzh 07-Apr-94): (error "No labels specified"))
+1.21 (kwzh 07-Apr-94): (setq labels (concat (substring labels (match-beginning 0)) ","))
+1.21 (kwzh 07-Apr-94): (let (labelvec)
+1.21 (kwzh 07-Apr-94): (while (string-match "[ \t]*,[ \t]*" labels)
+1.29 (lektu 04-Feb-03): (setq labelvec (cons
+1.21 (kwzh 07-Apr-94): (concat ", ?\\("
+1.21 (kwzh 07-Apr-94): (substring labels 0 (match-beginning 0))
+1.21 (kwzh 07-Apr-94): "\\),")
+1.21 (kwzh 07-Apr-94): labelvec))
+1.21 (kwzh 07-Apr-94): (setq labels (substring labels (match-end 0))))
+1.21 (kwzh 07-Apr-94): (setq labelvec (apply 'vector (nreverse labelvec)))
+1.21 (kwzh 07-Apr-94): (rmail-sort-messages reverse
+1.21 (kwzh 07-Apr-94): (function
+1.21 (kwzh 07-Apr-94): (lambda (msg)
+1.21 (kwzh 07-Apr-94): (let ((n 0))
+1.21 (kwzh 07-Apr-94): (while (and (< n (length labelvec))
+1.21 (kwzh 07-Apr-94): (not (rmail-message-labels-p
+1.21 (kwzh 07-Apr-94): msg (aref labelvec n))))
+1.21 (kwzh 07-Apr-94): (setq n (1+ n)))
+1.21 (kwzh 07-Apr-94): n))))))
+1.14 (rms 26-May-93):
+1.14 (rms 26-May-93): ;; Basic functions
+1.36 (dann 25-Nov-07): (declare-function rmail-update-summary "rmailsum" (&rest ignore))
+1.1 (rms 10-Sep-90):
+1.14 (rms 26-May-93): (defun rmail-sort-messages (reverse keyfun)
+1.1 (rms 10-Sep-90): "Sort messages of current Rmail file.
+1.14 (rms 26-May-93): If 1st argument REVERSE is non-nil, sort them in reverse order.
+1.14 (rms 26-May-93): 2nd argument KEYFUN is called with a message number, and should return a key."
+1.26 (rms 10-Feb-97): (save-current-buffer
+1.16 (rms 24-Nov-93): ;; If we are in a summary buffer, operate on the Rmail buffer.
+1.16 (rms 24-Nov-93): (if (eq major-mode 'rmail-summary-mode)
+1.16 (rms 24-Nov-93): (set-buffer rmail-buffer))
+1.16 (rms 24-Nov-93): (let ((buffer-read-only nil)
+1.26 (rms 10-Feb-97): (point-offset (- (point) (point-min)))
+1.16 (rms 24-Nov-93): (predicate nil) ;< or string-lessp
+1.16 (rms 24-Nov-93): (sort-lists nil))
+1.16 (rms 24-Nov-93): (message "Finding sort keys...")
+1.16 (rms 24-Nov-93): (widen)
+1.16 (rms 24-Nov-93): (let ((msgnum 1))
+1.16 (rms 24-Nov-93): (while (>= rmail-total-messages msgnum)
+1.16 (rms 24-Nov-93): (setq sort-lists
+1.16 (rms 24-Nov-93): (cons (list (funcall keyfun msgnum) ;Make sorting key
+1.16 (rms 24-Nov-93): (eq rmail-current-message msgnum) ;True if current
+1.16 (rms 24-Nov-93): (aref rmail-message-vector msgnum)
+1.16 (rms 24-Nov-93): (aref rmail-message-vector (1+ msgnum)))
+1.16 (rms 24-Nov-93): sort-lists))
+1.16 (rms 24-Nov-93): (if (zerop (% msgnum 10))
+1.16 (rms 24-Nov-93): (message "Finding sort keys...%d" msgnum))
+1.16 (rms 24-Nov-93): (setq msgnum (1+ msgnum))))
+1.16 (rms 24-Nov-93): (or reverse (setq sort-lists (nreverse sort-lists)))
+1.16 (rms 24-Nov-93): ;; Decide predicate: < or string-lessp
+1.16 (rms 24-Nov-93): (if (numberp (car (car sort-lists))) ;Is a key numeric?
+1.16 (rms 24-Nov-93): (setq predicate (function <))
+1.16 (rms 24-Nov-93): (setq predicate (function string-lessp)))
+1.16 (rms 24-Nov-93): (setq sort-lists
+1.16 (rms 24-Nov-93): (sort sort-lists
+1.16 (rms 24-Nov-93): (function
+1.16 (rms 24-Nov-93): (lambda (a b)
+1.16 (rms 24-Nov-93): (funcall predicate (car a) (car b))))))
+1.16 (rms 24-Nov-93): (if reverse (setq sort-lists (nreverse sort-lists)))
+1.16 (rms 24-Nov-93): ;; Now we enter critical region. So, keyboard quit is disabled.
+1.16 (rms 24-Nov-93): (message "Reordering messages...")
+1.16 (rms 24-Nov-93): (let ((inhibit-quit t) ;Inhibit quit
+1.16 (rms 24-Nov-93): (current-message nil)
+1.16 (rms 24-Nov-93): (msgnum 1)
+1.16 (rms 24-Nov-93): (msginfo nil))
+1.16 (rms 24-Nov-93): ;; There's little hope that we can easily undo after that.
+1.20 (kwzh 30-Mar-94): (buffer-disable-undo (current-buffer))
+1.16 (rms 24-Nov-93): (goto-char (rmail-msgbeg 1))
+1.16 (rms 24-Nov-93): ;; To force update of all markers.
+1.16 (rms 24-Nov-93): (insert-before-markers ?Z)
+1.16 (rms 24-Nov-93): (backward-char 1)
+1.16 (rms 24-Nov-93): ;; Now reorder messages.
+1.16 (rms 24-Nov-93): (while sort-lists
+1.16 (rms 24-Nov-93): (setq msginfo (car sort-lists))
+1.16 (rms 24-Nov-93): ;; Swap two messages.
+1.16 (rms 24-Nov-93): (insert-buffer-substring
+1.16 (rms 24-Nov-93): (current-buffer) (nth 2 msginfo) (nth 3 msginfo))
+1.16 (rms 24-Nov-93): (delete-region (nth 2 msginfo) (nth 3 msginfo))
+1.16 (rms 24-Nov-93): ;; Is current message?
+1.16 (rms 24-Nov-93): (if (nth 1 msginfo)
+1.16 (rms 24-Nov-93): (setq current-message msgnum))
+1.16 (rms 24-Nov-93): (setq sort-lists (cdr sort-lists))
+1.16 (rms 24-Nov-93): (if (zerop (% msgnum 10))
+1.16 (rms 24-Nov-93): (message "Reordering messages...%d" msgnum))
+1.16 (rms 24-Nov-93): (setq msgnum (1+ msgnum)))
+1.16 (rms 24-Nov-93): ;; Delete the garbage inserted before.
+1.16 (rms 24-Nov-93): (delete-char 1)
+1.16 (rms 24-Nov-93): (setq quit-flag nil)
+1.16 (rms 24-Nov-93): (buffer-enable-undo)
+1.16 (rms 24-Nov-93): (rmail-set-message-counters)
+1.19 (kwzh 30-Mar-94): (rmail-show-message current-message)
+1.26 (rms 10-Feb-97): (goto-char (+ point-offset (point-min)))
+1.19 (kwzh 30-Mar-94): (if (rmail-summary-exists)
+1.19 (kwzh 30-Mar-94): (rmail-select-summary
+1.19 (kwzh 30-Mar-94): (rmail-update-summary)))))))
+1.14 (rms 26-May-93):
+1.1 (rms 10-Sep-90): (defun rmail-fetch-field (msg field)
+1.14 (rms 26-May-93): "Return the value of the header FIELD of MSG.
+1.1 (rms 10-Sep-90): Arguments are MSG and FIELD."
+1.14 (rms 26-May-93): (save-restriction
+1.14 (rms 26-May-93): (widen)
+1.14 (rms 26-May-93): (let ((next (rmail-msgend msg)))
+1.1 (rms 10-Sep-90): (goto-char (rmail-msgbeg msg))
+1.1 (rms 10-Sep-90): (narrow-to-region (if (search-forward "\n*** EOOH ***\n" next t)
+1.1 (rms 10-Sep-90): (point)
+1.1 (rms 10-Sep-90): (forward-line 1)
+1.1 (rms 10-Sep-90): (point))
+1.1 (rms 10-Sep-90): (progn (search-forward "\n\n" nil t) (point)))
+1.1 (rms 10-Sep-90): (mail-fetch-field field))))
+1.1 (rms 10-Sep-90):
+1.14 (rms 26-May-93): (defun rmail-make-date-sortable (date)
+1.14 (rms 26-May-93): "Make DATE sortable using the function string-lessp."
+1.14 (rms 26-May-93): ;; Assume the default time zone is GMT.
+1.14 (rms 26-May-93): (timezone-make-date-sortable date "GMT" "GMT"))
+1.6 (jimb 16-Mar-92):
+1.6 (jimb 16-Mar-92): (provide 'rmailsort)
+1.7 (eric 30-May-92):
+1.38 (monnier 10-Apr-08): ;; arch-tag: 0d90896b-0c35-46ac-b240-38be5ada2360
+1.7 (eric 30-May-92): ;;; rmailsort.el ends here
diff --git a/lisp/mail/mbox-trunk-annotations/rmailsum.el.annotation b/lisp/mail/mbox-trunk-annotations/rmailsum.el.annotation
new file mode 100644
index 00000000000..afb5270c8f3
--- /dev/null
+++ b/lisp/mail/mbox-trunk-annotations/rmailsum.el.annotation
@@ -0,0 +1,1706 @@
+1.9 (eric 17-Mar-93): ;;; rmailsum.el --- make summary buffers for the mail reader
+1.8 (eric 17-Mar-93):
+1.136 (ttn 06-Aug-05): ;; Copyright (C) 1985, 1993, 1994, 1995, 1996, 2000, 2001, 2002, 2003,
+1.149 (miles 08-Jan-08): ;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+1.2 (eric 30-May-92):
+1.3 (eric 16-Jul-92): ;; Maintainer: FSF
+1.4 (eric 17-Jul-92): ;; Keywords: mail
+1.1 (jimb 30-Nov-90):
+1.1 (jimb 30-Nov-90): ;; This file is part of GNU Emacs.
+1.1 (jimb 30-Nov-90):
+1.151 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify
+1.1 (jimb 30-Nov-90): ;; it under the terms of the GNU General Public License as published by
+1.151 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or
+1.151 (gm 06-May-08): ;; (at your option) any later version.
+1.1 (jimb 30-Nov-90):
+1.1 (jimb 30-Nov-90): ;; GNU Emacs is distributed in the hope that it will be useful,
+1.1 (jimb 30-Nov-90): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+1.1 (jimb 30-Nov-90): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+1.1 (jimb 30-Nov-90): ;; GNU General Public License for more details.
+1.1 (jimb 30-Nov-90):
+1.1 (jimb 30-Nov-90): ;; You should have received a copy of the GNU General Public License
+1.151 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+1.1 (jimb 30-Nov-90):
+1.8 (eric 17-Mar-93): ;;; Commentary:
+1.8 (eric 17-Mar-93):
+1.6 (rms 09-Mar-93): ;; Extended by Bob Weiner of Motorola
+1.6 (rms 09-Mar-93): ;; Provided all commands from rmail-mode in rmail-summary-mode and made key
+1.6 (rms 09-Mar-93): ;; bindings in both modes wholly compatible.
+1.8 (eric 17-Mar-93):
+1.8 (eric 17-Mar-93): ;;; Code:
+1.6 (rms 09-Mar-93):
+1.138 (lektu 29-Aug-05): (defvar msgnum)
+1.138 (lektu 29-Aug-05):
+1.70 (rms 21-Aug-95): ;; For rmail-select-summary
+1.70 (rms 21-Aug-95): (require 'rmail)
+1.70 (rms 21-Aug-95):
+1.82 (rms 04-Apr-96): ;;;###autoload
+1.96 (rms 03-May-97): (defcustom rmail-summary-scroll-between-messages t
+1.96 (rms 03-May-97): "*Non-nil means Rmail summary scroll commands move between messages."
+1.96 (rms 03-May-97): :type 'boolean
+1.96 (rms 03-May-97): :group 'rmail-summary)
+1.82 (rms 04-Apr-96):
+1.91 (rms 04-Oct-96): ;;;###autoload
+1.96 (rms 03-May-97): (defcustom rmail-summary-line-count-flag t
+1.127 (jpw 06-Feb-03): "*Non-nil means Rmail summary should show the number of lines in each message."
+1.96 (rms 03-May-97): :type 'boolean
+1.96 (rms 03-May-97): :group 'rmail-summary)
+1.91 (rms 04-Oct-96):
+1.55 (rms 07-Oct-94): (defvar rmail-summary-font-lock-keywords
+1.122 (eliz 21-Oct-01): '(("^.....D.*" . font-lock-string-face) ; Deleted.
+1.122 (eliz 21-Oct-01): ("^.....-.*" . font-lock-type-face) ; Unread.
+1.55 (rms 07-Oct-94): ;; Neither of the below will be highlighted if either of the above are:
+1.122 (eliz 21-Oct-01): ("^.....[^D-] \\(......\\)" 1 font-lock-keyword-face) ; Date.
+1.130 (rms 30-Sep-03): ("{ \\([^\n}]+\\) }" 1 font-lock-comment-face)) ; Labels.
+1.55 (rms 07-Oct-94): "Additional expressions to highlight in Rmail Summary mode.")
+1.55 (rms 07-Oct-94):
+1.134 (rms 03-Jul-05): (defvar rmail-summary-redo
+1.134 (rms 03-Jul-05): "(FUNCTION . ARGS) to regenerate this Rmail summary buffer.")
+1.134 (rms 03-Jul-05):
+1.134 (rms 03-Jul-05): (defvar rmail-summary-overlay nil)
+1.134 (rms 03-Jul-05): (put 'rmail-summary-overlay 'permanent-local t)
+1.134 (rms 03-Jul-05):
+1.134 (rms 03-Jul-05): (defvar rmail-summary-mode-map nil)
+1.134 (rms 03-Jul-05):
+1.6 (rms 09-Mar-93): ;; Entry points for making a summary buffer.
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): ;; Regenerate the contents of the summary
+1.6 (rms 09-Mar-93): ;; using the same selection criterion as last time.
+1.6 (rms 09-Mar-93): ;; M-x revert-buffer in a summary buffer calls this function.
+1.6 (rms 09-Mar-93): (defun rmail-update-summary (&rest ignore)
+1.6 (rms 09-Mar-93): (apply (car rmail-summary-redo) (cdr rmail-summary-redo)))
+1.1 (jimb 30-Nov-90):
+1.90 (rms 27-Sep-96): ;;;###autoload
+1.1 (jimb 30-Nov-90): (defun rmail-summary ()
+1.1 (jimb 30-Nov-90): "Display a summary of all messages, one line per message."
+1.1 (jimb 30-Nov-90): (interactive)
+1.6 (rms 09-Mar-93): (rmail-new-summary "All" '(rmail-summary) nil))
+1.1 (jimb 30-Nov-90):
+1.90 (rms 27-Sep-96): ;;;###autoload
+1.1 (jimb 30-Nov-90): (defun rmail-summary-by-labels (labels)
+1.1 (jimb 30-Nov-90): "Display a summary of all messages with one or more LABELS.
+1.1 (jimb 30-Nov-90): LABELS should be a string containing the desired labels, separated by commas."
+1.1 (jimb 30-Nov-90): (interactive "sLabels to summarize by: ")
+1.1 (jimb 30-Nov-90): (if (string= labels "")
+1.1 (jimb 30-Nov-90): (setq labels (or rmail-last-multi-labels
+1.1 (jimb 30-Nov-90): (error "No label specified"))))
+1.1 (jimb 30-Nov-90): (setq rmail-last-multi-labels labels)
+1.1 (jimb 30-Nov-90): (rmail-new-summary (concat "labels " labels)
+1.6 (rms 09-Mar-93): (list 'rmail-summary-by-labels labels)
+1.1 (jimb 30-Nov-90): 'rmail-message-labels-p
+1.1 (jimb 30-Nov-90): (concat ", \\(" (mail-comma-list-regexp labels) "\\),")))
+1.1 (jimb 30-Nov-90):
+1.90 (rms 27-Sep-96): ;;;###autoload
+1.1 (jimb 30-Nov-90): (defun rmail-summary-by-recipients (recipients &optional primary-only)
+1.1 (jimb 30-Nov-90): "Display a summary of all messages with the given RECIPIENTS.
+1.1 (jimb 30-Nov-90): Normally checks the To, From and Cc fields of headers;
+1.1 (jimb 30-Nov-90): but if PRIMARY-ONLY is non-nil (prefix arg given),
+1.1 (jimb 30-Nov-90): only look in the To and From fields.
+1.6 (rms 09-Mar-93): RECIPIENTS is a string of regexps separated by commas."
+1.1 (jimb 30-Nov-90): (interactive "sRecipients to summarize by: \nP")
+1.1 (jimb 30-Nov-90): (rmail-new-summary
+1.1 (jimb 30-Nov-90): (concat "recipients " recipients)
+1.6 (rms 09-Mar-93): (list 'rmail-summary-by-recipients recipients primary-only)
+1.1 (jimb 30-Nov-90): 'rmail-message-recipients-p
+1.1 (jimb 30-Nov-90): (mail-comma-list-regexp recipients) primary-only))
+1.1 (jimb 30-Nov-90):
+1.90 (rms 27-Sep-96): ;;;###autoload
+1.1 (jimb 30-Nov-90): (defun rmail-summary-by-regexp (regexp)
+1.1 (jimb 30-Nov-90): "Display a summary of all messages according to regexp REGEXP.
+1.1 (jimb 30-Nov-90): If the regular expression is found in the header of the message
+1.1 (jimb 30-Nov-90): \(including in the date and other lines, as well as the subject line),
+1.1 (jimb 30-Nov-90): Emacs will list the header line in the RMAIL-summary."
+1.1 (jimb 30-Nov-90): (interactive "sRegexp to summarize by: ")
+1.1 (jimb 30-Nov-90): (if (string= regexp "")
+1.1 (jimb 30-Nov-90): (setq regexp (or rmail-last-regexp
+1.120 (pj 15-Jul-01): (error "No regexp specified"))))
+1.1 (jimb 30-Nov-90): (setq rmail-last-regexp regexp)
+1.1 (jimb 30-Nov-90): (rmail-new-summary (concat "regexp " regexp)
+1.6 (rms 09-Mar-93): (list 'rmail-summary-by-regexp regexp)
+1.1 (jimb 30-Nov-90): 'rmail-message-regexp-p
+1.1 (jimb 30-Nov-90): regexp))
+1.1 (jimb 30-Nov-90):
+1.6 (rms 09-Mar-93): ;; rmail-summary-by-topic
+1.6 (rms 09-Mar-93): ;; 1989 R.A. Schnitzler
+1.6 (rms 09-Mar-93):
+1.90 (rms 27-Sep-96): ;;;###autoload
+1.6 (rms 09-Mar-93): (defun rmail-summary-by-topic (subject &optional whole-message)
+1.6 (rms 09-Mar-93): "Display a summary of all messages with the given SUBJECT.
+1.6 (rms 09-Mar-93): Normally checks the Subject field of headers;
+1.126 (lektu 04-Feb-03): but if WHOLE-MESSAGE is non-nil (prefix arg given),
+1.6 (rms 09-Mar-93): look in the whole message.
+1.6 (rms 09-Mar-93): SUBJECT is a string of regexps separated by commas."
+1.140 (as 08-Jan-06): (interactive
+1.140 (as 08-Jan-06): (let* ((subject (with-current-buffer rmail-buffer
+1.140 (as 08-Jan-06): (rmail-current-subject)))
+1.140 (as 08-Jan-06): (subject-re (with-current-buffer rmail-buffer
+1.140 (as 08-Jan-06): (rmail-current-subject-regexp)))
+1.140 (as 08-Jan-06): (prompt (concat "Topics to summarize by (regexp"
+1.140 (as 08-Jan-06): (if subject ", default current subject" "")
+1.140 (as 08-Jan-06): "): ")))
+1.140 (as 08-Jan-06): (list (read-string prompt nil nil subject) current-prefix-arg)))
+1.6 (rms 09-Mar-93): (rmail-new-summary
+1.6 (rms 09-Mar-93): (concat "about " subject)
+1.6 (rms 09-Mar-93): (list 'rmail-summary-by-topic subject whole-message)
+1.6 (rms 09-Mar-93): 'rmail-message-subject-p
+1.6 (rms 09-Mar-93): (mail-comma-list-regexp subject) whole-message))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-message-subject-p (msg subject &optional whole-message)
+1.6 (rms 09-Mar-93): (save-restriction
+1.6 (rms 09-Mar-93): (goto-char (rmail-msgbeg msg))
+1.105 (rms 01-Nov-98): (search-forward "\n*** EOOH ***\n" (rmail-msgend msg) 'move)
+1.6 (rms 09-Mar-93): (narrow-to-region
+1.6 (rms 09-Mar-93): (point)
+1.12 (rms 31-May-93): (progn (search-forward (if whole-message "\^_" "\n\n")) (point)))
+1.6 (rms 09-Mar-93): (goto-char (point-min))
+1.6 (rms 09-Mar-93): (if whole-message (re-search-forward subject nil t)
+1.119 (gerd 31-May-01): (string-match subject (let ((subj (mail-fetch-field "Subject")))
+1.119 (gerd 31-May-01): (if subj
+1.119 (gerd 31-May-01): (funcall rmail-summary-line-decoder subj)
+1.119 (gerd 31-May-01): ""))))))
+1.13 (rms 03-Jun-93):
+1.90 (rms 27-Sep-96): ;;;###autoload
+1.13 (rms 03-Jun-93): (defun rmail-summary-by-senders (senders)
+1.13 (rms 03-Jun-93): "Display a summary of all messages with the given SENDERS.
+1.13 (rms 03-Jun-93): SENDERS is a string of names separated by commas."
+1.13 (rms 03-Jun-93): (interactive "sSenders to summarize by: ")
+1.13 (rms 03-Jun-93): (rmail-new-summary
+1.13 (rms 03-Jun-93): (concat "senders " senders)
+1.24 (rms 08-Jan-94): (list 'rmail-summary-by-senders senders)
+1.13 (rms 03-Jun-93): 'rmail-message-senders-p
+1.13 (rms 03-Jun-93): (mail-comma-list-regexp senders)))
+1.13 (rms 03-Jun-93):
+1.13 (rms 03-Jun-93): (defun rmail-message-senders-p (msg senders)
+1.13 (rms 03-Jun-93): (save-restriction
+1.13 (rms 03-Jun-93): (goto-char (rmail-msgbeg msg))
+1.13 (rms 03-Jun-93): (search-forward "\n*** EOOH ***\n")
+1.13 (rms 03-Jun-93): (narrow-to-region (point) (progn (search-forward "\n\n") (point)))
+1.13 (rms 03-Jun-93): (string-match senders (or (mail-fetch-field "From") ""))))
+1.1 (jimb 30-Nov-90):
+1.6 (rms 09-Mar-93): ;; General making of a summary buffer.
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defvar rmail-summary-symbol-number 0)
+1.6 (rms 09-Mar-93):
+1.134 (rms 03-Jul-05): (defvar rmail-new-summary-line-count)
+1.134 (rms 03-Jul-05):
+1.6 (rms 09-Mar-93): (defun rmail-new-summary (description redo-form function &rest args)
+1.1 (jimb 30-Nov-90): "Create a summary of selected messages.
+1.1 (jimb 30-Nov-90): DESCRIPTION makes part of the mode line of the summary buffer.
+1.1 (jimb 30-Nov-90): For each message, FUNCTION is applied to the message number and ARGS...
+1.1 (jimb 30-Nov-90): and if the result is non-nil, that message is included.
+1.1 (jimb 30-Nov-90): nil for FUNCTION means all messages."
+1.1 (jimb 30-Nov-90): (message "Computing summary lines...")
+1.6 (rms 09-Mar-93): (let (sumbuf mesg was-in-summary)
+1.6 (rms 09-Mar-93): (save-excursion
+1.6 (rms 09-Mar-93): ;; Go to the Rmail buffer.
+1.6 (rms 09-Mar-93): (if (eq major-mode 'rmail-summary-mode)
+1.118 (gerd 08-May-01): (setq was-in-summary t))
+1.118 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.6 (rms 09-Mar-93): ;; Find its summary buffer, or make one.
+1.11 (rms 28-May-93): (setq sumbuf
+1.11 (rms 28-May-93): (if (and rmail-summary-buffer
+1.11 (rms 28-May-93): (buffer-name rmail-summary-buffer))
+1.11 (rms 28-May-93): rmail-summary-buffer
+1.11 (rms 28-May-93): (generate-new-buffer (concat (buffer-name) "-summary"))))
+1.6 (rms 09-Mar-93): (setq mesg rmail-current-message)
+1.6 (rms 09-Mar-93): ;; Filter the messages; make or get their summary lines.
+1.6 (rms 09-Mar-93): (let ((summary-msgs ())
+1.134 (rms 03-Jul-05): (rmail-new-summary-line-count 0))
+1.6 (rms 09-Mar-93): (let ((msgnum 1)
+1.36 (kwzh 09-Apr-94): (buffer-read-only nil)
+1.36 (kwzh 09-Apr-94): (old-min (point-min-marker))
+1.36 (kwzh 09-Apr-94): (old-max (point-max-marker)))
+1.36 (kwzh 09-Apr-94): ;; Can't use save-restriction here; that doesn't work if we
+1.36 (kwzh 09-Apr-94): ;; plan to modify text outside the original restriction.
+1.36 (kwzh 09-Apr-94): (save-excursion
+1.36 (kwzh 09-Apr-94): (widen)
+1.36 (kwzh 09-Apr-94): (goto-char (point-min))
+1.36 (kwzh 09-Apr-94): (while (>= rmail-total-messages msgnum)
+1.36 (kwzh 09-Apr-94): (if (or (null function)
+1.36 (kwzh 09-Apr-94): (apply function (cons msgnum args)))
+1.36 (kwzh 09-Apr-94): (setq summary-msgs
+1.36 (kwzh 09-Apr-94): (cons (cons msgnum (rmail-make-summary-line msgnum))
+1.36 (kwzh 09-Apr-94): summary-msgs)))
+1.36 (kwzh 09-Apr-94): (setq msgnum (1+ msgnum)))
+1.36 (kwzh 09-Apr-94): (setq summary-msgs (nreverse summary-msgs)))
+1.36 (kwzh 09-Apr-94): (narrow-to-region old-min old-max))
+1.11 (rms 28-May-93): ;; Temporarily, while summary buffer is unfinished,
+1.11 (rms 28-May-93): ;; we "don't have" a summary.
+1.11 (rms 28-May-93): (setq rmail-summary-buffer nil)
+1.118 (gerd 08-May-01): (if rmail-enable-mime
+1.118 (gerd 08-May-01): (with-current-buffer rmail-view-buffer
+1.118 (gerd 08-May-01): (setq rmail-summary-buffer nil)))
+1.11 (rms 28-May-93): (save-excursion
+1.11 (rms 28-May-93): (let ((rbuf (current-buffer))
+1.94 (handa 26-Feb-97): (vbuf rmail-view-buffer)
+1.11 (rms 28-May-93): (total rmail-total-messages))
+1.11 (rms 28-May-93): (set-buffer sumbuf)
+1.11 (rms 28-May-93): ;; Set up the summary buffer's contents.
+1.11 (rms 28-May-93): (let ((buffer-read-only nil))
+1.11 (rms 28-May-93): (erase-buffer)
+1.11 (rms 28-May-93): (while summary-msgs
+1.11 (rms 28-May-93): (princ (cdr (car summary-msgs)) sumbuf)
+1.11 (rms 28-May-93): (setq summary-msgs (cdr summary-msgs)))
+1.11 (rms 28-May-93): (goto-char (point-min)))
+1.11 (rms 28-May-93): ;; Set up the rest of its state and local variables.
+1.11 (rms 28-May-93): (setq buffer-read-only t)
+1.11 (rms 28-May-93): (rmail-summary-mode)
+1.11 (rms 28-May-93): (make-local-variable 'minor-mode-alist)
+1.83 (rms 12-Jun-96): (setq minor-mode-alist (list (list t (concat ": " description))))
+1.11 (rms 28-May-93): (setq rmail-buffer rbuf
+1.94 (handa 26-Feb-97): rmail-view-buffer vbuf
+1.11 (rms 28-May-93): rmail-summary-redo redo-form
+1.11 (rms 28-May-93): rmail-total-messages total))))
+1.11 (rms 28-May-93): (setq rmail-summary-buffer sumbuf))
+1.6 (rms 09-Mar-93): ;; Now display the summary buffer and go to the right place in it.
+1.6 (rms 09-Mar-93): (or was-in-summary
+1.70 (rms 21-Aug-95): (progn
+1.70 (rms 21-Aug-95): (if (and (one-window-p)
+1.70 (rms 21-Aug-95): pop-up-windows (not pop-up-frames))
+1.70 (rms 21-Aug-95): ;; If there is just one window, put the summary on the top.
+1.70 (rms 21-Aug-95): (progn
+1.70 (rms 21-Aug-95): (split-window (selected-window) rmail-summary-window-size)
+1.70 (rms 21-Aug-95): (select-window (next-window (frame-first-window)))
+1.70 (rms 21-Aug-95): (pop-to-buffer sumbuf)
+1.70 (rms 21-Aug-95): ;; If pop-to-buffer did not use that window, delete that
+1.70 (rms 21-Aug-95): ;; window. (This can happen if it uses another frame.)
+1.70 (rms 21-Aug-95): (if (not (eq sumbuf (window-buffer (frame-first-window))))
+1.70 (rms 21-Aug-95): (delete-other-windows)))
+1.70 (rms 21-Aug-95): (pop-to-buffer sumbuf))
+1.70 (rms 21-Aug-95): (set-buffer rmail-buffer)
+1.70 (rms 21-Aug-95): ;; This is how rmail makes the summary buffer reappear.
+1.70 (rms 21-Aug-95): ;; We do this here to make the window the proper size.
+1.70 (rms 21-Aug-95): (rmail-select-summary nil)
+1.70 (rms 21-Aug-95): (set-buffer rmail-summary-buffer)))
+1.6 (rms 09-Mar-93): (rmail-summary-goto-msg mesg t t)
+1.69 (rms 17-Aug-95): (rmail-summary-construct-io-menu)
+1.6 (rms 09-Mar-93): (message "Computing summary lines...done")))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): ;; Low levels of generating a summary.
+1.1 (jimb 30-Nov-90):
+1.1 (jimb 30-Nov-90): (defun rmail-make-summary-line (msg)
+1.1 (jimb 30-Nov-90): (let ((line (or (aref rmail-summary-vector (1- msg))
+1.1 (jimb 30-Nov-90): (progn
+1.134 (rms 03-Jul-05): (setq rmail-new-summary-line-count
+1.134 (rms 03-Jul-05): (1+ rmail-new-summary-line-count))
+1.134 (rms 03-Jul-05): (if (zerop (% rmail-new-summary-line-count 10))
+1.1 (jimb 30-Nov-90): (message "Computing summary lines...%d"
+1.134 (rms 03-Jul-05): rmail-new-summary-line-count))
+1.147 (miles 03-Aug-07): (rmail-make-summary-line-1 msg))))
+1.147 (miles 03-Aug-07): delpos)
+1.1 (jimb 30-Nov-90): ;; Fix up the part of the summary that says "deleted" or "unseen".
+1.147 (miles 03-Aug-07): (string-match "[0-9]+" line)
+1.147 (miles 03-Aug-07): (aset line (match-end 0)
+1.147 (miles 03-Aug-07): (if (rmail-message-deleted-p msg) ?D
+1.1 (jimb 30-Nov-90): (if (= ?0 (char-after (+ 3 (rmail-msgbeg msg))))
+1.147 (miles 03-Aug-07): ?- ?\s)))
+1.1 (jimb 30-Nov-90): line))
+1.1 (jimb 30-Nov-90):
+1.94 (handa 26-Feb-97): ;;;###autoload
+1.96 (rms 03-May-97): (defcustom rmail-summary-line-decoder (function identity)
+1.94 (handa 26-Feb-97): "*Function to decode summary-line.
+1.94 (handa 26-Feb-97):
+1.96 (rms 03-May-97): By default, `identity' is set."
+1.96 (rms 03-May-97): :type 'function
+1.96 (rms 03-May-97): :group 'rmail-summary)
+1.94 (handa 26-Feb-97):
+1.1 (jimb 30-Nov-90): (defun rmail-make-summary-line-1 (msg)
+1.1 (jimb 30-Nov-90): (goto-char (rmail-msgbeg msg))
+1.1 (jimb 30-Nov-90): (let* ((lim (save-excursion (forward-line 2) (point)))
+1.1 (jimb 30-Nov-90): pos
+1.1 (jimb 30-Nov-90): (labels
+1.1 (jimb 30-Nov-90): (progn
+1.1 (jimb 30-Nov-90): (forward-char 3)
+1.1 (jimb 30-Nov-90): (concat
+1.1 (jimb 30-Nov-90): ; (if (save-excursion (re-search-forward ",answered," lim t))
+1.1 (jimb 30-Nov-90): ; "*" "")
+1.1 (jimb 30-Nov-90): ; (if (save-excursion (re-search-forward ",filed," lim t))
+1.1 (jimb 30-Nov-90): ; "!" "")
+1.1 (jimb 30-Nov-90): (if (progn (search-forward ",,") (eolp))
+1.1 (jimb 30-Nov-90): ""
+1.1 (jimb 30-Nov-90): (concat "{"
+1.1 (jimb 30-Nov-90): (buffer-substring (point)
+1.130 (rms 30-Sep-03): (progn (end-of-line)
+1.130 (rms 30-Sep-03): (backward-char)
+1.130 (rms 30-Sep-03): (if (looking-at ",")
+1.130 (rms 30-Sep-03): (point)
+1.130 (rms 30-Sep-03): (1+ (point)))))
+1.130 (rms 30-Sep-03): " } ")))))
+1.1 (jimb 30-Nov-90): (line
+1.1 (jimb 30-Nov-90): (progn
+1.1 (jimb 30-Nov-90): (forward-line 1)
+1.1 (jimb 30-Nov-90): (if (looking-at "Summary-line: ")
+1.1 (jimb 30-Nov-90): (progn
+1.1 (jimb 30-Nov-90): (goto-char (match-end 0))
+1.141 (rms 26-Jan-06): (buffer-substring (point)
+1.141 (rms 26-Jan-06): (progn (forward-line 1) (point))))))))
+1.1 (jimb 30-Nov-90): ;; Obsolete status lines lacking a # should be flushed.
+1.1 (jimb 30-Nov-90): (and line
+1.1 (jimb 30-Nov-90): (not (string-match "#" line))
+1.1 (jimb 30-Nov-90): (progn
+1.1 (jimb 30-Nov-90): (delete-region (point)
+1.1 (jimb 30-Nov-90): (progn (forward-line -1) (point)))
+1.1 (jimb 30-Nov-90): (setq line nil)))
+1.1 (jimb 30-Nov-90): ;; If we didn't get a valid status line from the message,
+1.1 (jimb 30-Nov-90): ;; make a new one and put it in the message.
+1.1 (jimb 30-Nov-90): (or line
+1.1 (jimb 30-Nov-90): (let* ((case-fold-search t)
+1.1 (jimb 30-Nov-90): (next (rmail-msgend msg))
+1.1 (jimb 30-Nov-90): (beg (if (progn (goto-char (rmail-msgbeg msg))
+1.1 (jimb 30-Nov-90): (search-forward "\n*** EOOH ***\n" next t))
+1.1 (jimb 30-Nov-90): (point)
+1.1 (jimb 30-Nov-90): (forward-line 1)
+1.1 (jimb 30-Nov-90): (point)))
+1.1 (jimb 30-Nov-90): (end (progn (search-forward "\n\n" nil t) (point))))
+1.1 (jimb 30-Nov-90): (save-restriction
+1.1 (jimb 30-Nov-90): (narrow-to-region beg end)
+1.1 (jimb 30-Nov-90): (goto-char beg)
+1.1 (jimb 30-Nov-90): (setq line (rmail-make-basic-summary-line)))
+1.1 (jimb 30-Nov-90): (goto-char (rmail-msgbeg msg))
+1.1 (jimb 30-Nov-90): (forward-line 2)
+1.1 (jimb 30-Nov-90): (insert "Summary-line: " line)))
+1.1 (jimb 30-Nov-90): (setq pos (string-match "#" line))
+1.1 (jimb 30-Nov-90): (aset rmail-summary-vector (1- msg)
+1.94 (handa 26-Feb-97): (funcall rmail-summary-line-decoder
+1.121 (gerd 05-Oct-01): (concat (format "%5d " msg)
+1.94 (handa 26-Feb-97): (substring line 0 pos)
+1.94 (handa 26-Feb-97): labels
+1.94 (handa 26-Feb-97): (substring line (1+ pos)))))
+1.94 (handa 26-Feb-97): ))
+1.1 (jimb 30-Nov-90):
+1.112 (gerd 03-Apr-00): ;;;###autoload
+1.112 (gerd 03-Apr-00): (defcustom rmail-user-mail-address-regexp nil
+1.112 (gerd 03-Apr-00): "*Regexp matching user mail addresses.
+1.112 (gerd 03-Apr-00): If non-nil, this variable is used to identify the correspondent
+1.112 (gerd 03-Apr-00): when receiving new mail. If it matches the address of the sender,
+1.112 (gerd 03-Apr-00): the recipient is taken as correspondent of a mail.
+1.112 (gerd 03-Apr-00): If nil \(default value\), your `user-login-name' and `user-mail-address'
+1.112 (gerd 03-Apr-00): are used to exclude yourself as correspondent.
+1.112 (gerd 03-Apr-00):
+1.112 (gerd 03-Apr-00): Usually you don't have to set this variable, except if you collect mails
+1.112 (gerd 03-Apr-00): sent by you under different user names.
+1.125 (lektu 02-Jul-02): Then it should be a regexp matching your mail addresses.
+1.112 (gerd 03-Apr-00):
+1.112 (gerd 03-Apr-00): Setting this variable has an effect only before reading a mail."
+1.112 (gerd 03-Apr-00): :type '(choice (const :tag "None" nil) regexp)
+1.112 (gerd 03-Apr-00): :group 'rmail-retrieve
+1.112 (gerd 03-Apr-00): :version "21.1")
+1.112 (gerd 03-Apr-00):
+1.1 (jimb 30-Nov-90): (defun rmail-make-basic-summary-line ()
+1.1 (jimb 30-Nov-90): (goto-char (point-min))
+1.1 (jimb 30-Nov-90): (concat (save-excursion
+1.1 (jimb 30-Nov-90): (if (not (re-search-forward "^Date:" nil t))
+1.1 (jimb 30-Nov-90): " "
+1.1 (jimb 30-Nov-90): (cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)"
+1.1 (jimb 30-Nov-90): (save-excursion (end-of-line) (point)) t)
+1.1 (jimb 30-Nov-90): (format "%2d-%3s"
+1.132 (lektu 16-May-05): (string-to-number (buffer-substring
+1.132 (lektu 16-May-05): (match-beginning 2)
+1.132 (lektu 16-May-05): (match-end 2)))
+1.1 (jimb 30-Nov-90): (buffer-substring
+1.1 (jimb 30-Nov-90): (match-beginning 4) (match-end 4))))
+1.1 (jimb 30-Nov-90): ((re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)"
+1.1 (jimb 30-Nov-90): (save-excursion (end-of-line) (point)) t)
+1.1 (jimb 30-Nov-90): (format "%2d-%3s"
+1.132 (lektu 16-May-05): (string-to-number (buffer-substring
+1.132 (lektu 16-May-05): (match-beginning 4)
+1.132 (lektu 16-May-05): (match-end 4)))
+1.1 (jimb 30-Nov-90): (buffer-substring
+1.1 (jimb 30-Nov-90): (match-beginning 2) (match-end 2))))
+1.86 (miles 02-Jul-96): ((re-search-forward "\\(19\\|20\\)\\([0-9][0-9]\\)-\\([01][0-9]\\)-\\([0-3][0-9]\\)"
+1.86 (miles 02-Jul-96): (save-excursion (end-of-line) (point)) t)
+1.86 (miles 02-Jul-96): (format "%2s%2s%2s"
+1.86 (miles 02-Jul-96): (buffer-substring
+1.86 (miles 02-Jul-96): (match-beginning 2) (match-end 2))
+1.86 (miles 02-Jul-96): (buffer-substring
+1.86 (miles 02-Jul-96): (match-beginning 3) (match-end 3))
+1.86 (miles 02-Jul-96): (buffer-substring
+1.86 (miles 02-Jul-96): (match-beginning 4) (match-end 4))))
+1.1 (jimb 30-Nov-90): (t "??????"))))
+1.1 (jimb 30-Nov-90): " "
+1.1 (jimb 30-Nov-90): (save-excursion
+1.128 (rms 09-Apr-03): (let* ((from (and (re-search-forward "^From:[ \t]*" nil t)
+1.128 (rms 09-Apr-03): (mail-strip-quoted-names
+1.128 (rms 09-Apr-03): (buffer-substring
+1.128 (rms 09-Apr-03): (1- (point))
+1.128 (rms 09-Apr-03): ;; Get all the lines of the From field
+1.128 (rms 09-Apr-03): ;; so that we get a whole comment if there is one,
+1.128 (rms 09-Apr-03): ;; so that mail-strip-quoted-names can discard it.
+1.128 (rms 09-Apr-03): (let ((opoint (point)))
+1.128 (rms 09-Apr-03): (while (progn (forward-line 1)
+1.128 (rms 09-Apr-03): (looking-at "[ \t]")))
+1.128 (rms 09-Apr-03): ;; Back up over newline, then trailing spaces or tabs
+1.128 (rms 09-Apr-03): (forward-char -1)
+1.128 (rms 09-Apr-03): (skip-chars-backward " \t")
+1.128 (rms 09-Apr-03): (point))))))
+1.128 (rms 09-Apr-03): len mch lo)
+1.128 (rms 09-Apr-03): (if (or (null from)
+1.128 (rms 09-Apr-03): (string-match
+1.128 (rms 09-Apr-03): (or rmail-user-mail-address-regexp
+1.128 (rms 09-Apr-03): (concat "^\\("
+1.128 (rms 09-Apr-03): (regexp-quote (user-login-name))
+1.128 (rms 09-Apr-03): "\\($\\|@\\)\\|"
+1.128 (rms 09-Apr-03): (regexp-quote
+1.128 (rms 09-Apr-03): ;; Don't lose if run from init file
+1.128 (rms 09-Apr-03): ;; where user-mail-address is not
+1.128 (rms 09-Apr-03): ;; set yet.
+1.128 (rms 09-Apr-03): (or user-mail-address
+1.128 (rms 09-Apr-03): (concat (user-login-name) "@"
+1.128 (rms 09-Apr-03): (or mail-host-address
+1.128 (rms 09-Apr-03): (system-name)))))
+1.128 (rms 09-Apr-03): "\\>\\)"))
+1.128 (rms 09-Apr-03): from))
+1.128 (rms 09-Apr-03): ;; No From field, or it's this user.
+1.128 (rms 09-Apr-03): (save-excursion
+1.128 (rms 09-Apr-03): (goto-char (point-min))
+1.128 (rms 09-Apr-03): (if (not (re-search-forward "^To:[ \t]*" nil t))
+1.128 (rms 09-Apr-03): nil
+1.128 (rms 09-Apr-03): (setq from
+1.128 (rms 09-Apr-03): (concat "to: "
+1.128 (rms 09-Apr-03): (mail-strip-quoted-names
+1.128 (rms 09-Apr-03): (buffer-substring
+1.128 (rms 09-Apr-03): (point)
+1.128 (rms 09-Apr-03): (progn (end-of-line)
+1.128 (rms 09-Apr-03): (skip-chars-backward " \t")
+1.128 (rms 09-Apr-03): (point)))))))))
+1.128 (rms 09-Apr-03): (if (null from)
+1.128 (rms 09-Apr-03): " "
+1.1 (jimb 30-Nov-90): (setq len (length from))
+1.1 (jimb 30-Nov-90): (setq mch (string-match "[@%]" from))
+1.1 (jimb 30-Nov-90): (format "%25s"
+1.1 (jimb 30-Nov-90): (if (or (not mch) (<= len 25))
+1.1 (jimb 30-Nov-90): (substring from (max 0 (- len 25)))
+1.1 (jimb 30-Nov-90): (substring from
+1.40 (rms 06-May-94): (setq lo (cond ((< (- mch 14) 0) 0)
+1.40 (rms 06-May-94): ((< len (+ mch 11))
+1.1 (jimb 30-Nov-90): (- len 25))
+1.40 (rms 06-May-94): (t (- mch 14))))
+1.1 (jimb 30-Nov-90): (min len (+ lo 25))))))))
+1.92 (rms 04-Oct-96): (if rmail-summary-line-count-flag
+1.91 (rms 04-Oct-96): (save-excursion
+1.91 (rms 04-Oct-96): (save-restriction
+1.91 (rms 04-Oct-96): (widen)
+1.91 (rms 04-Oct-96): (let ((beg (rmail-msgbeg msgnum))
+1.91 (rms 04-Oct-96): (end (rmail-msgend msgnum))
+1.91 (rms 04-Oct-96): lines)
+1.91 (rms 04-Oct-96): (save-excursion
+1.91 (rms 04-Oct-96): (goto-char beg)
+1.91 (rms 04-Oct-96): ;; Count only lines in the reformatted header,
+1.91 (rms 04-Oct-96): ;; if we have reformatted it.
+1.91 (rms 04-Oct-96): (search-forward "\n*** EOOH ***\n" end t)
+1.91 (rms 04-Oct-96): (setq lines (count-lines (point) end)))
+1.91 (rms 04-Oct-96): (format (cond
+1.91 (rms 04-Oct-96): ((<= lines 9) " [%d]")
+1.91 (rms 04-Oct-96): ((<= lines 99) " [%d]")
+1.91 (rms 04-Oct-96): ((<= lines 999) " [%3d]")
+1.91 (rms 04-Oct-96): (t "[%d]"))
+1.91 (rms 04-Oct-96): lines))))
+1.91 (rms 04-Oct-96): " ")
+1.79 (erik 26-Feb-96): " #" ;The # is part of the format.
+1.1 (jimb 30-Nov-90): (if (re-search-forward "^Subject:" nil t)
+1.1 (jimb 30-Nov-90): (progn (skip-chars-forward " \t")
+1.1 (jimb 30-Nov-90): (buffer-substring (point)
+1.1 (jimb 30-Nov-90): (progn (end-of-line)
+1.1 (jimb 30-Nov-90): (point))))
+1.1 (jimb 30-Nov-90): (re-search-forward "[\n][\n]+" nil t)
+1.1 (jimb 30-Nov-90): (buffer-substring (point) (progn (end-of-line) (point))))
+1.1 (jimb 30-Nov-90): "\n"))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): ;; Simple motion in a summary buffer.
+1.1 (jimb 30-Nov-90):
+1.1 (jimb 30-Nov-90): (defun rmail-summary-next-all (&optional number)
+1.1 (jimb 30-Nov-90): (interactive "p")
+1.7 (rms 13-Mar-93): (forward-line (if number number 1))
+1.59 (rms 15-Oct-94): ;; It doesn't look nice to move forward past the last message line.
+1.59 (rms 15-Oct-94): (and (eobp) (> number 0)
+1.59 (rms 15-Oct-94): (forward-line -1))
+1.7 (rms 13-Mar-93): (display-buffer rmail-buffer))
+1.1 (jimb 30-Nov-90):
+1.1 (jimb 30-Nov-90): (defun rmail-summary-previous-all (&optional number)
+1.1 (jimb 30-Nov-90): (interactive "p")
+1.7 (rms 13-Mar-93): (forward-line (- (if number number 1)))
+1.59 (rms 15-Oct-94): ;; It doesn't look nice to move forward past the last message line.
+1.59 (rms 15-Oct-94): (and (eobp) (< number 0)
+1.59 (rms 15-Oct-94): (forward-line -1))
+1.7 (rms 13-Mar-93): (display-buffer rmail-buffer))
+1.1 (jimb 30-Nov-90):
+1.1 (jimb 30-Nov-90): (defun rmail-summary-next-msg (&optional number)
+1.6 (rms 09-Mar-93): "Display next non-deleted msg from rmail file.
+1.6 (rms 09-Mar-93): With optional prefix argument NUMBER, moves forward this number of non-deleted
+1.6 (rms 09-Mar-93): messages, or backward if NUMBER is negative."
+1.1 (jimb 30-Nov-90): (interactive "p")
+1.1 (jimb 30-Nov-90): (forward-line 0)
+1.15 (rms 04-Jun-93): (and (> number 0) (end-of-line))
+1.1 (jimb 30-Nov-90): (let ((count (if (< number 0) (- number) number))
+1.1 (jimb 30-Nov-90): (search (if (> number 0) 're-search-forward 're-search-backward))
+1.6 (rms 09-Mar-93): (non-del-msg-found nil))
+1.6 (rms 09-Mar-93): (while (and (> count 0) (setq non-del-msg-found
+1.143 (eliz 11-Mar-06): (or (funcall search "^.....[^D]" nil t)
+1.6 (rms 09-Mar-93): non-del-msg-found)))
+1.7 (rms 13-Mar-93): (setq count (1- count))))
+1.15 (rms 04-Jun-93): (beginning-of-line)
+1.127 (jpw 06-Feb-03): (display-buffer rmail-view-buffer))
+1.1 (jimb 30-Nov-90):
+1.1 (jimb 30-Nov-90): (defun rmail-summary-previous-msg (&optional number)
+1.127 (jpw 06-Feb-03): "Display previous non-deleted msg from rmail file.
+1.127 (jpw 06-Feb-03): With optional prefix argument NUMBER, moves backward this number of
+1.127 (jpw 06-Feb-03): non-deleted messages."
+1.1 (jimb 30-Nov-90): (interactive "p")
+1.1 (jimb 30-Nov-90): (rmail-summary-next-msg (- (if number number 1))))
+1.1 (jimb 30-Nov-90):
+1.6 (rms 09-Mar-93): (defun rmail-summary-next-labeled-message (n labels)
+1.127 (jpw 06-Feb-03): "Show next message with LABELS. Defaults to last labels used.
+1.6 (rms 09-Mar-93): With prefix argument N moves forward N messages with these labels."
+1.6 (rms 09-Mar-93): (interactive "p\nsMove to next msg with labels: ")
+1.88 (kwzh 13-Jul-96): (let (msg)
+1.88 (kwzh 13-Jul-96): (save-excursion
+1.88 (kwzh 13-Jul-96): (set-buffer rmail-buffer)
+1.88 (kwzh 13-Jul-96): (rmail-next-labeled-message n labels)
+1.88 (kwzh 13-Jul-96): (setq msg rmail-current-message))
+1.88 (kwzh 13-Jul-96): (rmail-summary-goto-msg msg)))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-previous-labeled-message (n labels)
+1.127 (jpw 06-Feb-03): "Show previous message with LABELS. Defaults to last labels used.
+1.6 (rms 09-Mar-93): With prefix argument N moves backward N messages with these labels."
+1.6 (rms 09-Mar-93): (interactive "p\nsMove to previous msg with labels: ")
+1.88 (kwzh 13-Jul-96): (let (msg)
+1.88 (kwzh 13-Jul-96): (save-excursion
+1.88 (kwzh 13-Jul-96): (set-buffer rmail-buffer)
+1.88 (kwzh 13-Jul-96): (rmail-previous-labeled-message n labels)
+1.88 (kwzh 13-Jul-96): (setq msg rmail-current-message))
+1.88 (kwzh 13-Jul-96): (rmail-summary-goto-msg msg)))
+1.64 (rms 05-Feb-95):
+1.64 (rms 05-Feb-95): (defun rmail-summary-next-same-subject (n)
+1.64 (rms 05-Feb-95): "Go to the next message in the summary having the same subject.
+1.64 (rms 05-Feb-95): With prefix argument N, do this N times.
+1.64 (rms 05-Feb-95): If N is negative, go backwards."
+1.64 (rms 05-Feb-95): (interactive "p")
+1.140 (as 08-Jan-06): (let ((forward (> n 0))
+1.140 (as 08-Jan-06): search-regexp i found)
+1.140 (as 08-Jan-06): (with-current-buffer rmail-buffer
+1.140 (as 08-Jan-06): (setq search-regexp (rmail-current-subject-regexp)
+1.140 (as 08-Jan-06): i rmail-current-message))
+1.64 (rms 05-Feb-95): (save-excursion
+1.64 (rms 05-Feb-95): (while (and (/= n 0)
+1.64 (rms 05-Feb-95): (if forward
+1.64 (rms 05-Feb-95): (not (eobp))
+1.64 (rms 05-Feb-95): (not (bobp))))
+1.64 (rms 05-Feb-95): (let (done)
+1.64 (rms 05-Feb-95): (while (and (not done)
+1.64 (rms 05-Feb-95): (if forward
+1.64 (rms 05-Feb-95): (not (eobp))
+1.64 (rms 05-Feb-95): (not (bobp))))
+1.64 (rms 05-Feb-95): ;; Advance thru summary.
+1.64 (rms 05-Feb-95): (forward-line (if forward 1 -1))
+1.64 (rms 05-Feb-95): ;; Get msg number of this line.
+1.132 (lektu 16-May-05): (setq i (string-to-number
+1.64 (rms 05-Feb-95): (buffer-substring (point)
+1.121 (gerd 05-Oct-01): (min (point-max) (+ 6 (point))))))
+1.64 (rms 05-Feb-95): ;; See if that msg has desired subject.
+1.64 (rms 05-Feb-95): (save-excursion
+1.64 (rms 05-Feb-95): (set-buffer rmail-buffer)
+1.64 (rms 05-Feb-95): (save-restriction
+1.64 (rms 05-Feb-95): (widen)
+1.64 (rms 05-Feb-95): (goto-char (rmail-msgbeg i))
+1.64 (rms 05-Feb-95): (search-forward "\n*** EOOH ***\n")
+1.64 (rms 05-Feb-95): (let ((beg (point)) end)
+1.64 (rms 05-Feb-95): (search-forward "\n\n")
+1.64 (rms 05-Feb-95): (setq end (point))
+1.64 (rms 05-Feb-95): (goto-char beg)
+1.64 (rms 05-Feb-95): (setq done (re-search-forward search-regexp end t))))))
+1.64 (rms 05-Feb-95): (if done (setq found i)))
+1.64 (rms 05-Feb-95): (setq n (if forward (1- n) (1+ n)))))
+1.64 (rms 05-Feb-95): (if found
+1.64 (rms 05-Feb-95): (rmail-summary-goto-msg found)
+1.64 (rms 05-Feb-95): (error "No %s message with same subject"
+1.64 (rms 05-Feb-95): (if forward "following" "previous")))))
+1.64 (rms 05-Feb-95):
+1.64 (rms 05-Feb-95): (defun rmail-summary-previous-same-subject (n)
+1.64 (rms 05-Feb-95): "Go to the previous message in the summary having the same subject.
+1.64 (rms 05-Feb-95): With prefix argument N, do this N times.
+1.64 (rms 05-Feb-95): If N is negative, go forwards instead."
+1.64 (rms 05-Feb-95): (interactive "p")
+1.64 (rms 05-Feb-95): (rmail-summary-next-same-subject (- n)))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): ;; Delete and undelete summary commands.
+1.6 (rms 09-Mar-93):
+1.95 (rms 16-Apr-97): (defun rmail-summary-delete-forward (&optional count)
+1.6 (rms 09-Mar-93): "Delete this message and move to next nondeleted one.
+1.6 (rms 09-Mar-93): Deleted messages stay in the file until the \\[rmail-expunge] command is given.
+1.95 (rms 16-Apr-97): A prefix argument serves as a repeat count;
+1.95 (rms 16-Apr-97): a negative argument means to delete and move backward."
+1.95 (rms 16-Apr-97): (interactive "p")
+1.97 (rms 19-May-97): (unless (numberp count) (setq count 1))
+1.95 (rms 16-Apr-97): (let (end del-msg
+1.95 (rms 16-Apr-97): (backward (< count 0)))
+1.95 (rms 16-Apr-97): (while (/= count 0)
+1.95 (rms 16-Apr-97): (rmail-summary-goto-msg)
+1.95 (rms 16-Apr-97): (with-current-buffer rmail-buffer
+1.95 (rms 16-Apr-97): (rmail-delete-message)
+1.95 (rms 16-Apr-97): (setq del-msg rmail-current-message))
+1.23 (rms 30-Dec-93): (rmail-summary-mark-deleted del-msg)
+1.23 (rms 30-Dec-93): (while (and (not (if backward (bobp) (eobp)))
+1.25 (rms 08-Jan-94): (save-excursion (beginning-of-line)
+1.53 (rms 27-Sep-94): (looking-at " *[0-9]+D")))
+1.60 (rms 15-Oct-94): (forward-line (if backward -1 1)))
+1.60 (rms 15-Oct-94): ;; It looks ugly to move to the empty line at end of buffer.
+1.60 (rms 15-Oct-94): (and (eobp) (not backward)
+1.95 (rms 16-Apr-97): (forward-line -1))
+1.95 (rms 16-Apr-97): (setq count
+1.95 (rms 16-Apr-97): (if (> count 0) (1- count) (1+ count))))))
+1.1 (jimb 30-Nov-90):
+1.95 (rms 16-Apr-97): (defun rmail-summary-delete-backward (&optional count)
+1.6 (rms 09-Mar-93): "Delete this message and move to previous nondeleted one.
+1.95 (rms 16-Apr-97): Deleted messages stay in the file until the \\[rmail-expunge] command is given.
+1.95 (rms 16-Apr-97): A prefix argument serves as a repeat count;
+1.95 (rms 16-Apr-97): a negative argument means to delete and move forward."
+1.95 (rms 16-Apr-97): (interactive "p")
+1.95 (rms 16-Apr-97): (rmail-summary-delete-forward (- count)))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-mark-deleted (&optional n undel)
+1.76 (kwzh 24-Jan-96): ;; Since third arg is t, this only alters the summary, not the Rmail buf.
+1.10 (rms 25-May-93): (and n (rmail-summary-goto-msg n t t))
+1.10 (rms 25-May-93): (or (eobp)
+1.63 (rms 20-Jan-95): (not (overlay-get rmail-summary-overlay 'face))
+1.10 (rms 25-May-93): (let ((buffer-read-only nil))
+1.10 (rms 25-May-93): (skip-chars-forward " ")
+1.10 (rms 25-May-93): (skip-chars-forward "[0-9]")
+1.10 (rms 25-May-93): (if undel
+1.10 (rms 25-May-93): (if (looking-at "D")
+1.10 (rms 25-May-93): (progn (delete-char 1) (insert " ")))
+1.10 (rms 25-May-93): (delete-char 1)
+1.10 (rms 25-May-93): (insert "D"))))
+1.6 (rms 09-Mar-93): (beginning-of-line))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-mark-undeleted (n)
+1.6 (rms 09-Mar-93): (rmail-summary-mark-deleted n t))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-deleted-p (&optional n)
+1.6 (rms 09-Mar-93): (save-excursion
+1.6 (rms 09-Mar-93): (and n (rmail-summary-goto-msg n nil t))
+1.6 (rms 09-Mar-93): (skip-chars-forward " ")
+1.6 (rms 09-Mar-93): (skip-chars-forward "[0-9]")
+1.6 (rms 09-Mar-93): (looking-at "D")))
+1.1 (jimb 30-Nov-90):
+1.6 (rms 09-Mar-93): (defun rmail-summary-undelete (&optional arg)
+1.6 (rms 09-Mar-93): "Undelete current message.
+1.6 (rms 09-Mar-93): Optional prefix ARG means undelete ARG previous messages."
+1.6 (rms 09-Mar-93): (interactive "p")
+1.6 (rms 09-Mar-93): (if (/= arg 1)
+1.6 (rms 09-Mar-93): (rmail-summary-undelete-many arg)
+1.26 (rms 26-Jan-94): (let ((buffer-read-only nil)
+1.26 (rms 26-Jan-94): (opoint (point)))
+1.6 (rms 09-Mar-93): (end-of-line)
+1.6 (rms 09-Mar-93): (cond ((re-search-backward "\\(^ *[0-9]*\\)\\(D\\)" nil t)
+1.6 (rms 09-Mar-93): (replace-match "\\1 ")
+1.6 (rms 09-Mar-93): (rmail-summary-goto-msg)
+1.118 (gerd 08-May-01): (if rmail-enable-mime
+1.118 (gerd 08-May-01): (set-buffer rmail-buffer)
+1.118 (gerd 08-May-01): (pop-to-buffer rmail-buffer))
+1.6 (rms 09-Mar-93): (and (rmail-message-deleted-p rmail-current-message)
+1.6 (rms 09-Mar-93): (rmail-undelete-previous-message))
+1.118 (gerd 08-May-01): (if rmail-enable-mime
+1.118 (gerd 08-May-01): (pop-to-buffer rmail-view-buffer))
+1.26 (rms 26-Jan-94): (pop-to-buffer rmail-summary-buffer))
+1.26 (rms 26-Jan-94): (t (goto-char opoint))))))
+1.1 (jimb 30-Nov-90):
+1.6 (rms 09-Mar-93): (defun rmail-summary-undelete-many (&optional n)
+1.6 (rms 09-Mar-93): "Undelete all deleted msgs, optional prefix arg N means undelete N prev msgs."
+1.6 (rms 09-Mar-93): (interactive "P")
+1.6 (rms 09-Mar-93): (save-excursion
+1.6 (rms 09-Mar-93): (set-buffer rmail-buffer)
+1.6 (rms 09-Mar-93): (let* ((init-msg (if n rmail-current-message rmail-total-messages))
+1.6 (rms 09-Mar-93): (rmail-current-message init-msg)
+1.6 (rms 09-Mar-93): (n (or n rmail-total-messages))
+1.6 (rms 09-Mar-93): (msgs-undeled 0))
+1.6 (rms 09-Mar-93): (while (and (> rmail-current-message 0)
+1.6 (rms 09-Mar-93): (< msgs-undeled n))
+1.6 (rms 09-Mar-93): (if (rmail-message-deleted-p rmail-current-message)
+1.6 (rms 09-Mar-93): (progn (rmail-set-attribute "deleted" nil)
+1.6 (rms 09-Mar-93): (setq msgs-undeled (1+ msgs-undeled))))
+1.6 (rms 09-Mar-93): (setq rmail-current-message (1- rmail-current-message)))
+1.6 (rms 09-Mar-93): (set-buffer rmail-summary-buffer)
+1.6 (rms 09-Mar-93): (setq rmail-current-message init-msg msgs-undeled 0)
+1.6 (rms 09-Mar-93): (while (and (> rmail-current-message 0)
+1.6 (rms 09-Mar-93): (< msgs-undeled n))
+1.6 (rms 09-Mar-93): (if (rmail-summary-deleted-p rmail-current-message)
+1.6 (rms 09-Mar-93): (progn (rmail-summary-mark-undeleted rmail-current-message)
+1.6 (rms 09-Mar-93): (setq msgs-undeled (1+ msgs-undeled))))
+1.6 (rms 09-Mar-93): (setq rmail-current-message (1- rmail-current-message))))
+1.6 (rms 09-Mar-93): (rmail-summary-goto-msg)))
+1.6 (rms 09-Mar-93):
+1.1 (jimb 30-Nov-90): ;; Rmail Summary mode is suitable only for specially formatted data.
+1.1 (jimb 30-Nov-90): (put 'rmail-summary-mode 'mode-class 'special)
+1.1 (jimb 30-Nov-90):
+1.1 (jimb 30-Nov-90): (defun rmail-summary-mode ()
+1.6 (rms 09-Mar-93): "Rmail Summary Mode is invoked from Rmail Mode by using \\<rmail-mode-map>\\[rmail-summary].
+1.6 (rms 09-Mar-93): As commands are issued in the summary buffer, they are applied to the
+1.6 (rms 09-Mar-93): corresponding mail messages in the rmail buffer.
+1.1 (jimb 30-Nov-90):
+1.6 (rms 09-Mar-93): All normal editing commands are turned off.
+1.21 (rms 23-Nov-93): Instead, nearly all the Rmail mode commands are available,
+1.21 (rms 23-Nov-93): though many of them move only among the messages in the summary.
+1.6 (rms 09-Mar-93):
+1.21 (rms 23-Nov-93): These additional commands exist:
+1.21 (rms 23-Nov-93):
+1.21 (rms 23-Nov-93): \\[rmail-summary-undelete-many] Undelete all or prefix arg deleted messages.
+1.21 (rms 23-Nov-93): \\[rmail-summary-wipe] Delete the summary and go to the Rmail buffer.
+1.21 (rms 23-Nov-93):
+1.21 (rms 23-Nov-93): Commands for sorting the summary:
+1.21 (rms 23-Nov-93):
+1.21 (rms 23-Nov-93): \\[rmail-summary-sort-by-date] Sort by date.
+1.21 (rms 23-Nov-93): \\[rmail-summary-sort-by-subject] Sort by subject.
+1.21 (rms 23-Nov-93): \\[rmail-summary-sort-by-author] Sort by author.
+1.21 (rms 23-Nov-93): \\[rmail-summary-sort-by-recipient] Sort by recipient.
+1.21 (rms 23-Nov-93): \\[rmail-summary-sort-by-correspondent] Sort by correspondent.
+1.33 (kwzh 07-Apr-94): \\[rmail-summary-sort-by-lines] Sort by lines.
+1.117 (gerd 07-May-01): \\[rmail-summary-sort-by-labels] Sort by labels."
+1.1 (jimb 30-Nov-90): (interactive)
+1.1 (jimb 30-Nov-90): (kill-all-local-variables)
+1.1 (jimb 30-Nov-90): (setq major-mode 'rmail-summary-mode)
+1.1 (jimb 30-Nov-90): (setq mode-name "RMAIL Summary")
+1.1 (jimb 30-Nov-90): (setq truncate-lines t)
+1.1 (jimb 30-Nov-90): (setq buffer-read-only t)
+1.1 (jimb 30-Nov-90): (set-syntax-table text-mode-syntax-table)
+1.6 (rms 09-Mar-93): (make-local-variable 'rmail-buffer)
+1.94 (handa 26-Feb-97): (make-local-variable 'rmail-view-buffer)
+1.6 (rms 09-Mar-93): (make-local-variable 'rmail-total-messages)
+1.6 (rms 09-Mar-93): (make-local-variable 'rmail-current-message)
+1.6 (rms 09-Mar-93): (setq rmail-current-message nil)
+1.6 (rms 09-Mar-93): (make-local-variable 'rmail-summary-redo)
+1.6 (rms 09-Mar-93): (setq rmail-summary-redo nil)
+1.6 (rms 09-Mar-93): (make-local-variable 'revert-buffer-function)
+1.58 (simon 12-Oct-94): (make-local-variable 'font-lock-defaults)
+1.58 (simon 12-Oct-94): (setq font-lock-defaults '(rmail-summary-font-lock-keywords t))
+1.34 (kwzh 07-Apr-94): (rmail-summary-enable)
+1.133 (lute 26-May-05): (run-mode-hooks 'rmail-summary-mode-hook))
+1.1 (jimb 30-Nov-90):
+1.34 (kwzh 07-Apr-94): ;; Summary features need to be disabled during edit mode.
+1.34 (kwzh 07-Apr-94): (defun rmail-summary-disable ()
+1.35 (kwzh 07-Apr-94): (use-local-map text-mode-map)
+1.77 (simon 25-Jan-96): (remove-hook 'post-command-hook 'rmail-summary-rmail-update t)
+1.35 (kwzh 07-Apr-94): (setq revert-buffer-function nil))
+1.34 (kwzh 07-Apr-94):
+1.34 (kwzh 07-Apr-94): (defun rmail-summary-enable ()
+1.35 (kwzh 07-Apr-94): (use-local-map rmail-summary-mode-map)
+1.77 (simon 25-Jan-96): (add-hook 'post-command-hook 'rmail-summary-rmail-update nil t)
+1.35 (kwzh 07-Apr-94): (setq revert-buffer-function 'rmail-update-summary))
+1.34 (kwzh 07-Apr-94):
+1.89 (rms 19-Sep-96): (defvar rmail-summary-put-back-unseen nil
+1.89 (rms 19-Sep-96): "Used for communicating between calls to `rmail-summary-rmail-update'.
+1.89 (rms 19-Sep-96): If it moves to a message within an Incremental Search, and removes
+1.89 (rms 19-Sep-96): the `unseen' attribute from that message, it sets this flag
+1.89 (rms 19-Sep-96): so that if the next motion between messages is in the same Incremental
+1.89 (rms 19-Sep-96): Search, the `unseen' attribute is restored.")
+1.89 (rms 19-Sep-96):
+1.7 (rms 13-Mar-93): ;; Show in Rmail the message described by the summary line that point is on,
+1.7 (rms 13-Mar-93): ;; but only if the Rmail buffer is already visible.
+1.6 (rms 09-Mar-93): ;; This is a post-command-hook in summary buffers.
+1.6 (rms 09-Mar-93): (defun rmail-summary-rmail-update ()
+1.37 (kwzh 19-Apr-94): (let (buffer-read-only)
+1.37 (kwzh 19-Apr-94): (save-excursion
+1.37 (kwzh 19-Apr-94): ;; If at end of buffer, pretend we are on the last text line.
+1.37 (kwzh 19-Apr-94): (if (eobp)
+1.37 (kwzh 19-Apr-94): (forward-line -1))
+1.37 (kwzh 19-Apr-94): (beginning-of-line)
+1.37 (kwzh 19-Apr-94): (skip-chars-forward " ")
+1.132 (lektu 16-May-05): (let ((msg-num (string-to-number (buffer-substring
+1.132 (lektu 16-May-05): (point)
+1.132 (lektu 16-May-05): (progn (skip-chars-forward "0-9")
+1.132 (lektu 16-May-05): (point))))))
+1.89 (rms 19-Sep-96): ;; Always leave `unseen' removed
+1.89 (rms 19-Sep-96): ;; if we get out of isearch mode.
+1.89 (rms 19-Sep-96): ;; Don't let a subsequent isearch restore that `unseen'.
+1.89 (rms 19-Sep-96): (if (not isearch-mode)
+1.89 (rms 19-Sep-96): (setq rmail-summary-put-back-unseen nil))
+1.89 (rms 19-Sep-96):
+1.37 (kwzh 19-Apr-94): (or (eq rmail-current-message msg-num)
+1.100 (kwzh 16-Oct-97): (let ((window (get-buffer-window rmail-view-buffer t))
+1.37 (kwzh 19-Apr-94): (owin (selected-window)))
+1.89 (rms 19-Sep-96): (if isearch-mode
+1.89 (rms 19-Sep-96): (save-excursion
+1.89 (rms 19-Sep-96): (set-buffer rmail-buffer)
+1.89 (rms 19-Sep-96): ;; If we first saw the previous message in this search,
+1.89 (rms 19-Sep-96): ;; and we have gone to a different message while searching,
+1.89 (rms 19-Sep-96): ;; put back `unseen' on the former one.
+1.102 (kwzh 04-Jun-98): (if rmail-summary-put-back-unseen
+1.103 (kwzh 22-Jun-98): (rmail-set-attribute "unseen" t
+1.103 (kwzh 22-Jun-98): rmail-current-message))
+1.89 (rms 19-Sep-96): ;; Arrange to do that later, for the new current message,
+1.89 (rms 19-Sep-96): ;; if it still has `unseen'.
+1.89 (rms 19-Sep-96): (setq rmail-summary-put-back-unseen
+1.89 (rms 19-Sep-96): (rmail-message-labels-p msg-num ", ?\\(unseen\\),")))
+1.89 (rms 19-Sep-96): (setq rmail-summary-put-back-unseen nil))
+1.89 (rms 19-Sep-96):
+1.89 (rms 19-Sep-96): ;; Go to the desired message.
+1.37 (kwzh 19-Apr-94): (setq rmail-current-message msg-num)
+1.89 (rms 19-Sep-96):
+1.89 (rms 19-Sep-96): ;; Update the summary to show the message has been seen.
+1.37 (kwzh 19-Apr-94): (if (= (following-char) ?-)
+1.37 (kwzh 19-Apr-94): (progn
+1.37 (kwzh 19-Apr-94): (delete-char 1)
+1.37 (kwzh 19-Apr-94): (insert " ")))
+1.89 (rms 19-Sep-96):
+1.37 (kwzh 19-Apr-94): (if window
+1.37 (kwzh 19-Apr-94): ;; Using save-window-excursion would cause the new value
+1.14 (rms 03-Jun-93): ;; of point to get lost.
+1.14 (rms 03-Jun-93): (unwind-protect
+1.14 (rms 03-Jun-93): (progn
+1.14 (rms 03-Jun-93): (select-window window)
+1.56 (rms 11-Oct-94): (rmail-show-message msg-num t))
+1.37 (kwzh 19-Apr-94): (select-window owin))
+1.49 (rms 26-Aug-94): (if (buffer-name rmail-buffer)
+1.49 (rms 26-Aug-94): (save-excursion
+1.49 (rms 26-Aug-94): (set-buffer rmail-buffer)
+1.63 (rms 20-Jan-95): (rmail-show-message msg-num t))))))
+1.63 (rms 20-Jan-95): (rmail-summary-update-highlight nil)))))
+1.145 (gm 07-Jun-07):
+1.145 (gm 07-Jun-07): (defun rmail-summary-save-buffer ()
+1.145 (gm 07-Jun-07): "Save the buffer associated with this RMAIL summary."
+1.145 (gm 07-Jun-07): (interactive)
+1.145 (gm 07-Jun-07): (save-window-excursion
+1.145 (gm 07-Jun-07): (save-excursion
+1.145 (gm 07-Jun-07): (switch-to-buffer rmail-buffer)
+1.145 (gm 07-Jun-07): (save-buffer))))
+1.145 (gm 07-Jun-07):
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (if rmail-summary-mode-map
+1.6 (rms 09-Mar-93): nil
+1.6 (rms 09-Mar-93): (setq rmail-summary-mode-map (make-keymap))
+1.6 (rms 09-Mar-93): (suppress-keymap rmail-summary-mode-map)
+1.98 (rms 04-Aug-97):
+1.98 (rms 04-Aug-97): (define-key rmail-summary-mode-map [mouse-2] 'rmail-summary-mouse-goto-message)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "a" 'rmail-summary-add-label)
+1.84 (rms 22-Jun-96): (define-key rmail-summary-mode-map "b" 'rmail-summary-bury)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "c" 'rmail-summary-continue)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "d" 'rmail-summary-delete-forward)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\C-d" 'rmail-summary-delete-backward)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "e" 'rmail-summary-edit-current-message)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "f" 'rmail-summary-forward)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "g" 'rmail-summary-get-new-mail)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "h" 'rmail-summary)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "i" 'rmail-summary-input)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "j" 'rmail-summary-goto-msg)
+1.110 (gerd 12-Dec-99): (define-key rmail-summary-mode-map "\C-m" 'rmail-summary-goto-msg)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "k" 'rmail-summary-kill-label)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "l" 'rmail-summary-by-labels)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\e\C-h" 'rmail-summary)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\e\C-l" 'rmail-summary-by-labels)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\e\C-r" 'rmail-summary-by-recipients)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\e\C-s" 'rmail-summary-by-regexp)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\e\C-t" 'rmail-summary-by-topic)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "m" 'rmail-summary-mail)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\M-m" 'rmail-summary-retry-failure)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "n" 'rmail-summary-next-msg)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\en" 'rmail-summary-next-all)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\e\C-n" 'rmail-summary-next-labeled-message)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "o" 'rmail-summary-output-to-rmail-file)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\C-o" 'rmail-summary-output)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "p" 'rmail-summary-previous-msg)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\ep" 'rmail-summary-previous-all)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\e\C-p" 'rmail-summary-previous-labeled-message)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "q" 'rmail-summary-quit)
+1.101 (rms 23-May-98): (define-key rmail-summary-mode-map "Q" 'rmail-summary-wipe)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "r" 'rmail-summary-reply)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "s" 'rmail-summary-expunge-and-save)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\es" 'rmail-summary-search)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "t" 'rmail-summary-toggle-header)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "u" 'rmail-summary-undelete)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\M-u" 'rmail-summary-undelete-many)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "x" 'rmail-summary-expunge)
+1.101 (rms 23-May-98): (define-key rmail-summary-mode-map "w" 'rmail-summary-output-body)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "." 'rmail-summary-beginning-of-message)
+1.137 (eliz 12-Aug-05): (define-key rmail-summary-mode-map "/" 'rmail-summary-end-of-message)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "<" 'rmail-summary-first-message)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map ">" 'rmail-summary-last-message)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map " " 'rmail-summary-scroll-msg-up)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "\177" 'rmail-summary-scroll-msg-down)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-mode-map "?" 'describe-mode)
+1.64 (rms 05-Feb-95): (define-key rmail-summary-mode-map "\C-c\C-n" 'rmail-summary-next-same-subject)
+1.64 (rms 05-Feb-95): (define-key rmail-summary-mode-map "\C-c\C-p" 'rmail-summary-previous-same-subject)
+1.18 (rms 22-Jun-93): (define-key rmail-summary-mode-map "\C-c\C-s\C-d"
+1.18 (rms 22-Jun-93): 'rmail-summary-sort-by-date)
+1.18 (rms 22-Jun-93): (define-key rmail-summary-mode-map "\C-c\C-s\C-s"
+1.18 (rms 22-Jun-93): 'rmail-summary-sort-by-subject)
+1.18 (rms 22-Jun-93): (define-key rmail-summary-mode-map "\C-c\C-s\C-a"
+1.18 (rms 22-Jun-93): 'rmail-summary-sort-by-author)
+1.18 (rms 22-Jun-93): (define-key rmail-summary-mode-map "\C-c\C-s\C-r"
+1.18 (rms 22-Jun-93): 'rmail-summary-sort-by-recipient)
+1.18 (rms 22-Jun-93): (define-key rmail-summary-mode-map "\C-c\C-s\C-c"
+1.18 (rms 22-Jun-93): 'rmail-summary-sort-by-correspondent)
+1.18 (rms 22-Jun-93): (define-key rmail-summary-mode-map "\C-c\C-s\C-l"
+1.18 (rms 22-Jun-93): 'rmail-summary-sort-by-lines)
+1.33 (kwzh 07-Apr-94): (define-key rmail-summary-mode-map "\C-c\C-s\C-k"
+1.117 (gerd 07-May-01): 'rmail-summary-sort-by-labels)
+1.145 (gm 07-Jun-07): (define-key rmail-summary-mode-map "\C-x\C-s" 'rmail-summary-save-buffer)
+1.6 (rms 09-Mar-93): )
+1.6 (rms 09-Mar-93):
+1.17 (rms 22-Jun-93): ;;; Menu bar bindings.
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar] (make-sparse-keymap))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar classify]
+1.17 (rms 22-Jun-93): (cons "Classify" (make-sparse-keymap "Classify")))
+1.17 (rms 22-Jun-93):
+1.49 (rms 26-Aug-94): (define-key rmail-summary-mode-map [menu-bar classify output-menu]
+1.49 (rms 26-Aug-94): '("Output (Rmail Menu)..." . rmail-summary-output-menu))
+1.49 (rms 26-Aug-94):
+1.49 (rms 26-Aug-94): (define-key rmail-summary-mode-map [menu-bar classify input-menu]
+1.68 (kwzh 30-May-95): '("Input Rmail File (menu)..." . rmail-input-menu))
+1.49 (rms 26-Aug-94):
+1.51 (rms 19-Sep-94): (define-key rmail-summary-mode-map [menu-bar classify input-menu]
+1.51 (rms 19-Sep-94): '(nil))
+1.51 (rms 19-Sep-94):
+1.51 (rms 19-Sep-94): (define-key rmail-summary-mode-map [menu-bar classify output-menu]
+1.51 (rms 19-Sep-94): '(nil))
+1.51 (rms 19-Sep-94):
+1.101 (rms 23-May-98): (define-key rmail-summary-mode-map [menu-bar classify output-body]
+1.101 (rms 23-May-98): '("Output (body)..." . rmail-summary-output-body))
+1.101 (rms 23-May-98):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar classify output-inbox]
+1.47 (rms 02-Aug-94): '("Output (inbox)..." . rmail-summary-output))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar classify output]
+1.47 (rms 02-Aug-94): '("Output (Rmail)..." . rmail-summary-output-to-rmail-file))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar classify kill-label]
+1.47 (rms 02-Aug-94): '("Kill Label..." . rmail-summary-kill-label))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar classify add-label]
+1.47 (rms 02-Aug-94): '("Add Label..." . rmail-summary-add-label))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar summary]
+1.17 (rms 22-Jun-93): (cons "Summary" (make-sparse-keymap "Summary")))
+1.17 (rms 22-Jun-93):
+1.85 (rms 25-Jun-96): (define-key rmail-summary-mode-map [menu-bar summary senders]
+1.85 (rms 25-Jun-96): '("By Senders..." . rmail-summary-by-senders))
+1.85 (rms 25-Jun-96):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar summary labels]
+1.47 (rms 02-Aug-94): '("By Labels..." . rmail-summary-by-labels))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar summary recipients]
+1.47 (rms 02-Aug-94): '("By Recipients..." . rmail-summary-by-recipients))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar summary topic]
+1.47 (rms 02-Aug-94): '("By Topic..." . rmail-summary-by-topic))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar summary regexp]
+1.47 (rms 02-Aug-94): '("By Regexp..." . rmail-summary-by-regexp))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar summary all]
+1.17 (rms 22-Jun-93): '("All" . rmail-summary))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar mail]
+1.17 (rms 22-Jun-93): (cons "Mail" (make-sparse-keymap "Mail")))
+1.17 (rms 22-Jun-93):
+1.45 (rms 02-Aug-94): (define-key rmail-summary-mode-map [menu-bar mail rmail-summary-get-new-mail]
+1.44 (rms 31-Jul-94): '("Get New Mail" . rmail-summary-get-new-mail))
+1.44 (rms 31-Jul-94):
+1.46 (rms 02-Aug-94): (define-key rmail-summary-mode-map [menu-bar mail lambda]
+1.44 (rms 31-Jul-94): '("----"))
+1.42 (rms 29-Jul-94):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar mail continue]
+1.17 (rms 22-Jun-93): '("Continue" . rmail-summary-continue))
+1.44 (rms 31-Jul-94):
+1.44 (rms 31-Jul-94): (define-key rmail-summary-mode-map [menu-bar mail resend]
+1.57 (rms 11-Oct-94): '("Re-send..." . rmail-summary-resend))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar mail forward]
+1.17 (rms 22-Jun-93): '("Forward" . rmail-summary-forward))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar mail retry]
+1.17 (rms 22-Jun-93): '("Retry" . rmail-summary-retry-failure))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar mail reply]
+1.17 (rms 22-Jun-93): '("Reply" . rmail-summary-reply))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar mail mail]
+1.17 (rms 22-Jun-93): '("Mail" . rmail-summary-mail))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar delete]
+1.17 (rms 22-Jun-93): (cons "Delete" (make-sparse-keymap "Delete")))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar delete expunge/save]
+1.17 (rms 22-Jun-93): '("Expunge/Save" . rmail-summary-expunge-and-save))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar delete expunge]
+1.17 (rms 22-Jun-93): '("Expunge" . rmail-summary-expunge))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar delete undelete]
+1.17 (rms 22-Jun-93): '("Undelete" . rmail-summary-undelete))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar delete delete]
+1.17 (rms 22-Jun-93): '("Delete" . rmail-summary-delete-forward))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar move]
+1.17 (rms 22-Jun-93): (cons "Move" (make-sparse-keymap "Move")))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar move search-back]
+1.47 (rms 02-Aug-94): '("Search Back..." . rmail-summary-search-backward))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar move search]
+1.47 (rms 02-Aug-94): '("Search..." . rmail-summary-search))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar move previous]
+1.17 (rms 22-Jun-93): '("Previous Nondeleted" . rmail-summary-previous-msg))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar move next]
+1.17 (rms 22-Jun-93): '("Next Nondeleted" . rmail-summary-next-msg))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar move last]
+1.17 (rms 22-Jun-93): '("Last" . rmail-summary-last-message))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar move first]
+1.17 (rms 22-Jun-93): '("First" . rmail-summary-first-message))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar move previous]
+1.17 (rms 22-Jun-93): '("Previous" . rmail-summary-previous-all))
+1.17 (rms 22-Jun-93):
+1.17 (rms 22-Jun-93): (define-key rmail-summary-mode-map [menu-bar move next]
+1.17 (rms 22-Jun-93): '("Next" . rmail-summary-next-all))
+1.17 (rms 22-Jun-93):
+1.98 (rms 04-Aug-97): (defun rmail-summary-mouse-goto-message (event)
+1.98 (rms 04-Aug-97): "Select the message whose summary line you click on."
+1.98 (rms 04-Aug-97): (interactive "@e")
+1.98 (rms 04-Aug-97): (goto-char (posn-point (event-end event)))
+1.98 (rms 04-Aug-97): (rmail-summary-goto-msg))
+1.76 (kwzh 24-Jan-96):
+1.98 (rms 04-Aug-97): (defun rmail-summary-goto-msg (&optional n nowarn skip-rmail)
+1.98 (rms 04-Aug-97): "Go to message N in the summary buffer and the Rmail buffer.
+1.98 (rms 04-Aug-97): If N is nil, use the message corresponding to point in the summary
+1.98 (rms 04-Aug-97): and move to that message in the Rmail buffer.
+1.76 (kwzh 24-Jan-96):
+1.98 (rms 04-Aug-97): If NOWARN, don't say anything if N is out of range.
+1.98 (rms 04-Aug-97): If SKIP-RMAIL, don't do anything to the Rmail buffer."
+1.1 (jimb 30-Nov-90): (interactive "P")
+1.1 (jimb 30-Nov-90): (if (consp n) (setq n (prefix-numeric-value n)))
+1.1 (jimb 30-Nov-90): (if (eobp) (forward-line -1))
+1.1 (jimb 30-Nov-90): (beginning-of-line)
+1.54 (rms 06-Oct-94): (let* ((obuf (current-buffer))
+1.54 (rms 06-Oct-94): (buf rmail-buffer)
+1.54 (rms 06-Oct-94): (cur (point))
+1.54 (rms 06-Oct-94): message-not-found
+1.132 (lektu 16-May-05): (curmsg (string-to-number
+1.54 (rms 06-Oct-94): (buffer-substring (point)
+1.121 (gerd 05-Oct-01): (min (point-max) (+ 6 (point))))))
+1.54 (rms 06-Oct-94): (total (save-excursion (set-buffer buf) rmail-total-messages)))
+1.29 (rms 19-Mar-94): ;; If message number N was specified, find that message's line
+1.29 (rms 19-Mar-94): ;; or set message-not-found.
+1.29 (rms 19-Mar-94): ;; If N wasn't specified or that message can't be found.
+1.29 (rms 19-Mar-94): ;; set N by default.
+1.1 (jimb 30-Nov-90): (if (not n)
+1.1 (jimb 30-Nov-90): (setq n curmsg)
+1.1 (jimb 30-Nov-90): (if (< n 1)
+1.1 (jimb 30-Nov-90): (progn (message "No preceding message")
+1.1 (jimb 30-Nov-90): (setq n 1)))
+1.131 (eliz 01-Nov-03): (if (and (> n total)
+1.131 (eliz 01-Nov-03): (> total 0))
+1.1 (jimb 30-Nov-90): (progn (message "No following message")
+1.1 (jimb 30-Nov-90): (goto-char (point-max))
+1.76 (kwzh 24-Jan-96): (rmail-summary-goto-msg nil nowarn skip-rmail)))
+1.1 (jimb 30-Nov-90): (goto-char (point-min))
+1.121 (gerd 05-Oct-01): (if (not (re-search-forward (format "^%5d[^0-9]" n) nil t))
+1.1 (jimb 30-Nov-90): (progn (or nowarn (message "Message %d not found" n))
+1.1 (jimb 30-Nov-90): (setq n curmsg)
+1.29 (rms 19-Mar-94): (setq message-not-found t)
+1.1 (jimb 30-Nov-90): (goto-char cur))))
+1.1 (jimb 30-Nov-90): (beginning-of-line)
+1.1 (jimb 30-Nov-90): (skip-chars-forward " ")
+1.1 (jimb 30-Nov-90): (skip-chars-forward "0-9")
+1.1 (jimb 30-Nov-90): (save-excursion (if (= (following-char) ?-)
+1.1 (jimb 30-Nov-90): (let ((buffer-read-only nil))
+1.1 (jimb 30-Nov-90): (delete-char 1)
+1.1 (jimb 30-Nov-90): (insert " "))))
+1.63 (rms 20-Jan-95): (rmail-summary-update-highlight message-not-found)
+1.1 (jimb 30-Nov-90): (beginning-of-line)
+1.6 (rms 09-Mar-93): (if skip-rmail
+1.6 (rms 09-Mar-93): nil
+1.22 (rms 23-Dec-93): (let ((selwin (selected-window)))
+1.22 (rms 23-Dec-93): (unwind-protect
+1.22 (rms 23-Dec-93): (progn (pop-to-buffer buf)
+1.22 (rms 23-Dec-93): (rmail-show-message n))
+1.50 (rms 13-Sep-94): (select-window selwin)
+1.50 (rms 13-Sep-94): ;; The actions above can alter the current buffer. Preserve it.
+1.50 (rms 13-Sep-94): (set-buffer obuf))))))
+1.63 (rms 20-Jan-95):
+1.63 (rms 20-Jan-95): ;; Update the highlighted line in an rmail summary buffer.
+1.63 (rms 20-Jan-95): ;; That should be current. We highlight the line point is on.
+1.63 (rms 20-Jan-95): ;; If NOT-FOUND is non-nil, we turn off highlighting.
+1.63 (rms 20-Jan-95): (defun rmail-summary-update-highlight (not-found)
+1.63 (rms 20-Jan-95): ;; Make sure we have an overlay to use.
+1.63 (rms 20-Jan-95): (or rmail-summary-overlay
+1.63 (rms 20-Jan-95): (progn
+1.63 (rms 20-Jan-95): (make-local-variable 'rmail-summary-overlay)
+1.63 (rms 20-Jan-95): (setq rmail-summary-overlay (make-overlay (point) (point)))))
+1.63 (rms 20-Jan-95): ;; If this message is in the summary, use the overlay to highlight it.
+1.63 (rms 20-Jan-95): ;; Otherwise, don't highlight anything.
+1.63 (rms 20-Jan-95): (if not-found
+1.63 (rms 20-Jan-95): (overlay-put rmail-summary-overlay 'face nil)
+1.63 (rms 20-Jan-95): (move-overlay rmail-summary-overlay
+1.63 (rms 20-Jan-95): (save-excursion (beginning-of-line)
+1.63 (rms 20-Jan-95): (skip-chars-forward " ")
+1.63 (rms 20-Jan-95): (point))
+1.63 (rms 20-Jan-95): (save-excursion (end-of-line) (point)))
+1.63 (rms 20-Jan-95): (overlay-put rmail-summary-overlay 'face 'highlight)))
+1.6 (rms 09-Mar-93):
+1.1 (jimb 30-Nov-90): (defun rmail-summary-scroll-msg-up (&optional dist)
+1.61 (rms 20-Nov-94): "Scroll the Rmail window forward.
+1.61 (rms 20-Nov-94): If the Rmail window is displaying the end of a message,
+1.61 (rms 20-Nov-94): advance to the next message."
+1.1 (jimb 30-Nov-90): (interactive "P")
+1.61 (rms 20-Nov-94): (if (eq dist '-)
+1.61 (rms 20-Nov-94): (rmail-summary-scroll-msg-down nil)
+1.94 (handa 26-Feb-97): (let ((rmail-buffer-window (get-buffer-window rmail-view-buffer)))
+1.61 (rms 20-Nov-94): (if rmail-buffer-window
+1.61 (rms 20-Nov-94): (if (let ((rmail-summary-window (selected-window)))
+1.61 (rms 20-Nov-94): (select-window rmail-buffer-window)
+1.61 (rms 20-Nov-94): (prog1
+1.61 (rms 20-Nov-94): ;; Is EOB visible in the buffer?
+1.61 (rms 20-Nov-94): (save-excursion
+1.61 (rms 20-Nov-94): (let ((ht (window-height (selected-window))))
+1.61 (rms 20-Nov-94): (move-to-window-line (- ht 2))
+1.61 (rms 20-Nov-94): (end-of-line)
+1.61 (rms 20-Nov-94): (eobp)))
+1.61 (rms 20-Nov-94): (select-window rmail-summary-window)))
+1.82 (rms 04-Apr-96): (if (not rmail-summary-scroll-between-messages)
+1.82 (rms 04-Apr-96): (error "End of buffer")
+1.82 (rms 04-Apr-96): (rmail-summary-next-msg (or dist 1)))
+1.94 (handa 26-Feb-97): (let ((other-window-scroll-buffer rmail-view-buffer))
+1.61 (rms 20-Nov-94): (scroll-other-window dist)))
+1.93 (rms 14-Dec-96): ;; If it isn't visible at all, show the beginning.
+1.93 (rms 14-Dec-96): (rmail-summary-beginning-of-message)))))
+1.1 (jimb 30-Nov-90):
+1.1 (jimb 30-Nov-90): (defun rmail-summary-scroll-msg-down (&optional dist)
+1.61 (rms 20-Nov-94): "Scroll the Rmail window backward.
+1.93 (rms 14-Dec-96): If the Rmail window is now displaying the beginning of a message,
+1.93 (rms 14-Dec-96): move to the previous message."
+1.1 (jimb 30-Nov-90): (interactive "P")
+1.61 (rms 20-Nov-94): (if (eq dist '-)
+1.61 (rms 20-Nov-94): (rmail-summary-scroll-msg-up nil)
+1.118 (gerd 08-May-01): (let ((rmail-buffer-window (get-buffer-window rmail-view-buffer)))
+1.61 (rms 20-Nov-94): (if rmail-buffer-window
+1.61 (rms 20-Nov-94): (if (let ((rmail-summary-window (selected-window)))
+1.61 (rms 20-Nov-94): (select-window rmail-buffer-window)
+1.61 (rms 20-Nov-94): (prog1
+1.61 (rms 20-Nov-94): ;; Is BOB visible in the buffer?
+1.61 (rms 20-Nov-94): (save-excursion
+1.61 (rms 20-Nov-94): (move-to-window-line 0)
+1.61 (rms 20-Nov-94): (beginning-of-line)
+1.61 (rms 20-Nov-94): (bobp))
+1.61 (rms 20-Nov-94): (select-window rmail-summary-window)))
+1.82 (rms 04-Apr-96): (if (not rmail-summary-scroll-between-messages)
+1.82 (rms 04-Apr-96): (error "Beginning of buffer")
+1.82 (rms 04-Apr-96): (rmail-summary-previous-msg (or dist 1)))
+1.118 (gerd 08-May-01): (let ((other-window-scroll-buffer rmail-view-buffer))
+1.61 (rms 20-Nov-94): (scroll-other-window-down dist)))
+1.93 (rms 14-Dec-96): ;; If it isn't visible at all, show the beginning.
+1.93 (rms 14-Dec-96): (rmail-summary-beginning-of-message)))))
+1.1 (jimb 30-Nov-90):
+1.6 (rms 09-Mar-93): (defun rmail-summary-beginning-of-message ()
+1.6 (rms 09-Mar-93): "Show current message from the beginning."
+1.6 (rms 09-Mar-93): (interactive)
+1.137 (eliz 12-Aug-05): (rmail-summary-show-message 'BEG))
+1.137 (eliz 12-Aug-05):
+1.137 (eliz 12-Aug-05): (defun rmail-summary-end-of-message ()
+1.137 (eliz 12-Aug-05): "Show bottom of current message."
+1.137 (eliz 12-Aug-05): (interactive)
+1.137 (eliz 12-Aug-05): (rmail-summary-show-message 'END))
+1.137 (eliz 12-Aug-05):
+1.137 (eliz 12-Aug-05): (defun rmail-summary-show-message (where)
+1.137 (eliz 12-Aug-05): "Show current mail message.
+1.137 (eliz 12-Aug-05): Position it according to WHERE which can be BEG or END"
+1.93 (rms 14-Dec-96): (if (and (one-window-p) (not pop-up-frames))
+1.93 (rms 14-Dec-96): ;; If there is just one window, put the summary on the top.
+1.118 (gerd 08-May-01): (let ((buffer rmail-view-buffer))
+1.93 (rms 14-Dec-96): (split-window (selected-window) rmail-summary-window-size)
+1.93 (rms 14-Dec-96): (select-window (frame-first-window))
+1.118 (gerd 08-May-01): (pop-to-buffer rmail-view-buffer)
+1.93 (rms 14-Dec-96): ;; If pop-to-buffer did not use that window, delete that
+1.93 (rms 14-Dec-96): ;; window. (This can happen if it uses another frame.)
+1.93 (rms 14-Dec-96): (or (eq buffer (window-buffer (next-window (frame-first-window))))
+1.93 (rms 14-Dec-96): (delete-other-windows)))
+1.118 (gerd 08-May-01): (pop-to-buffer rmail-view-buffer))
+1.137 (eliz 12-Aug-05): (cond
+1.137 (eliz 12-Aug-05): ((eq where 'BEG)
+1.137 (eliz 12-Aug-05): (goto-char (point-min))
+1.137 (eliz 12-Aug-05): (search-forward "\n\n"))
+1.137 (eliz 12-Aug-05): ((eq where 'END)
+1.137 (eliz 12-Aug-05): (goto-char (point-max))
+1.137 (eliz 12-Aug-05): (recenter (1- (window-height))))
+1.137 (eliz 12-Aug-05): )
+1.6 (rms 09-Mar-93): (pop-to-buffer rmail-summary-buffer))
+1.84 (rms 22-Jun-96):
+1.84 (rms 22-Jun-96): (defun rmail-summary-bury ()
+1.84 (rms 22-Jun-96): "Bury the Rmail buffer and the Rmail summary buffer."
+1.84 (rms 22-Jun-96): (interactive)
+1.84 (rms 22-Jun-96): (let ((buffer-to-bury (current-buffer)))
+1.84 (rms 22-Jun-96): (let (window)
+1.84 (rms 22-Jun-96): (while (setq window (get-buffer-window rmail-buffer))
+1.84 (rms 22-Jun-96): (set-window-buffer window (other-buffer rmail-buffer)))
+1.84 (rms 22-Jun-96): (bury-buffer rmail-buffer))
+1.84 (rms 22-Jun-96): (switch-to-buffer (other-buffer buffer-to-bury))
+1.84 (rms 22-Jun-96): (bury-buffer buffer-to-bury)))
+1.6 (rms 09-Mar-93):
+1.1 (jimb 30-Nov-90): (defun rmail-summary-quit ()
+1.6 (rms 09-Mar-93): "Quit out of Rmail and Rmail summary."
+1.1 (jimb 30-Nov-90): (interactive)
+1.6 (rms 09-Mar-93): (rmail-summary-wipe)
+1.1 (jimb 30-Nov-90): (rmail-quit))
+1.1 (jimb 30-Nov-90):
+1.6 (rms 09-Mar-93): (defun rmail-summary-wipe ()
+1.6 (rms 09-Mar-93): "Kill and wipe away Rmail summary, remaining within Rmail."
+1.1 (jimb 30-Nov-90): (interactive)
+1.6 (rms 09-Mar-93): (save-excursion (set-buffer rmail-buffer) (setq rmail-summary-buffer nil))
+1.118 (gerd 08-May-01): (let ((local-rmail-buffer rmail-view-buffer))
+1.6 (rms 09-Mar-93): (kill-buffer (current-buffer))
+1.6 (rms 09-Mar-93): ;; Delete window if not only one.
+1.6 (rms 09-Mar-93): (if (not (eq (selected-window) (next-window nil 'no-minibuf)))
+1.6 (rms 09-Mar-93): (delete-window))
+1.21 (rms 23-Nov-93): ;; Switch windows to the rmail buffer, or switch to it in this window.
+1.21 (rms 23-Nov-93): (pop-to-buffer local-rmail-buffer)))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-expunge ()
+1.6 (rms 09-Mar-93): "Actually erase all deleted messages and recompute summary headers."
+1.6 (rms 09-Mar-93): (interactive)
+1.6 (rms 09-Mar-93): (save-excursion
+1.6 (rms 09-Mar-93): (set-buffer rmail-buffer)
+1.115 (gerd 12-Dec-00): (when (rmail-expunge-confirmed)
+1.114 (gerd 04-Dec-00): (rmail-only-expunge)))
+1.6 (rms 09-Mar-93): (rmail-update-summary))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-expunge-and-save ()
+1.6 (rms 09-Mar-93): "Expunge and save RMAIL file."
+1.6 (rms 09-Mar-93): (interactive)
+1.6 (rms 09-Mar-93): (save-excursion
+1.6 (rms 09-Mar-93): (set-buffer rmail-buffer)
+1.115 (gerd 12-Dec-00): (when (rmail-expunge-confirmed)
+1.114 (gerd 04-Dec-00): (rmail-only-expunge)))
+1.15 (rms 04-Jun-93): (rmail-update-summary)
+1.15 (rms 04-Jun-93): (save-excursion
+1.14 (rms 03-Jun-93): (set-buffer rmail-buffer)
+1.28 (kwzh 09-Feb-94): (save-buffer))
+1.28 (kwzh 09-Feb-94): (set-buffer-modified-p nil))
+1.6 (rms 09-Mar-93):
+1.99 (rms 27-Aug-97): (defun rmail-summary-get-new-mail (&optional file-name)
+1.99 (rms 27-Aug-97): "Get new mail and recompute summary headers.
+1.99 (rms 27-Aug-97):
+1.99 (rms 27-Aug-97): Optionally you can specify the file to get new mail from. In this case,
+1.99 (rms 27-Aug-97): the file of new mail is not changed or deleted. Noninteractively, you can
+1.99 (rms 27-Aug-97): pass the inbox file name as an argument. Interactively, a prefix
+1.99 (rms 27-Aug-97): argument says to read a file name and use that file as the inbox."
+1.99 (rms 27-Aug-97): (interactive
+1.99 (rms 27-Aug-97): (list (if current-prefix-arg
+1.99 (rms 27-Aug-97): (read-file-name "Get new mail from file: "))))
+1.15 (rms 04-Jun-93): (let (msg)
+1.15 (rms 04-Jun-93): (save-excursion
+1.15 (rms 04-Jun-93): (set-buffer rmail-buffer)
+1.99 (rms 27-Aug-97): (rmail-get-new-mail file-name)
+1.15 (rms 04-Jun-93): ;; Get the proper new message number.
+1.15 (rms 04-Jun-93): (setq msg rmail-current-message))
+1.15 (rms 04-Jun-93): ;; Make sure that message is displayed.
+1.73 (rms 30-Nov-95): (or (zerop msg)
+1.73 (rms 30-Nov-95): (rmail-summary-goto-msg msg))))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-input (filename)
+1.6 (rms 09-Mar-93): "Run Rmail on file FILENAME."
+1.6 (rms 09-Mar-93): (interactive "FRun rmail on RMAIL file: ")
+1.15 (rms 04-Jun-93): ;; We switch windows here, then display the other Rmail file there.
+1.15 (rms 04-Jun-93): (pop-to-buffer rmail-buffer)
+1.15 (rms 04-Jun-93): (rmail filename))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-first-message ()
+1.6 (rms 09-Mar-93): "Show first message in Rmail file from summary buffer."
+1.6 (rms 09-Mar-93): (interactive)
+1.134 (rms 03-Jul-05): (with-no-warnings
+1.134 (rms 03-Jul-05): (beginning-of-buffer)))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-last-message ()
+1.6 (rms 09-Mar-93): "Show last message in Rmail file from summary buffer."
+1.6 (rms 09-Mar-93): (interactive)
+1.134 (rms 03-Jul-05): (with-no-warnings
+1.134 (rms 03-Jul-05): (end-of-buffer))
+1.6 (rms 09-Mar-93): (forward-line -1))
+1.6 (rms 09-Mar-93):
+1.148 (dann 27-Nov-07): (declare-function rmail-abort-edit "rmailedit" ())
+1.148 (dann 27-Nov-07): (declare-function rmail-cease-edit "rmailedit"())
+1.148 (dann 27-Nov-07): (declare-function rmail-set-label "rmailkwd" (l state &optional n))
+1.148 (dann 27-Nov-07): (declare-function rmail-output-read-file-name "rmailout" ())
+1.148 (dann 27-Nov-07): (declare-function rmail-output-read-rmail-file-name "rmailout" ())
+1.148 (dann 27-Nov-07): (declare-function mail-send-and-exit "sendmail" (&optional arg))
+1.148 (dann 27-Nov-07):
+1.6 (rms 09-Mar-93): (defvar rmail-summary-edit-map nil)
+1.6 (rms 09-Mar-93): (if rmail-summary-edit-map
+1.6 (rms 09-Mar-93): nil
+1.6 (rms 09-Mar-93): (setq rmail-summary-edit-map
+1.19 (rms 12-Nov-93): (nconc (make-sparse-keymap) text-mode-map))
+1.6 (rms 09-Mar-93): (define-key rmail-summary-edit-map "\C-c\C-c" 'rmail-cease-edit)
+1.6 (rms 09-Mar-93): (define-key rmail-summary-edit-map "\C-c\C-]" 'rmail-abort-edit))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-edit-current-message ()
+1.6 (rms 09-Mar-93): "Edit the contents of this message."
+1.6 (rms 09-Mar-93): (interactive)
+1.6 (rms 09-Mar-93): (pop-to-buffer rmail-buffer)
+1.6 (rms 09-Mar-93): (rmail-edit-current-message)
+1.6 (rms 09-Mar-93): (use-local-map rmail-summary-edit-map))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-cease-edit ()
+1.6 (rms 09-Mar-93): "Finish editing message, then go back to Rmail summary buffer."
+1.6 (rms 09-Mar-93): (interactive)
+1.6 (rms 09-Mar-93): (rmail-cease-edit)
+1.6 (rms 09-Mar-93): (pop-to-buffer rmail-summary-buffer))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-abort-edit ()
+1.6 (rms 09-Mar-93): "Abort edit of current message; restore original contents.
+1.6 (rms 09-Mar-93): Go back to summary buffer."
+1.6 (rms 09-Mar-93): (interactive)
+1.6 (rms 09-Mar-93): (rmail-abort-edit)
+1.6 (rms 09-Mar-93): (pop-to-buffer rmail-summary-buffer))
+1.6 (rms 09-Mar-93):
+1.17 (rms 22-Jun-93): (defun rmail-summary-search-backward (regexp &optional n)
+1.17 (rms 22-Jun-93): "Show message containing next match for REGEXP.
+1.17 (rms 22-Jun-93): Prefix argument gives repeat count; negative argument means search
+1.17 (rms 22-Jun-93): backwards (through earlier messages).
+1.17 (rms 22-Jun-93): Interactively, empty argument means use same regexp used last time."
+1.17 (rms 22-Jun-93): (interactive
+1.17 (rms 22-Jun-93): (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0))
+1.17 (rms 22-Jun-93): (prompt
+1.139 (rfrancoi 24-Sep-05): (concat (if reversep "Reverse " "") "Rmail search (regexp"))
+1.17 (rms 22-Jun-93): regexp)
+1.139 (rfrancoi 24-Sep-05): (setq prompt
+1.139 (rfrancoi 24-Sep-05): (concat prompt
+1.139 (rfrancoi 24-Sep-05): (if rmail-search-last-regexp
+1.139 (rfrancoi 24-Sep-05): (concat ", default "
+1.139 (rfrancoi 24-Sep-05): rmail-search-last-regexp "): ")
+1.139 (rfrancoi 24-Sep-05): "): ")))
+1.17 (rms 22-Jun-93): (setq regexp (read-string prompt))
+1.17 (rms 22-Jun-93): (cond ((not (equal regexp ""))
+1.17 (rms 22-Jun-93): (setq rmail-search-last-regexp regexp))
+1.17 (rms 22-Jun-93): ((not rmail-search-last-regexp)
+1.17 (rms 22-Jun-93): (error "No previous Rmail search string")))
+1.17 (rms 22-Jun-93): (list rmail-search-last-regexp
+1.17 (rms 22-Jun-93): (prefix-numeric-value current-prefix-arg))))
+1.17 (rms 22-Jun-93): ;; Don't use save-excursion because that prevents point from moving
+1.17 (rms 22-Jun-93): ;; properly in the summary buffer.
+1.17 (rms 22-Jun-93): (let ((buffer (current-buffer)))
+1.17 (rms 22-Jun-93): (unwind-protect
+1.17 (rms 22-Jun-93): (progn
+1.17 (rms 22-Jun-93): (set-buffer rmail-buffer)
+1.17 (rms 22-Jun-93): (rmail-search regexp (- n)))
+1.17 (rms 22-Jun-93): (set-buffer buffer))))
+1.17 (rms 22-Jun-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-search (regexp &optional n)
+1.6 (rms 09-Mar-93): "Show message containing next match for REGEXP.
+1.6 (rms 09-Mar-93): Prefix argument gives repeat count; negative argument means search
+1.6 (rms 09-Mar-93): backwards (through earlier messages).
+1.6 (rms 09-Mar-93): Interactively, empty argument means use same regexp used last time."
+1.6 (rms 09-Mar-93): (interactive
+1.6 (rms 09-Mar-93): (let* ((reversep (< (prefix-numeric-value current-prefix-arg) 0))
+1.6 (rms 09-Mar-93): (prompt
+1.139 (rfrancoi 24-Sep-05): (concat (if reversep "Reverse " "") "Rmail search (regexp"))
+1.6 (rms 09-Mar-93): regexp)
+1.139 (rfrancoi 24-Sep-05): (setq prompt
+1.139 (rfrancoi 24-Sep-05): (concat prompt
+1.139 (rfrancoi 24-Sep-05): (if rmail-search-last-regexp
+1.139 (rfrancoi 24-Sep-05): (concat ", default "
+1.139 (rfrancoi 24-Sep-05): rmail-search-last-regexp "): ")
+1.139 (rfrancoi 24-Sep-05): "): ")))
+1.6 (rms 09-Mar-93): (setq regexp (read-string prompt))
+1.6 (rms 09-Mar-93): (cond ((not (equal regexp ""))
+1.6 (rms 09-Mar-93): (setq rmail-search-last-regexp regexp))
+1.6 (rms 09-Mar-93): ((not rmail-search-last-regexp)
+1.6 (rms 09-Mar-93): (error "No previous Rmail search string")))
+1.6 (rms 09-Mar-93): (list rmail-search-last-regexp
+1.6 (rms 09-Mar-93): (prefix-numeric-value current-prefix-arg))))
+1.17 (rms 22-Jun-93): ;; Don't use save-excursion because that prevents point from moving
+1.17 (rms 22-Jun-93): ;; properly in the summary buffer.
+1.17 (rms 22-Jun-93): (let ((buffer (current-buffer)))
+1.17 (rms 22-Jun-93): (unwind-protect
+1.17 (rms 22-Jun-93): (progn
+1.17 (rms 22-Jun-93): (set-buffer rmail-buffer)
+1.17 (rms 22-Jun-93): (rmail-search regexp n))
+1.17 (rms 22-Jun-93): (set-buffer buffer))))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-toggle-header ()
+1.6 (rms 09-Mar-93): "Show original message header if pruned header currently shown, or vice versa."
+1.6 (rms 09-Mar-93): (interactive)
+1.118 (gerd 08-May-01): (save-window-excursion
+1.6 (rms 09-Mar-93): (set-buffer rmail-buffer)
+1.66 (rms 31-Mar-95): (rmail-toggle-header))
+1.66 (rms 31-Mar-95): ;; Inside save-excursion, some changes to point in the RMAIL buffer are lost.
+1.66 (rms 31-Mar-95): ;; Set point to point-min in the RMAIL buffer, if it is visible.
+1.118 (gerd 08-May-01): (let ((window (get-buffer-window rmail-view-buffer)))
+1.66 (rms 31-Mar-95): (if window
+1.66 (rms 31-Mar-95): ;; Using save-window-excursion would lose the new value of point.
+1.66 (rms 31-Mar-95): (let ((owin (selected-window)))
+1.66 (rms 31-Mar-95): (unwind-protect
+1.66 (rms 31-Mar-95): (progn
+1.66 (rms 31-Mar-95): (select-window window)
+1.66 (rms 31-Mar-95): (goto-char (point-min)))
+1.66 (rms 31-Mar-95): (select-window owin))))))
+1.66 (rms 31-Mar-95):
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-add-label (label)
+1.6 (rms 09-Mar-93): "Add LABEL to labels associated with current Rmail message.
+1.6 (rms 09-Mar-93): Completion is performed over known labels when reading."
+1.14 (rms 03-Jun-93): (interactive (list (save-excursion
+1.14 (rms 03-Jun-93): (set-buffer rmail-buffer)
+1.14 (rms 03-Jun-93): (rmail-read-label "Add label"))))
+1.6 (rms 09-Mar-93): (save-excursion
+1.6 (rms 09-Mar-93): (set-buffer rmail-buffer)
+1.6 (rms 09-Mar-93): (rmail-add-label label)))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-kill-label (label)
+1.6 (rms 09-Mar-93): "Remove LABEL from labels associated with current Rmail message.
+1.6 (rms 09-Mar-93): Completion is performed over known labels when reading."
+1.14 (rms 03-Jun-93): (interactive (list (save-excursion
+1.14 (rms 03-Jun-93): (set-buffer rmail-buffer)
+1.14 (rms 03-Jun-93): (rmail-read-label "Kill label"))))
+1.6 (rms 09-Mar-93): (save-excursion
+1.6 (rms 09-Mar-93): (set-buffer rmail-buffer)
+1.6 (rms 09-Mar-93): (rmail-set-label label nil)))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): ;;;; *** Rmail Summary Mailing Commands ***
+1.6 (rms 09-Mar-93):
+1.116 (gerd 12-Mar-01): (defun rmail-summary-override-mail-send-and-exit ()
+1.127 (jpw 06-Feb-03): "Replace bindings to `mail-send-and-exit' with `rmail-summary-send-and-exit'."
+1.116 (gerd 12-Mar-01): (use-local-map (copy-keymap (current-local-map)))
+1.116 (gerd 12-Mar-01): (dolist (key (where-is-internal 'mail-send-and-exit))
+1.116 (gerd 12-Mar-01): (define-key (current-local-map) key 'rmail-summary-send-and-exit)))
+1.116 (gerd 12-Mar-01):
+1.6 (rms 09-Mar-93): (defun rmail-summary-mail ()
+1.6 (rms 09-Mar-93): "Send mail in another window.
+1.6 (rms 09-Mar-93): While composing the message, use \\[mail-yank-original] to yank the
+1.6 (rms 09-Mar-93): original message into it."
+1.6 (rms 09-Mar-93): (interactive)
+1.65 (rms 19-Feb-95): (let ((window (get-buffer-window rmail-buffer)))
+1.65 (rms 19-Feb-95): (if window
+1.65 (rms 19-Feb-95): (select-window window)
+1.65 (rms 19-Feb-95): (set-buffer rmail-buffer)))
+1.65 (rms 19-Feb-95): (rmail-start-mail nil nil nil nil nil (current-buffer))
+1.116 (gerd 12-Mar-01): (rmail-summary-override-mail-send-and-exit))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-continue ()
+1.6 (rms 09-Mar-93): "Continue composing outgoing message previously being composed."
+1.6 (rms 09-Mar-93): (interactive)
+1.65 (rms 19-Feb-95): (let ((window (get-buffer-window rmail-buffer)))
+1.65 (rms 19-Feb-95): (if window
+1.65 (rms 19-Feb-95): (select-window window)
+1.65 (rms 19-Feb-95): (set-buffer rmail-buffer)))
+1.27 (kwzh 31-Jan-94): (rmail-start-mail t))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-reply (just-sender)
+1.6 (rms 09-Mar-93): "Reply to the current message.
+1.6 (rms 09-Mar-93): Normally include CC: to all other recipients of original message;
+1.27 (kwzh 31-Jan-94): prefix argument means ignore them. While composing the reply,
+1.27 (kwzh 31-Jan-94): use \\[mail-yank-original] to yank the original message into it."
+1.6 (rms 09-Mar-93): (interactive "P")
+1.118 (gerd 08-May-01): (let ((window (get-buffer-window rmail-view-buffer)))
+1.65 (rms 19-Feb-95): (if window
+1.65 (rms 19-Feb-95): (select-window window)
+1.118 (gerd 08-May-01): (set-buffer rmail-view-buffer)))
+1.27 (kwzh 31-Jan-94): (rmail-reply just-sender)
+1.116 (gerd 12-Mar-01): (rmail-summary-override-mail-send-and-exit))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-retry-failure ()
+1.6 (rms 09-Mar-93): "Edit a mail message which is based on the contents of the current message.
+1.6 (rms 09-Mar-93): For a message rejected by the mail system, extract the interesting headers and
+1.6 (rms 09-Mar-93): the body of the original message; otherwise copy the current message."
+1.6 (rms 09-Mar-93): (interactive)
+1.65 (rms 19-Feb-95): (let ((window (get-buffer-window rmail-buffer)))
+1.65 (rms 19-Feb-95): (if window
+1.65 (rms 19-Feb-95): (select-window window)
+1.65 (rms 19-Feb-95): (set-buffer rmail-buffer)))
+1.27 (kwzh 31-Jan-94): (rmail-retry-failure)
+1.116 (gerd 12-Mar-01): (rmail-summary-override-mail-send-and-exit))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): (defun rmail-summary-send-and-exit ()
+1.6 (rms 09-Mar-93): "Send mail reply and return to summary buffer."
+1.6 (rms 09-Mar-93): (interactive)
+1.6 (rms 09-Mar-93): (mail-send-and-exit t))
+1.6 (rms 09-Mar-93):
+1.20 (rms 14-Nov-93): (defun rmail-summary-forward (resend)
+1.20 (rms 14-Nov-93): "Forward the current message to another user.
+1.20 (rms 14-Nov-93): With prefix argument, \"resend\" the message instead of forwarding it;
+1.20 (rms 14-Nov-93): see the documentation of `rmail-resend'."
+1.20 (rms 14-Nov-93): (interactive "P")
+1.6 (rms 09-Mar-93): (save-excursion
+1.65 (rms 19-Feb-95): (let ((window (get-buffer-window rmail-buffer)))
+1.65 (rms 19-Feb-95): (if window
+1.65 (rms 19-Feb-95): (select-window window)
+1.65 (rms 19-Feb-95): (set-buffer rmail-buffer)))
+1.20 (rms 14-Nov-93): (rmail-forward resend)
+1.116 (gerd 12-Mar-01): (rmail-summary-override-mail-send-and-exit)))
+1.57 (rms 11-Oct-94):
+1.57 (rms 11-Oct-94): (defun rmail-summary-resend ()
+1.127 (jpw 06-Feb-03): "Resend current message using `rmail-resend'."
+1.57 (rms 11-Oct-94): (interactive)
+1.57 (rms 11-Oct-94): (save-excursion
+1.65 (rms 19-Feb-95): (let ((window (get-buffer-window rmail-buffer)))
+1.65 (rms 19-Feb-95): (if window
+1.65 (rms 19-Feb-95): (select-window window)
+1.65 (rms 19-Feb-95): (set-buffer rmail-buffer)))
+1.57 (rms 11-Oct-94): (call-interactively 'rmail-resend)))
+1.6 (rms 09-Mar-93):
+1.6 (rms 09-Mar-93): ;; Summary output commands.
+1.6 (rms 09-Mar-93):
+1.108 (kwzh 13-Jun-99): (defun rmail-summary-output-to-rmail-file (&optional file-name n)
+1.6 (rms 09-Mar-93): "Append the current message to an Rmail file named FILE-NAME.
+1.6 (rms 09-Mar-93): If the file does not exist, ask if it should be created.
+1.6 (rms 09-Mar-93): If file is being visited, the message is appended to the Emacs
+1.104 (kwzh 10-Sep-98): buffer visiting that file.
+1.104 (kwzh 10-Sep-98):
+1.104 (kwzh 10-Sep-98): A prefix argument N says to output N consecutive messages
+1.104 (kwzh 10-Sep-98): starting with the current one. Deleted messages are skipped and don't count."
+1.107 (rms 04-Jan-99): (interactive
+1.107 (rms 04-Jan-99): (progn (require 'rmailout)
+1.107 (rms 04-Jan-99): (list (rmail-output-read-rmail-file-name)
+1.107 (rms 04-Jan-99): (prefix-numeric-value current-prefix-arg))))
+1.109 (kwzh 15-Jun-99): (let ((i 0) prev-msg)
+1.126 (lektu 04-Feb-03): (while
+1.109 (kwzh 15-Jun-99): (and (< i n)
+1.109 (kwzh 15-Jun-99): (progn (rmail-summary-goto-msg)
+1.109 (kwzh 15-Jun-99): (not (eq prev-msg
+1.109 (kwzh 15-Jun-99): (setq prev-msg
+1.126 (lektu 04-Feb-03): (with-current-buffer rmail-buffer
+1.109 (kwzh 15-Jun-99): rmail-current-message))))))
+1.107 (rms 04-Jan-99): (setq i (1+ i))
+1.107 (rms 04-Jan-99): (with-current-buffer rmail-buffer
+1.107 (rms 04-Jan-99): (let ((rmail-delete-after-output nil))
+1.107 (rms 04-Jan-99): (rmail-output-to-rmail-file file-name 1)))
+1.107 (rms 04-Jan-99): (if rmail-delete-after-output
+1.107 (rms 04-Jan-99): (rmail-summary-delete-forward nil)
+1.107 (rms 04-Jan-99): (if (< i n)
+1.107 (rms 04-Jan-99): (rmail-summary-next-msg 1))))))
+1.107 (rms 04-Jan-99):
+1.107 (rms 04-Jan-99): (defun rmail-summary-output (&optional file-name n)
+1.107 (rms 04-Jan-99): "Append this message to Unix mail file named FILE-NAME.
+1.107 (rms 04-Jan-99):
+1.107 (rms 04-Jan-99): A prefix argument N says to output N consecutive messages
+1.107 (rms 04-Jan-99): starting with the current one. Deleted messages are skipped and don't count."
+1.107 (rms 04-Jan-99): (interactive
+1.107 (rms 04-Jan-99): (progn (require 'rmailout)
+1.107 (rms 04-Jan-99): (list (rmail-output-read-file-name)
+1.107 (rms 04-Jan-99): (prefix-numeric-value current-prefix-arg))))
+1.124 (rms 23-Feb-02): (let ((i 0) prev-msg)
+1.124 (rms 23-Feb-02): (while
+1.124 (rms 23-Feb-02): (and (< i n)
+1.124 (rms 23-Feb-02): (progn (rmail-summary-goto-msg)
+1.124 (rms 23-Feb-02): (not (eq prev-msg
+1.124 (rms 23-Feb-02): (setq prev-msg
+1.124 (rms 23-Feb-02): (with-current-buffer rmail-buffer
+1.124 (rms 23-Feb-02): rmail-current-message))))))
+1.107 (rms 04-Jan-99): (setq i (1+ i))
+1.107 (rms 04-Jan-99): (with-current-buffer rmail-buffer
+1.107 (rms 04-Jan-99): (let ((rmail-delete-after-output nil))
+1.107 (rms 04-Jan-99): (rmail-output file-name 1)))
+1.107 (rms 04-Jan-99): (if rmail-delete-after-output
+1.107 (rms 04-Jan-99): (rmail-summary-delete-forward nil)
+1.107 (rms 04-Jan-99): (if (< i n)
+1.107 (rms 04-Jan-99): (rmail-summary-next-msg 1))))))
+1.49 (rms 26-Aug-94):
+1.49 (rms 26-Aug-94): (defun rmail-summary-output-menu ()
+1.49 (rms 26-Aug-94): "Output current message to another Rmail file, chosen with a menu.
+1.49 (rms 26-Aug-94): Also set the default for subsequent \\[rmail-output-to-rmail-file] commands.
+1.49 (rms 26-Aug-94): The variables `rmail-secondary-file-directory' and
+1.49 (rms 26-Aug-94): `rmail-secondary-file-regexp' control which files are offered in the menu."
+1.49 (rms 26-Aug-94): (interactive)
+1.49 (rms 26-Aug-94): (save-excursion
+1.49 (rms 26-Aug-94): (set-buffer rmail-buffer)
+1.49 (rms 26-Aug-94): (let ((rmail-delete-after-output nil))
+1.49 (rms 26-Aug-94): (call-interactively 'rmail-output-menu)))
+1.24 (rms 08-Jan-94): (if rmail-delete-after-output
+1.25 (rms 08-Jan-94): (rmail-summary-delete-forward nil)))
+1.51 (rms 19-Sep-94):
+1.51 (rms 19-Sep-94): (defun rmail-summary-construct-io-menu ()
+1.51 (rms 19-Sep-94): (let ((files (rmail-find-all-files rmail-secondary-file-directory)))
+1.71 (rms 06-Sep-95): (if files
+1.51 (rms 19-Sep-94): (progn
+1.51 (rms 19-Sep-94): (define-key rmail-summary-mode-map [menu-bar classify input-menu]
+1.126 (lektu 04-Feb-03): (cons "Input Rmail File"
+1.126 (lektu 04-Feb-03): (rmail-list-to-menu "Input Rmail File"
+1.71 (rms 06-Sep-95): files
+1.51 (rms 19-Sep-94): 'rmail-summary-input)))
+1.51 (rms 19-Sep-94): (define-key rmail-summary-mode-map [menu-bar classify output-menu]
+1.126 (lektu 04-Feb-03): (cons "Output Rmail File"
+1.126 (lektu 04-Feb-03): (rmail-list-to-menu "Output Rmail File"
+1.71 (rms 06-Sep-95): files
+1.71 (rms 06-Sep-95): 'rmail-summary-output-to-rmail-file))))
+1.71 (rms 06-Sep-95): (define-key rmail-summary-mode-map [menu-bar classify input-menu]
+1.71 (rms 06-Sep-95): '("Input Rmail File" . rmail-disable-menu))
+1.71 (rms 06-Sep-95): (define-key rmail-summary-mode-map [menu-bar classify output-menu]
+1.71 (rms 06-Sep-95): '("Output Rmail File" . rmail-disable-menu)))))
+1.51 (rms 19-Sep-94):
+1.101 (rms 23-May-98): (defun rmail-summary-output-body (&optional file-name)
+1.101 (rms 23-May-98): "Write this message body to the file FILE-NAME.
+1.101 (rms 23-May-98): FILE-NAME defaults, interactively, from the Subject field of the message."
+1.101 (rms 23-May-98): (interactive)
+1.101 (rms 23-May-98): (save-excursion
+1.101 (rms 23-May-98): (set-buffer rmail-buffer)
+1.101 (rms 23-May-98): (let ((rmail-delete-after-output nil))
+1.101 (rms 23-May-98): (if file-name
+1.101 (rms 23-May-98): (rmail-output-body-to-file file-name)
+1.101 (rms 23-May-98): (call-interactively 'rmail-output-body-to-file))))
+1.101 (rms 23-May-98): (if rmail-delete-after-output
+1.101 (rms 23-May-98): (rmail-summary-delete-forward nil)))
+1.18 (rms 22-Jun-93):
+1.18 (rms 22-Jun-93): ;; Sorting messages in Rmail Summary buffer.
+1.18 (rms 22-Jun-93):
+1.18 (rms 22-Jun-93): (defun rmail-summary-sort-by-date (reverse)
+1.18 (rms 22-Jun-93): "Sort messages of current Rmail summary by date.
+1.18 (rms 22-Jun-93): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.18 (rms 22-Jun-93): (interactive "P")
+1.18 (rms 22-Jun-93): (rmail-sort-from-summary (function rmail-sort-by-date) reverse))
+1.18 (rms 22-Jun-93):
+1.18 (rms 22-Jun-93): (defun rmail-summary-sort-by-subject (reverse)
+1.18 (rms 22-Jun-93): "Sort messages of current Rmail summary by subject.
+1.18 (rms 22-Jun-93): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.18 (rms 22-Jun-93): (interactive "P")
+1.18 (rms 22-Jun-93): (rmail-sort-from-summary (function rmail-sort-by-subject) reverse))
+1.18 (rms 22-Jun-93):
+1.18 (rms 22-Jun-93): (defun rmail-summary-sort-by-author (reverse)
+1.18 (rms 22-Jun-93): "Sort messages of current Rmail summary by author.
+1.18 (rms 22-Jun-93): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.18 (rms 22-Jun-93): (interactive "P")
+1.18 (rms 22-Jun-93): (rmail-sort-from-summary (function rmail-sort-by-author) reverse))
+1.18 (rms 22-Jun-93):
+1.18 (rms 22-Jun-93): (defun rmail-summary-sort-by-recipient (reverse)
+1.18 (rms 22-Jun-93): "Sort messages of current Rmail summary by recipient.
+1.18 (rms 22-Jun-93): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.18 (rms 22-Jun-93): (interactive "P")
+1.18 (rms 22-Jun-93): (rmail-sort-from-summary (function rmail-sort-by-recipient) reverse))
+1.18 (rms 22-Jun-93):
+1.18 (rms 22-Jun-93): (defun rmail-summary-sort-by-correspondent (reverse)
+1.18 (rms 22-Jun-93): "Sort messages of current Rmail summary by other correspondent.
+1.18 (rms 22-Jun-93): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.18 (rms 22-Jun-93): (interactive "P")
+1.18 (rms 22-Jun-93): (rmail-sort-from-summary (function rmail-sort-by-correspondent) reverse))
+1.18 (rms 22-Jun-93):
+1.18 (rms 22-Jun-93): (defun rmail-summary-sort-by-lines (reverse)
+1.18 (rms 22-Jun-93): "Sort messages of current Rmail summary by lines of the message.
+1.18 (rms 22-Jun-93): If prefix argument REVERSE is non-nil, sort them in reverse order."
+1.18 (rms 22-Jun-93): (interactive "P")
+1.18 (rms 22-Jun-93): (rmail-sort-from-summary (function rmail-sort-by-lines) reverse))
+1.18 (rms 22-Jun-93):
+1.117 (gerd 07-May-01): (defun rmail-summary-sort-by-labels (reverse labels)
+1.117 (gerd 07-May-01): "Sort messages of current Rmail summary by labels.
+1.33 (kwzh 07-Apr-94): If prefix argument REVERSE is non-nil, sort them in reverse order.
+1.33 (kwzh 07-Apr-94): KEYWORDS is a comma-separated list of labels."
+1.33 (kwzh 07-Apr-94): (interactive "P\nsSort by labels: ")
+1.33 (kwzh 07-Apr-94): (rmail-sort-from-summary
+1.33 (kwzh 07-Apr-94): (function (lambda (reverse)
+1.117 (gerd 07-May-01): (rmail-sort-by-labels reverse labels)))
+1.33 (kwzh 07-Apr-94): reverse))
+1.33 (kwzh 07-Apr-94):
+1.18 (rms 22-Jun-93): (defun rmail-sort-from-summary (sortfun reverse)
+1.18 (rms 22-Jun-93): "Sort Rmail messages from Summary buffer and update it after sorting."
+1.18 (rms 22-Jun-93): (require 'rmailsort)
+1.30 (kwzh 30-Mar-94): (let ((selwin (selected-window)))
+1.30 (kwzh 30-Mar-94): (unwind-protect
+1.30 (kwzh 30-Mar-94): (progn (pop-to-buffer rmail-buffer)
+1.30 (kwzh 30-Mar-94): (funcall sortfun reverse))
+1.30 (kwzh 30-Mar-94): (select-window selwin))))
+1.2 (eric 30-May-92):
+1.113 (fx 25-May-00): (provide 'rmailsum)
+1.113 (fx 25-May-00):
+1.150 (monnier 10-Apr-08): ;; arch-tag: 556079ee-75c1-47f5-9884-2e0a0bc6c5a1
+1.2 (eric 30-May-92): ;;; rmailsum.el ends here