diff options
| author | Paul Reilly | 2008-09-15 20:40:23 +0000 |
|---|---|---|
| committer | Paul Reilly | 2008-09-15 20:40:23 +0000 |
| commit | 133fc7dcdba7fa30962bb548cbfcc6d055c304e6 (patch) | |
| tree | 65ee2bd52f64792259a0e795265209321751a029 | |
| parent | 84a056f85eebb23763a9e502348f302f82b75fd4 (diff) | |
| download | emacs-133fc7dcdba7fa30962bb548cbfcc6d055c304e6.tar.gz emacs-133fc7dcdba7fa30962bb548cbfcc6d055c304e6.zip | |
Rmail/mbox merge abandoned. Remove stale files.
| -rw-r--r-- | lisp/mail/mbox-trunk-annotations/rmail.el.annotation | 4286 | ||||
| -rw-r--r-- | lisp/mail/mbox-trunk-annotations/rmailedit.el.annotation | 164 | ||||
| -rw-r--r-- | lisp/mail/mbox-trunk-annotations/rmailkwd.el.annotation | 290 | ||||
| -rw-r--r-- | lisp/mail/mbox-trunk-annotations/rmailmsc.el.annotation | 67 | ||||
| -rw-r--r-- | lisp/mail/mbox-trunk-annotations/rmailout.el.annotation | 420 | ||||
| -rw-r--r-- | lisp/mail/mbox-trunk-annotations/rmailsort.el.annotation | 250 |
6 files changed, 0 insertions, 5477 deletions
diff --git a/lisp/mail/mbox-trunk-annotations/rmail.el.annotation b/lisp/mail/mbox-trunk-annotations/rmail.el.annotation deleted file mode 100644 index ca937834658..00000000000 --- a/lisp/mail/mbox-trunk-annotations/rmail.el.annotation +++ /dev/null | |||
| @@ -1,4286 +0,0 @@ | |||
| 1 | 1.348 (pj 15-Jul-01): ;;; rmail.el --- main code of "RMAIL" mail reader for Emacs | ||
| 2 | 1.12 (eric 30-May-92): | ||
| 3 | 1.407 (ttn 06-Aug-05): ;; Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, | ||
| 4 | 1.444 (miles 08-Jan-08): ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 | ||
| 5 | 1.440 (gm 12-Oct-07): ;; Free Software Foundation, Inc. | ||
| 6 | 1.18 (eric 22-Jul-92): | ||
| 7 | 1.13 (eric 16-Jul-92): ;; Maintainer: FSF | ||
| 8 | 1.15 (eric 17-Jul-92): ;; Keywords: mail | ||
| 9 | 1.1 (roland 13-May-91): | ||
| 10 | 1.1 (roland 13-May-91): ;; This file is part of GNU Emacs. | ||
| 11 | 1.1 (roland 13-May-91): | ||
| 12 | 1.454 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 13 | 1.1 (roland 13-May-91): ;; it under the terms of the GNU General Public License as published by | ||
| 14 | 1.454 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or | ||
| 15 | 1.454 (gm 06-May-08): ;; (at your option) any later version. | ||
| 16 | 1.1 (roland 13-May-91): | ||
| 17 | 1.1 (roland 13-May-91): ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 18 | 1.1 (roland 13-May-91): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | 1.1 (roland 13-May-91): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | 1.1 (roland 13-May-91): ;; GNU General Public License for more details. | ||
| 21 | 1.1 (roland 13-May-91): | ||
| 22 | 1.1 (roland 13-May-91): ;; You should have received a copy of the GNU General Public License | ||
| 23 | 1.454 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 24 | 1.1 (roland 13-May-91): | ||
| 25 | 1.348 (pj 15-Jul-01): ;;; Commentary: | ||
| 26 | 1.348 (pj 15-Jul-01): | ||
| 27 | 1.13 (eric 16-Jul-92): ;;; Code: | ||
| 28 | 1.1 (roland 13-May-91): | ||
| 29 | 1.1 (roland 13-May-91): ;; Souped up by shane@mit-ajax based on ideas of rlk@athena.mit.edu | ||
| 30 | 1.1 (roland 13-May-91): ;; New features include attribute and keyword support, message | ||
| 31 | 1.1 (roland 13-May-91): ;; selection by dispatch table, summary by attributes and keywords, | ||
| 32 | 1.1 (roland 13-May-91): ;; expunging by dispatch table, sticky options for file commands. | ||
| 33 | 1.1 (roland 13-May-91): | ||
| 34 | 1.39 (rms 09-Mar-93): ;; Extended by Bob Weiner of Motorola | ||
| 35 | 1.39 (rms 09-Mar-93): ;; New features include: rmail and rmail-summary buffers remain | ||
| 36 | 1.39 (rms 09-Mar-93): ;; synchronized and key bindings basically operate the same way in both | ||
| 37 | 1.39 (rms 09-Mar-93): ;; buffers, summary by topic or by regular expression, rmail-reply-prefix | ||
| 38 | 1.39 (rms 09-Mar-93): ;; variable, and a bury rmail buffer (wipe) command. | ||
| 39 | 1.39 (rms 09-Mar-93): ;; | ||
| 40 | 1.39 (rms 09-Mar-93): | ||
| 41 | 1.1 (roland 13-May-91): (require 'mail-utils) | ||
| 42 | 1.349 (eliz 16-Sep-01): (eval-when-compile (require 'mule-util)) ; for detect-coding-with-priority | ||
| 43 | 1.39 (rms 09-Mar-93): | ||
| 44 | 1.414 (lektu 29-Aug-05): (defvar deleted-head) | ||
| 45 | 1.414 (lektu 29-Aug-05): (defvar font-lock-fontified) | ||
| 46 | 1.414 (lektu 29-Aug-05): (defvar mail-abbrev-syntax-table) | ||
| 47 | 1.414 (lektu 29-Aug-05): (defvar mail-abbrevs) | ||
| 48 | 1.414 (lektu 29-Aug-05): (defvar messages-head) | ||
| 49 | 1.414 (lektu 29-Aug-05): (defvar rmail-use-spam-filter) | ||
| 50 | 1.414 (lektu 29-Aug-05): (defvar rsf-beep) | ||
| 51 | 1.414 (lektu 29-Aug-05): (defvar rsf-sleep-after-message) | ||
| 52 | 1.414 (lektu 29-Aug-05): (defvar total-messages) | ||
| 53 | 1.423 (eliz 25-Mar-06): (defvar tool-bar-map) | ||
| 54 | 1.414 (lektu 29-Aug-05): | ||
| 55 | 1.39 (rms 09-Mar-93): ; These variables now declared in paths.el. | ||
| 56 | 1.1 (roland 13-May-91): ;(defvar rmail-spool-directory "/usr/spool/mail/" | ||
| 57 | 1.1 (roland 13-May-91): ; "This is the name of the directory used by the system mailer for\n\ | ||
| 58 | 1.200 (rms 12-Oct-96): ;delivering new mail. Its name should end with a slash.") | ||
| 59 | 1.1 (roland 13-May-91): ;(defvar rmail-file-name | ||
| 60 | 1.1 (roland 13-May-91): ; (expand-file-name "~/RMAIL") | ||
| 61 | 1.1 (roland 13-May-91): ; "") | ||
| 62 | 1.1 (roland 13-May-91): | ||
| 63 | 1.219 (rms 03-May-97): (defgroup rmail nil | ||
| 64 | 1.219 (rms 03-May-97): "Mail reader for Emacs." | ||
| 65 | 1.219 (rms 03-May-97): :group 'mail) | ||
| 66 | 1.219 (rms 03-May-97): | ||
| 67 | 1.219 (rms 03-May-97): (defgroup rmail-retrieve nil | ||
| 68 | 1.219 (rms 03-May-97): "Rmail retrieval options." | ||
| 69 | 1.219 (rms 03-May-97): :prefix "rmail-" | ||
| 70 | 1.219 (rms 03-May-97): :group 'rmail) | ||
| 71 | 1.219 (rms 03-May-97): | ||
| 72 | 1.219 (rms 03-May-97): (defgroup rmail-files nil | ||
| 73 | 1.219 (rms 03-May-97): "Rmail files." | ||
| 74 | 1.219 (rms 03-May-97): :prefix "rmail-" | ||
| 75 | 1.219 (rms 03-May-97): :group 'rmail) | ||
| 76 | 1.219 (rms 03-May-97): | ||
| 77 | 1.219 (rms 03-May-97): (defgroup rmail-headers nil | ||
| 78 | 1.219 (rms 03-May-97): "Rmail header options." | ||
| 79 | 1.219 (rms 03-May-97): :prefix "rmail-" | ||
| 80 | 1.219 (rms 03-May-97): :group 'rmail) | ||
| 81 | 1.219 (rms 03-May-97): | ||
| 82 | 1.219 (rms 03-May-97): (defgroup rmail-reply nil | ||
| 83 | 1.219 (rms 03-May-97): "Rmail reply options." | ||
| 84 | 1.219 (rms 03-May-97): :prefix "rmail-" | ||
| 85 | 1.219 (rms 03-May-97): :group 'rmail) | ||
| 86 | 1.219 (rms 03-May-97): | ||
| 87 | 1.219 (rms 03-May-97): (defgroup rmail-summary nil | ||
| 88 | 1.219 (rms 03-May-97): "Rmail summary options." | ||
| 89 | 1.219 (rms 03-May-97): :prefix "rmail-" | ||
| 90 | 1.219 (rms 03-May-97): :prefix "rmail-summary-" | ||
| 91 | 1.219 (rms 03-May-97): :group 'rmail) | ||
| 92 | 1.219 (rms 03-May-97): | ||
| 93 | 1.219 (rms 03-May-97): (defgroup rmail-output nil | ||
| 94 | 1.219 (rms 03-May-97): "Output message to a file." | ||
| 95 | 1.219 (rms 03-May-97): :prefix "rmail-output-" | ||
| 96 | 1.219 (rms 03-May-97): :prefix "rmail-" | ||
| 97 | 1.219 (rms 03-May-97): :group 'rmail) | ||
| 98 | 1.219 (rms 03-May-97): | ||
| 99 | 1.337 (gerd 07-May-01): (defgroup rmail-edit nil | ||
| 100 | 1.337 (gerd 07-May-01): "Rmail editing." | ||
| 101 | 1.337 (gerd 07-May-01): :prefix "rmail-edit-" | ||
| 102 | 1.337 (gerd 07-May-01): :group 'rmail) | ||
| 103 | 1.337 (gerd 07-May-01): | ||
| 104 | 1.395 (eliz 15-Jan-05): (defgroup rmail-obsolete nil | ||
| 105 | 1.395 (eliz 15-Jan-05): "Rmail obsolete customization variables." | ||
| 106 | 1.395 (eliz 15-Jan-05): :group 'rmail) | ||
| 107 | 1.219 (rms 03-May-97): | ||
| 108 | 1.259 (kwzh 08-Apr-98): (defcustom rmail-movemail-program nil | ||
| 109 | 1.397 (rms 18-Mar-05): "If non-nil, the file name of the `movemail' program." | ||
| 110 | 1.259 (kwzh 08-Apr-98): :group 'rmail-retrieve | ||
| 111 | 1.286 (schwab 18-Sep-98): :type '(choice (const nil) string)) | ||
| 112 | 1.110 (rms 13-Jul-94): | ||
| 113 | 1.219 (rms 03-May-97): (defcustom rmail-pop-password nil | ||
| 114 | 1.397 (rms 18-Mar-05): "*Password to use when reading mail from POP server. | ||
| 115 | 1.397 (rms 18-Mar-05): Please use `rmail-remote-password' instead." | ||
| 116 | 1.219 (rms 03-May-97): :type '(choice (string :tag "Password") | ||
| 117 | 1.219 (rms 03-May-97): (const :tag "Not Required" nil)) | ||
| 118 | 1.395 (eliz 15-Jan-05): :group 'rmail-obsolete) | ||
| 119 | 1.219 (rms 03-May-97): | ||
| 120 | 1.219 (rms 03-May-97): (defcustom rmail-pop-password-required nil | ||
| 121 | 1.407 (ttn 06-Aug-05): "*Non-nil if a password is required when reading mail from a POP server. | ||
| 122 | 1.397 (rms 18-Mar-05): Please use rmail-remote-password-required instead." | ||
| 123 | 1.219 (rms 03-May-97): :type 'boolean | ||
| 124 | 1.395 (eliz 15-Jan-05): :group 'rmail-obsolete) | ||
| 125 | 1.395 (eliz 15-Jan-05): | ||
| 126 | 1.395 (eliz 15-Jan-05): (defcustom rmail-remote-password nil | ||
| 127 | 1.397 (rms 18-Mar-05): "*Password to use when reading mail from a remote server. | ||
| 128 | 1.397 (rms 18-Mar-05): This setting is ignored for mailboxes whose URL already contains a password." | ||
| 129 | 1.395 (eliz 15-Jan-05): :type '(choice (string :tag "Password") | ||
| 130 | 1.395 (eliz 15-Jan-05): (const :tag "Not Required" nil)) | ||
| 131 | 1.395 (eliz 15-Jan-05): :set-after '(rmail-pop-password) | ||
| 132 | 1.395 (eliz 15-Jan-05): :set #'(lambda (symbol value) | ||
| 133 | 1.396 (kfstorm 09-Feb-05): (set-default symbol | ||
| 134 | 1.395 (eliz 15-Jan-05): (if (and (not value) | ||
| 135 | 1.395 (eliz 15-Jan-05): (boundp 'rmail-pop-password) | ||
| 136 | 1.395 (eliz 15-Jan-05): rmail-pop-password) | ||
| 137 | 1.395 (eliz 15-Jan-05): rmail-pop-password | ||
| 138 | 1.395 (eliz 15-Jan-05): value)) | ||
| 139 | 1.395 (eliz 15-Jan-05): (setq rmail-pop-password nil)) | ||
| 140 | 1.395 (eliz 15-Jan-05): :group 'rmail-retrieve | ||
| 141 | 1.396 (kfstorm 09-Feb-05): :version "22.1") | ||
| 142 | 1.395 (eliz 15-Jan-05): | ||
| 143 | 1.395 (eliz 15-Jan-05): (defcustom rmail-remote-password-required nil | ||
| 144 | 1.395 (eliz 15-Jan-05): "*Non-nil if a password is required when reading mail from a remote server." | ||
| 145 | 1.395 (eliz 15-Jan-05): :type 'boolean | ||
| 146 | 1.395 (eliz 15-Jan-05): :set-after '(rmail-pop-password-required) | ||
| 147 | 1.395 (eliz 15-Jan-05): :set #'(lambda (symbol value) | ||
| 148 | 1.396 (kfstorm 09-Feb-05): (set-default symbol | ||
| 149 | 1.395 (eliz 15-Jan-05): (if (and (not value) | ||
| 150 | 1.395 (eliz 15-Jan-05): (boundp 'rmail-pop-password-required) | ||
| 151 | 1.395 (eliz 15-Jan-05): rmail-pop-password-required) | ||
| 152 | 1.395 (eliz 15-Jan-05): rmail-pop-password-required | ||
| 153 | 1.395 (eliz 15-Jan-05): value)) | ||
| 154 | 1.395 (eliz 15-Jan-05): (setq rmail-pop-password-required nil)) | ||
| 155 | 1.395 (eliz 15-Jan-05): :group 'rmail-retrieve | ||
| 156 | 1.396 (kfstorm 09-Feb-05): :version "22.1") | ||
| 157 | 1.183 (rms 26-Apr-96): | ||
| 158 | 1.256 (kwzh 06-Apr-98): (defcustom rmail-movemail-flags nil | ||
| 159 | 1.257 (kwzh 06-Apr-98): "*List of flags to pass to movemail. | ||
| 160 | 1.257 (kwzh 06-Apr-98): Most commonly used to specify `-g' to enable GSS-API authentication | ||
| 161 | 1.257 (kwzh 06-Apr-98): or `-k' to enable Kerberos authentication." | ||
| 162 | 1.260 (schwab 14-Apr-98): :type '(repeat string) | ||
| 163 | 1.262 (done 20-Apr-98): :group 'rmail-retrieve | ||
| 164 | 1.262 (done 20-Apr-98): :version "20.3") | ||
| 165 | 1.256 (kwzh 06-Apr-98): | ||
| 166 | 1.395 (eliz 15-Jan-05): (defvar rmail-remote-password-error "invalid usercode or password\\| | ||
| 167 | 1.395 (eliz 15-Jan-05): unknown user name or bad password\\|Authentication failed\\|MU_ERR_AUTH_FAILURE" | ||
| 168 | 1.395 (eliz 15-Jan-05): "Regular expression matching incorrect-password POP or IMAP server error | ||
| 169 | 1.395 (eliz 15-Jan-05): messages. | ||
| 170 | 1.230 (rms 25-Jul-97): If you get an incorrect-password error that this expression does not match, | ||
| 171 | 1.230 (rms 25-Jul-97): please report it with \\[report-emacs-bug].") | ||
| 172 | 1.230 (rms 25-Jul-97): | ||
| 173 | 1.395 (eliz 15-Jan-05): (defvar rmail-encoded-remote-password nil) | ||
| 174 | 1.284 (rms 05-Aug-98): | ||
| 175 | 1.219 (rms 03-May-97): (defcustom rmail-preserve-inbox nil | ||
| 176 | 1.397 (rms 18-Mar-05): "*Non-nil means leave incoming mail in the user's inbox--don't delete it." | ||
| 177 | 1.219 (rms 03-May-97): :type 'boolean | ||
| 178 | 1.219 (rms 03-May-97): :group 'rmail-retrieve) | ||
| 179 | 1.205 (rms 21-Jan-97): | ||
| 180 | 1.395 (eliz 15-Jan-05): (defcustom rmail-movemail-search-path nil | ||
| 181 | 1.395 (eliz 15-Jan-05): "*List of directories to search for movemail (in addition to `exec-path')." | ||
| 182 | 1.395 (eliz 15-Jan-05): :group 'rmail-retrieve | ||
| 183 | 1.395 (eliz 15-Jan-05): :type '(repeat (directory))) | ||
| 184 | 1.395 (eliz 15-Jan-05): | ||
| 185 | 1.442 (dann 25-Nov-07): (declare-function mail-position-on-field "sendmail" (field &optional soft)) | ||
| 186 | 1.442 (dann 25-Nov-07): (declare-function mail-text-start "sendmail" ()) | ||
| 187 | 1.442 (dann 25-Nov-07): (declare-function rmail-update-summary "rmailsum" (&rest ignore)) | ||
| 188 | 1.442 (dann 25-Nov-07): | ||
| 189 | 1.395 (eliz 15-Jan-05): (defun rmail-probe (prog) | ||
| 190 | 1.397 (rms 18-Mar-05): "Determine what flavor of movemail PROG is. | ||
| 191 | 1.397 (rms 18-Mar-05): We do this by executing it with `--version' and analyzing its output." | ||
| 192 | 1.395 (eliz 15-Jan-05): (with-temp-buffer | ||
| 193 | 1.395 (eliz 15-Jan-05): (let ((tbuf (current-buffer))) | ||
| 194 | 1.395 (eliz 15-Jan-05): (buffer-disable-undo tbuf) | ||
| 195 | 1.395 (eliz 15-Jan-05): (call-process prog nil tbuf nil "--version") | ||
| 196 | 1.395 (eliz 15-Jan-05): (if (not (buffer-modified-p tbuf)) | ||
| 197 | 1.395 (eliz 15-Jan-05): ;; Should not happen... | ||
| 198 | 1.395 (eliz 15-Jan-05): nil | ||
| 199 | 1.395 (eliz 15-Jan-05): (goto-char (point-min)) | ||
| 200 | 1.395 (eliz 15-Jan-05): (cond | ||
| 201 | 1.395 (eliz 15-Jan-05): ((looking-at ".*movemail: invalid option") | ||
| 202 | 1.395 (eliz 15-Jan-05): 'emacs) ;; Possibly... | ||
| 203 | 1.395 (eliz 15-Jan-05): ((looking-at "movemail (GNU Mailutils .*)") | ||
| 204 | 1.395 (eliz 15-Jan-05): 'mailutils) | ||
| 205 | 1.395 (eliz 15-Jan-05): (t | ||
| 206 | 1.395 (eliz 15-Jan-05): ;; FIXME: | ||
| 207 | 1.395 (eliz 15-Jan-05): 'emacs)))))) | ||
| 208 | 1.395 (eliz 15-Jan-05): | ||
| 209 | 1.395 (eliz 15-Jan-05): (defun rmail-autodetect () | ||
| 210 | 1.438 (schwab 20-Aug-07): "Determine the file name of the `movemail' program and return its flavor. | ||
| 211 | 1.397 (rms 18-Mar-05): If `rmail-movemail-program' is non-nil, use it. | ||
| 212 | 1.397 (rms 18-Mar-05): Otherwise, look for `movemail' in the directories in | ||
| 213 | 1.397 (rms 18-Mar-05): `rmail-movemail-search-path', those in `exec-path', and `exec-directory'." | ||
| 214 | 1.395 (eliz 15-Jan-05): (if rmail-movemail-program | ||
| 215 | 1.395 (eliz 15-Jan-05): (rmail-probe rmail-movemail-program) | ||
| 216 | 1.395 (eliz 15-Jan-05): (catch 'scan | ||
| 217 | 1.395 (eliz 15-Jan-05): (dolist (dir (append rmail-movemail-search-path exec-path | ||
| 218 | 1.395 (eliz 15-Jan-05): (list exec-directory))) | ||
| 219 | 1.395 (eliz 15-Jan-05): (when (and dir (file-accessible-directory-p dir)) | ||
| 220 | 1.452 (gm 20-Feb-08): ;; Previously, this didn't have to work on Windows, because | ||
| 221 | 1.452 (gm 20-Feb-08): ;; rmail-insert-inbox-text before r1.439 fell back to using | ||
| 222 | 1.452 (gm 20-Feb-08): ;; (expand-file-name "movemail" exec-directory) and just | ||
| 223 | 1.452 (gm 20-Feb-08): ;; assuming it would work. | ||
| 224 | 1.452 (gm 20-Feb-08): ;; http://lists.gnu.org/archive/html/bug-gnu-emacs/2008-02/msg00087.html | ||
| 225 | 1.452 (gm 20-Feb-08): (let ((progname (expand-file-name | ||
| 226 | 1.452 (gm 20-Feb-08): (concat "movemail" | ||
| 227 | 1.452 (gm 20-Feb-08): (if (memq system-type '(ms-dos windows-nt)) | ||
| 228 | 1.452 (gm 20-Feb-08): ".exe")) dir))) | ||
| 229 | 1.395 (eliz 15-Jan-05): (when (and (not (file-directory-p progname)) | ||
| 230 | 1.395 (eliz 15-Jan-05): (file-executable-p progname)) | ||
| 231 | 1.395 (eliz 15-Jan-05): (let ((x (rmail-probe progname))) | ||
| 232 | 1.395 (eliz 15-Jan-05): (when x | ||
| 233 | 1.395 (eliz 15-Jan-05): (setq rmail-movemail-program progname) | ||
| 234 | 1.395 (eliz 15-Jan-05): (throw 'scan x)))))))))) | ||
| 235 | 1.395 (eliz 15-Jan-05): | ||
| 236 | 1.395 (eliz 15-Jan-05): (defvar rmail-movemail-variant-in-use nil | ||
| 237 | 1.395 (eliz 15-Jan-05): "The movemail variant currently in use. Known variants are: | ||
| 238 | 1.395 (eliz 15-Jan-05): | ||
| 239 | 1.395 (eliz 15-Jan-05): `emacs' Means any implementation, compatible with the native Emacs one. | ||
| 240 | 1.395 (eliz 15-Jan-05): This is the default; | ||
| 241 | 1.395 (eliz 15-Jan-05): `mailutils' Means GNU mailutils implementation, capable of handling full | ||
| 242 | 1.435 (ttn 09-Jun-07): mail URLs as the source mailbox.") | ||
| 243 | 1.395 (eliz 15-Jan-05): | ||
| 244 | 1.395 (eliz 15-Jan-05): ;;;###autoload | ||
| 245 | 1.395 (eliz 15-Jan-05): (defun rmail-movemail-variant-p (&rest variants) | ||
| 246 | 1.395 (eliz 15-Jan-05): "Return t if the current movemail variant is any of VARIANTS. | ||
| 247 | 1.395 (eliz 15-Jan-05): Currently known variants are 'emacs and 'mailutils." | ||
| 248 | 1.395 (eliz 15-Jan-05): (when (not rmail-movemail-variant-in-use) | ||
| 249 | 1.395 (eliz 15-Jan-05): ;; Autodetect | ||
| 250 | 1.395 (eliz 15-Jan-05): (setq rmail-movemail-variant-in-use (rmail-autodetect))) | ||
| 251 | 1.395 (eliz 15-Jan-05): (not (null (member rmail-movemail-variant-in-use variants)))) | ||
| 252 | 1.395 (eliz 15-Jan-05): | ||
| 253 | 1.439 (gm 22-Aug-07): ;; Call for effect, to set rmail-movemail-program (if not set by the | ||
| 254 | 1.439 (gm 22-Aug-07): ;; user), and rmail-movemail-variant-in-use. Used by various functions. | ||
| 255 | 1.439 (gm 22-Aug-07): ;; I'm not sure if M-x rmail is the only entry point to this package. | ||
| 256 | 1.439 (gm 22-Aug-07): ;; If so, this can be moved there. | ||
| 257 | 1.439 (gm 22-Aug-07): (rmail-movemail-variant-p) | ||
| 258 | 1.439 (gm 22-Aug-07): | ||
| 259 | 1.1 (roland 13-May-91): ;;;###autoload | ||
| 260 | 1.219 (rms 03-May-97): (defcustom rmail-dont-reply-to-names nil "\ | ||
| 261 | 1.356 (pmr-sav 19-Mar-02): *A regexp specifying addresses to prune from a reply message. | ||
| 262 | 1.356 (pmr-sav 19-Mar-02): A value of nil means exclude your own email address as an address | ||
| 263 | 1.283 (rms 28-Jul-98): plus whatever is specified by `rmail-default-dont-reply-to-names'." | ||
| 264 | 1.219 (rms 03-May-97): :type '(choice regexp (const :tag "Your Name" nil)) | ||
| 265 | 1.219 (rms 03-May-97): :group 'rmail-reply) | ||
| 266 | 1.1 (roland 13-May-91): | ||
| 267 | 1.1 (roland 13-May-91): ;;;###autoload | ||
| 268 | 1.384 (uid65627 16-Feb-04): (defvar rmail-default-dont-reply-to-names "\\`info-" "\ | ||
| 269 | 1.384 (uid65627 16-Feb-04): A regular expression specifying part of the default value of the | ||
| 270 | 1.384 (uid65627 16-Feb-04): variable `rmail-dont-reply-to-names', for when the user does not set | ||
| 271 | 1.1 (roland 13-May-91): `rmail-dont-reply-to-names' explicitly. (The other part of the default | ||
| 272 | 1.356 (pmr-sav 19-Mar-02): value is the user's email address and name.) | ||
| 273 | 1.53 (rms 30-Jun-93): It is useful to set this variable in the site customization file.") | ||
| 274 | 1.1 (roland 13-May-91): | ||
| 275 | 1.1 (roland 13-May-91): ;;;###autoload | ||
| 276 | 1.328 (gerd 29-Jan-01): (defcustom rmail-ignored-headers | ||
| 277 | 1.399 (rms 17-Apr-05): (concat "^via:\\|^mail-from:\\|^origin:\\|^references:\\|^sender:" | ||
| 278 | 1.328 (gerd 29-Jan-01): "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:" | ||
| 279 | 1.328 (gerd 29-Jan-01): "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:" | ||
| 280 | 1.328 (gerd 29-Jan-01): "\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:" | ||
| 281 | 1.371 (jpw 15-May-03): "\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:\\|^face:" | ||
| 282 | 1.408 (rms 09-Aug-05): "\\|^x-mailer:\\|^delivered-to:\\|^lines:" | ||
| 283 | 1.328 (gerd 29-Jan-01): "\\|^content-transfer-encoding:\\|^x-coding-system:" | ||
| 284 | 1.328 (gerd 29-Jan-01): "\\|^return-path:\\|^errors-to:\\|^return-receipt-to:" | ||
| 285 | 1.328 (gerd 29-Jan-01): "\\|^precedence:\\|^list-help:\\|^list-post:\\|^list-subscribe:" | ||
| 286 | 1.328 (gerd 29-Jan-01): "\\|^list-id:\\|^list-unsubscribe:\\|^list-archive:" | ||
| 287 | 1.413 (rms 15-Aug-05): "\\|^content-length:\\|^nntp-posting-date:\\|^user-agent" | ||
| 288 | 1.413 (rms 15-Aug-05): "\\|^importance:\\|^envelope-to:\\|^delivery-date\\|^openpgp:" | ||
| 289 | 1.421 (rms 11-Mar-06): "\\|^mbox-line:\\|^cancel-lock:\\|^DomainKey-Signature:" | ||
| 290 | 1.413 (rms 15-Aug-05): "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:" | ||
| 291 | 1.413 (rms 15-Aug-05): | ||
| 292 | 1.413 (rms 15-Aug-05): "\\|^x-.*:") | ||
| 293 | 1.302 (rms 05-Apr-99): "*Regexp to match header fields that Rmail should normally hide. | ||
| 294 | 1.413 (rms 15-Aug-05): \(See also `rmail-nonignored-headers', which overrides this regexp.) | ||
| 295 | 1.413 (rms 15-Aug-05): This variable is used for reformatting the message header, | ||
| 296 | 1.413 (rms 15-Aug-05): which normally happens once for each message, | ||
| 297 | 1.413 (rms 15-Aug-05): when you view the message for the first time in Rmail. | ||
| 298 | 1.413 (rms 15-Aug-05): To make a change in this variable take effect | ||
| 299 | 1.413 (rms 15-Aug-05): for a message that you have already viewed, | ||
| 300 | 1.413 (rms 15-Aug-05): go to that message and type \\[rmail-toggle-header] twice." | ||
| 301 | 1.413 (rms 15-Aug-05): :type 'regexp | ||
| 302 | 1.413 (rms 15-Aug-05): :group 'rmail-headers) | ||
| 303 | 1.413 (rms 15-Aug-05): | ||
| 304 | 1.413 (rms 15-Aug-05): (defcustom rmail-nonignored-headers "^x-spam-status:" | ||
| 305 | 1.413 (rms 15-Aug-05): "*Regexp to match X header fields that Rmail should show. | ||
| 306 | 1.413 (rms 15-Aug-05): This regexp overrides `rmail-ignored-headers'; if both this regexp | ||
| 307 | 1.413 (rms 15-Aug-05): and that one match a certain header field, Rmail shows the field. | ||
| 308 | 1.448 (bastien1 10-Feb-08): If this is nil, ignore all header fields in `rmail-ignored-headers'. | ||
| 309 | 1.413 (rms 15-Aug-05): | ||
| 310 | 1.302 (rms 05-Apr-99): This variable is used for reformatting the message header, | ||
| 311 | 1.302 (rms 05-Apr-99): which normally happens once for each message, | ||
| 312 | 1.302 (rms 05-Apr-99): when you view the message for the first time in Rmail. | ||
| 313 | 1.302 (rms 05-Apr-99): To make a change in this variable take effect | ||
| 314 | 1.302 (rms 05-Apr-99): for a message that you have already viewed, | ||
| 315 | 1.302 (rms 05-Apr-99): go to that message and type \\[rmail-toggle-header] twice." | ||
| 316 | 1.448 (bastien1 10-Feb-08): :type '(choice (const nil) (regexp)) | ||
| 317 | 1.219 (rms 03-May-97): :group 'rmail-headers) | ||
| 318 | 1.1 (roland 13-May-91): | ||
| 319 | 1.1 (roland 13-May-91): ;;;###autoload | ||
| 320 | 1.219 (rms 03-May-97): (defcustom rmail-displayed-headers nil | ||
| 321 | 1.150 (rms 14-Apr-95): "*Regexp to match Header fields that Rmail should display. | ||
| 322 | 1.150 (rms 14-Apr-95): If nil, display all header fields except those matched by | ||
| 323 | 1.219 (rms 03-May-97): `rmail-ignored-headers'." | ||
| 324 | 1.219 (rms 03-May-97): :type '(choice regexp (const :tag "All")) | ||
| 325 | 1.219 (rms 03-May-97): :group 'rmail-headers) | ||
| 326 | 1.150 (rms 14-Apr-95): | ||
| 327 | 1.150 (rms 14-Apr-95): ;;;###autoload | ||
| 328 | 1.330 (rms 06-Mar-01): (defcustom rmail-retry-ignored-headers "^x-authentication-warning:" "\ | ||
| 329 | 1.219 (rms 03-May-97): *Headers that should be stripped when retrying a failed message." | ||
| 330 | 1.219 (rms 03-May-97): :type '(choice regexp (const nil :tag "None")) | ||
| 331 | 1.219 (rms 03-May-97): :group 'rmail-headers) | ||
| 332 | 1.128 (rms 23-Sep-94): | ||
| 333 | 1.128 (rms 23-Sep-94): ;;;###autoload | ||
| 334 | 1.219 (rms 03-May-97): (defcustom rmail-highlighted-headers "^From:\\|^Subject:" "\ | ||
| 335 | 1.112 (rms 30-Jul-94): *Regexp to match Header fields that Rmail should normally highlight. | ||
| 336 | 1.451 (bastien1 13-Feb-08): A value of nil means don't highlight." | ||
| 337 | 1.219 (rms 03-May-97): :type 'regexp | ||
| 338 | 1.219 (rms 03-May-97): :group 'rmail-headers) | ||
| 339 | 1.97 (rms 23-Apr-94): | ||
| 340 | 1.421 (rms 11-Mar-06): (defface rmail-highlight | ||
| 341 | 1.446 (miles 01-Feb-08): '((t (:inherit highlight))) | ||
| 342 | 1.421 (rms 11-Mar-06): "Face to use for highlighting the most important header fields." | ||
| 343 | 1.421 (rms 11-Mar-06): :group 'rmail-headers | ||
| 344 | 1.421 (rms 11-Mar-06): :version "22.1") | ||
| 345 | 1.421 (rms 11-Mar-06): | ||
| 346 | 1.451 (bastien1 13-Feb-08): (defface rmail-header-name | ||
| 347 | 1.451 (bastien1 13-Feb-08): '((t (:inherit font-lock-function-name-face))) | ||
| 348 | 1.451 (bastien1 13-Feb-08): "Face to use for highlighting the header names." | ||
| 349 | 1.451 (bastien1 13-Feb-08): :group 'rmail-headers | ||
| 350 | 1.451 (bastien1 13-Feb-08): :version "23.1") | ||
| 351 | 1.112 (rms 30-Jul-94): | ||
| 352 | 1.112 (rms 30-Jul-94): ;;;###autoload | ||
| 353 | 1.219 (rms 03-May-97): (defcustom rmail-delete-after-output nil "\ | ||
| 354 | 1.219 (rms 03-May-97): *Non-nil means automatically delete a message that is copied to a file." | ||
| 355 | 1.219 (rms 03-May-97): :type 'boolean | ||
| 356 | 1.219 (rms 03-May-97): :group 'rmail-files) | ||
| 357 | 1.1 (roland 13-May-91): | ||
| 358 | 1.1 (roland 13-May-91): ;;;###autoload | ||
| 359 | 1.219 (rms 03-May-97): (defcustom rmail-primary-inbox-list nil "\ | ||
| 360 | 1.40 (rms 29-Mar-93): *List of files which are inboxes for user's primary mail file `~/RMAIL'. | ||
| 361 | 1.370 (lektu 06-May-03): nil means the default, which is (\"/usr/spool/mail/$USER\") | ||
| 362 | 1.40 (rms 29-Mar-93): \(the name varies depending on the operating system, | ||
| 363 | 1.219 (rms 03-May-97): and the value of the environment variable MAIL overrides it)." | ||
| 364 | 1.223 (rms 15-May-97): ;; Don't use backquote here, because we don't want to need it | ||
| 365 | 1.223 (rms 15-May-97): ;; at load time. | ||
| 366 | 1.223 (rms 15-May-97): :type (list 'choice '(const :tag "Default" nil) | ||
| 367 | 1.285 (kwzh 04-Sep-98): (list 'repeat ':value (list (or (getenv "MAIL") | ||
| 368 | 1.285 (kwzh 04-Sep-98): (concat "/var/spool/mail/" | ||
| 369 | 1.285 (kwzh 04-Sep-98): (getenv "USER")))) | ||
| 370 | 1.223 (rms 15-May-97): 'file)) | ||
| 371 | 1.219 (rms 03-May-97): :group 'rmail-retrieve | ||
| 372 | 1.219 (rms 03-May-97): :group 'rmail-files) | ||
| 373 | 1.219 (rms 03-May-97): | ||
| 374 | 1.219 (rms 03-May-97): ;;;###autoload | ||
| 375 | 1.219 (rms 03-May-97): (defcustom rmail-mail-new-frame nil | ||
| 376 | 1.390 (eliz 24-Apr-04): "*Non-nil means Rmail makes a new frame for composing outgoing mail. | ||
| 377 | 1.390 (eliz 24-Apr-04): This is handy if you want to preserve the window configuration of | ||
| 378 | 1.390 (eliz 24-Apr-04): the frame where you have the RMAIL buffer displayed." | ||
| 379 | 1.219 (rms 03-May-97): :type 'boolean | ||
| 380 | 1.219 (rms 03-May-97): :group 'rmail-reply) | ||
| 381 | 1.219 (rms 03-May-97): | ||
| 382 | 1.219 (rms 03-May-97): ;;;###autoload | ||
| 383 | 1.219 (rms 03-May-97): (defcustom rmail-secondary-file-directory "~/" | ||
| 384 | 1.219 (rms 03-May-97): "*Directory for additional secondary Rmail files." | ||
| 385 | 1.219 (rms 03-May-97): :type 'directory | ||
| 386 | 1.219 (rms 03-May-97): :group 'rmail-files) | ||
| 387 | 1.219 (rms 03-May-97): ;;;###autoload | ||
| 388 | 1.219 (rms 03-May-97): (defcustom rmail-secondary-file-regexp "\\.xmail$" | ||
| 389 | 1.219 (rms 03-May-97): "*Regexp for which files are secondary Rmail files." | ||
| 390 | 1.219 (rms 03-May-97): :type 'regexp | ||
| 391 | 1.219 (rms 03-May-97): :group 'rmail-files) | ||
| 392 | 1.91 (rms 18-Mar-94): | ||
| 393 | 1.161 (rms 10-Nov-95): ;;;###autoload | ||
| 394 | 1.322 (gerd 22-Nov-00): (defcustom rmail-confirm-expunge 'y-or-n-p | ||
| 395 | 1.313 (gerd 24-Mar-00): "*Whether and how to ask for confirmation before expunging deleted messages." | ||
| 396 | 1.313 (gerd 24-Mar-00): :type '(choice (const :tag "No confirmation" nil) | ||
| 397 | 1.313 (gerd 24-Mar-00): (const :tag "Confirm with y-or-n-p" y-or-n-p) | ||
| 398 | 1.313 (gerd 24-Mar-00): (const :tag "Confirm with yes-or-no-p" yes-or-no-p)) | ||
| 399 | 1.313 (gerd 24-Mar-00): :version "21.1" | ||
| 400 | 1.313 (gerd 24-Mar-00): :group 'rmail-files) | ||
| 401 | 1.313 (gerd 24-Mar-00): | ||
| 402 | 1.313 (gerd 24-Mar-00): ;;;###autoload | ||
| 403 | 1.161 (rms 10-Nov-95): (defvar rmail-mode-hook nil | ||
| 404 | 1.161 (rms 10-Nov-95): "List of functions to call when Rmail is invoked.") | ||
| 405 | 1.161 (rms 10-Nov-95): | ||
| 406 | 1.161 (rms 10-Nov-95): ;;;###autoload | ||
| 407 | 1.161 (rms 10-Nov-95): (defvar rmail-get-new-mail-hook nil | ||
| 408 | 1.161 (rms 10-Nov-95): "List of functions to call when Rmail has retrieved new mail.") | ||
| 409 | 1.161 (rms 10-Nov-95): | ||
| 410 | 1.161 (rms 10-Nov-95): ;;;###autoload | ||
| 411 | 1.315 (fx 14-May-00): (defcustom rmail-show-message-hook nil | ||
| 412 | 1.315 (fx 14-May-00): "List of functions to call when Rmail displays a message." | ||
| 413 | 1.315 (fx 14-May-00): :type 'hook | ||
| 414 | 1.360 (rms 19-May-02): :options '(goto-address) | ||
| 415 | 1.315 (fx 14-May-00): :group 'rmail) | ||
| 416 | 1.161 (rms 10-Nov-95): | ||
| 417 | 1.161 (rms 10-Nov-95): ;;;###autoload | ||
| 418 | 1.312 (gerd 02-Mar-00): (defvar rmail-quit-hook nil | ||
| 419 | 1.312 (gerd 02-Mar-00): "List of functions to call when quitting out of Rmail.") | ||
| 420 | 1.312 (gerd 02-Mar-00): | ||
| 421 | 1.312 (gerd 02-Mar-00): ;;;###autoload | ||
| 422 | 1.161 (rms 10-Nov-95): (defvar rmail-delete-message-hook nil | ||
| 423 | 1.161 (rms 10-Nov-95): "List of functions to call when Rmail deletes a message. | ||
| 424 | 1.161 (rms 10-Nov-95): When the hooks are called, the message has been marked deleted but is | ||
| 425 | 1.161 (rms 10-Nov-95): still the current message in the Rmail buffer.") | ||
| 426 | 1.161 (rms 10-Nov-95): | ||
| 427 | 1.39 (rms 09-Mar-93): ;; These may be altered by site-init.el to match the format of mmdf files | ||
| 428 | 1.39 (rms 09-Mar-93): ;; delimiting used on a given host (delim1 and delim2 from the config | ||
| 429 | 1.39 (rms 09-Mar-93): ;; files). | ||
| 430 | 1.1 (roland 13-May-91): | ||
| 431 | 1.226 (rms 01-Jun-97): (defvar rmail-mmdf-delim1 "^\001\001\001\001\n" | ||
| 432 | 1.368 (jpw 06-Jan-03): "Regexp marking the start of an mmdf message.") | ||
| 433 | 1.226 (rms 01-Jun-97): (defvar rmail-mmdf-delim2 "^\001\001\001\001\n" | ||
| 434 | 1.368 (jpw 06-Jan-03): "Regexp marking the end of an mmdf message.") | ||
| 435 | 1.1 (roland 13-May-91): | ||
| 436 | 1.259 (kwzh 08-Apr-98): (defcustom rmail-message-filter nil | ||
| 437 | 1.193 (rms 06-Aug-96): "If non-nil, a filter function for new messages in RMAIL. | ||
| 438 | 1.193 (rms 06-Aug-96): Called with region narrowed to the message, including headers, | ||
| 439 | 1.259 (kwzh 08-Apr-98): before obeying `rmail-ignored-headers'." | ||
| 440 | 1.259 (kwzh 08-Apr-98): :group 'rmail-headers | ||
| 441 | 1.432 (jpw 24-Feb-07): :type '(choice (const nil) function)) | ||
| 442 | 1.1 (roland 13-May-91): | ||
| 443 | 1.317 (fx 24-May-00): (defcustom rmail-automatic-folder-directives nil | ||
| 444 | 1.317 (fx 24-May-00): "List of directives specifying where to put a message. | ||
| 445 | 1.317 (fx 24-May-00): Each element of the list is of the form: | ||
| 446 | 1.317 (fx 24-May-00): | ||
| 447 | 1.317 (fx 24-May-00): (FOLDERNAME FIELD REGEXP [ FIELD REGEXP ] ... ) | ||
| 448 | 1.317 (fx 24-May-00): | ||
| 449 | 1.317 (fx 24-May-00): Where FOLDERNAME is the name of a BABYL format folder to put the | ||
| 450 | 1.317 (fx 24-May-00): message. If any of the field regexp's are nil, then it is ignored. | ||
| 451 | 1.317 (fx 24-May-00): | ||
| 452 | 1.317 (fx 24-May-00): If FOLDERNAME is \"/dev/null\", it is deleted. | ||
| 453 | 1.317 (fx 24-May-00): If FOLDERNAME is nil then it is deleted, and skipped. | ||
| 454 | 1.317 (fx 24-May-00): | ||
| 455 | 1.317 (fx 24-May-00): FIELD is the plain text name of a field in the message, such as | ||
| 456 | 1.317 (fx 24-May-00): \"subject\" or \"from\". A FIELD of \"to\" will automatically include | ||
| 457 | 1.317 (fx 24-May-00): all text from the \"cc\" field as well. | ||
| 458 | 1.317 (fx 24-May-00): | ||
| 459 | 1.317 (fx 24-May-00): REGEXP is an expression to match in the preceeding specified FIELD. | ||
| 460 | 1.317 (fx 24-May-00): FIELD/REGEXP pairs continue in the list. | ||
| 461 | 1.317 (fx 24-May-00): | ||
| 462 | 1.317 (fx 24-May-00): examples: | ||
| 463 | 1.317 (fx 24-May-00): (\"/dev/null\" \"from\" \"@spam.com\") ; delete all mail from spam.com | ||
| 464 | 1.323 (gerd 27-Nov-00): (\"RMS\" \"from\" \"rms@\") ; save all mail from RMS." | ||
| 465 | 1.323 (gerd 27-Nov-00): :group 'rmail | ||
| 466 | 1.323 (gerd 27-Nov-00): :version "21.1" | ||
| 467 | 1.323 (gerd 27-Nov-00): :type '(repeat (sexp :tag "Directive"))) | ||
| 468 | 1.358 (pot 06-May-02): | ||
| 469 | 1.39 (rms 09-Mar-93): (defvar rmail-reply-prefix "Re: " | ||
| 470 | 1.39 (rms 09-Mar-93): "String to prepend to Subject line when replying to a message.") | ||
| 471 | 1.39 (rms 09-Mar-93): | ||
| 472 | 1.211 (kwzh 23-Feb-97): ;; Some mailers use "Re(2):" or "Re^2:" or "Re: Re:" or "Re[2]:". | ||
| 473 | 1.422 (rms 18-Mar-06): ;; This pattern should catch all the common variants. | ||
| 474 | 1.422 (rms 18-Mar-06): ;; rms: I deleted the change to delete tags in square brackets | ||
| 475 | 1.422 (rms 18-Mar-06): ;; because they mess up RT tags. | ||
| 476 | 1.422 (rms 18-Mar-06): (defvar rmail-reply-regexp "\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*" | ||
| 477 | 1.193 (rms 06-Aug-96): "Regexp to delete from Subject line before inserting `rmail-reply-prefix'.") | ||
| 478 | 1.143 (kwzh 03-Feb-95): | ||
| 479 | 1.259 (kwzh 08-Apr-98): (defcustom rmail-display-summary nil | ||
| 480 | 1.259 (kwzh 08-Apr-98): "*If non-nil, Rmail always displays the summary buffer." | ||
| 481 | 1.259 (kwzh 08-Apr-98): :group 'rmail-summary | ||
| 482 | 1.259 (kwzh 08-Apr-98): :type 'boolean) | ||
| 483 | 1.259 (kwzh 08-Apr-98): | ||
| 484 | 1.259 (kwzh 08-Apr-98): (defvar rmail-inbox-list nil) | ||
| 485 | 1.259 (kwzh 08-Apr-98): (put 'rmail-inbox-list 'permanent-local t) | ||
| 486 | 1.1 (roland 13-May-91): | ||
| 487 | 1.1 (roland 13-May-91): (defvar rmail-keywords nil) | ||
| 488 | 1.259 (kwzh 08-Apr-98): (put 'rmail-keywords 'permanent-local t) | ||
| 489 | 1.1 (roland 13-May-91): | ||
| 490 | 1.234 (rms 24-Aug-97): (defvar rmail-buffer nil | ||
| 491 | 1.234 (rms 24-Aug-97): "The RMAIL buffer related to the current buffer. | ||
| 492 | 1.234 (rms 24-Aug-97): In an RMAIL buffer, this holds the RMAIL buffer itself. | ||
| 493 | 1.234 (rms 24-Aug-97): In a summary buffer, this holds the RMAIL buffer it is a summary for.") | ||
| 494 | 1.234 (rms 24-Aug-97): (put 'rmail-buffer 'permanent-local t) | ||
| 495 | 1.234 (rms 24-Aug-97): | ||
| 496 | 1.1 (roland 13-May-91): ;; Message counters and markers. Deleted flags. | ||
| 497 | 1.1 (roland 13-May-91): | ||
| 498 | 1.1 (roland 13-May-91): (defvar rmail-current-message nil) | ||
| 499 | 1.259 (kwzh 08-Apr-98): (put 'rmail-current-message 'permanent-local t) | ||
| 500 | 1.259 (kwzh 08-Apr-98): | ||
| 501 | 1.1 (roland 13-May-91): (defvar rmail-total-messages nil) | ||
| 502 | 1.259 (kwzh 08-Apr-98): (put 'rmail-total-messages 'permanent-local t) | ||
| 503 | 1.259 (kwzh 08-Apr-98): | ||
| 504 | 1.1 (roland 13-May-91): (defvar rmail-message-vector nil) | ||
| 505 | 1.259 (kwzh 08-Apr-98): (put 'rmail-message-vector 'permanent-local t) | ||
| 506 | 1.259 (kwzh 08-Apr-98): | ||
| 507 | 1.1 (roland 13-May-91): (defvar rmail-deleted-vector nil) | ||
| 508 | 1.259 (kwzh 08-Apr-98): (put 'rmail-deleted-vector 'permanent-local t) | ||
| 509 | 1.259 (kwzh 08-Apr-98): | ||
| 510 | 1.218 (rms 02-May-97): (defvar rmail-msgref-vector nil | ||
| 511 | 1.218 (rms 02-May-97): "In an Rmail buffer, a vector whose Nth element is a list (N). | ||
| 512 | 1.218 (rms 02-May-97): When expunging renumbers messages, these lists are modified | ||
| 513 | 1.218 (rms 02-May-97): by substituting the new message number into the existing list.") | ||
| 514 | 1.259 (kwzh 08-Apr-98): (put 'rmail-msgref-vector 'permanent-local t) | ||
| 515 | 1.1 (roland 13-May-91): | ||
| 516 | 1.98 (rms 24-Apr-94): (defvar rmail-overlay-list nil) | ||
| 517 | 1.259 (kwzh 08-Apr-98): (put 'rmail-overlay-list 'permanent-local t) | ||
| 518 | 1.132 (rms 07-Oct-94): | ||
| 519 | 1.1 (roland 13-May-91): ;; These are used by autoloaded rmail-summary. | ||
| 520 | 1.1 (roland 13-May-91): | ||
| 521 | 1.1 (roland 13-May-91): (defvar rmail-summary-buffer nil) | ||
| 522 | 1.234 (rms 24-Aug-97): (put 'rmail-summary-buffer 'permanent-local t) | ||
| 523 | 1.1 (roland 13-May-91): (defvar rmail-summary-vector nil) | ||
| 524 | 1.234 (rms 24-Aug-97): (put 'rmail-summary-vector 'permanent-local t) | ||
| 525 | 1.1 (roland 13-May-91): | ||
| 526 | 1.259 (kwzh 08-Apr-98): (defvar rmail-view-buffer nil | ||
| 527 | 1.259 (kwzh 08-Apr-98): "Buffer which holds RMAIL message for MIME displaying.") | ||
| 528 | 1.259 (kwzh 08-Apr-98): (put 'rmail-view-buffer 'permanent-local t) | ||
| 529 | 1.259 (kwzh 08-Apr-98): | ||
| 530 | 1.1 (roland 13-May-91): ;; `Sticky' default variables. | ||
| 531 | 1.1 (roland 13-May-91): | ||
| 532 | 1.1 (roland 13-May-91): ;; Last individual label specified to a or k. | ||
| 533 | 1.1 (roland 13-May-91): (defvar rmail-last-label nil) | ||
| 534 | 1.259 (kwzh 08-Apr-98): (put 'rmail-last-label 'permanent-local t) | ||
| 535 | 1.259 (kwzh 08-Apr-98): | ||
| 536 | 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. | ||
| 537 | 1.1 (roland 13-May-91): (defvar rmail-last-multi-labels nil) | ||
| 538 | 1.259 (kwzh 08-Apr-98): | ||
| 539 | 1.39 (rms 09-Mar-93): (defvar rmail-last-regexp nil) | ||
| 540 | 1.259 (kwzh 08-Apr-98): (put 'rmail-last-regexp 'permanent-local t) | ||
| 541 | 1.259 (kwzh 08-Apr-98): | ||
| 542 | 1.219 (rms 03-May-97): (defcustom rmail-default-file "~/xmail" | ||
| 543 | 1.219 (rms 03-May-97): "*Default file name for \\[rmail-output]." | ||
| 544 | 1.219 (rms 03-May-97): :type 'file | ||
| 545 | 1.219 (rms 03-May-97): :group 'rmail-files) | ||
| 546 | 1.219 (rms 03-May-97): (defcustom rmail-default-rmail-file "~/XMAIL" | ||
| 547 | 1.219 (rms 03-May-97): "*Default file name for \\[rmail-output-to-rmail-file]." | ||
| 548 | 1.219 (rms 03-May-97): :type 'file | ||
| 549 | 1.219 (rms 03-May-97): :group 'rmail-files) | ||
| 550 | 1.270 (rms 23-May-98): (defcustom rmail-default-body-file "~/mailout" | ||
| 551 | 1.270 (rms 23-May-98): "*Default file name for \\[rmail-output-body-to-file]." | ||
| 552 | 1.270 (rms 23-May-98): :type 'file | ||
| 553 | 1.270 (rms 23-May-98): :group 'rmail-files | ||
| 554 | 1.270 (rms 23-May-98): :version "20.3") | ||
| 555 | 1.10 (jimb 19-Apr-92): | ||
| 556 | 1.259 (kwzh 08-Apr-98): ;; Mule and MIME related variables. | ||
| 557 | 1.259 (kwzh 08-Apr-98): | ||
| 558 | 1.259 (kwzh 08-Apr-98): ;;;###autoload | ||
| 559 | 1.259 (kwzh 08-Apr-98): (defvar rmail-file-coding-system nil | ||
| 560 | 1.259 (kwzh 08-Apr-98): "Coding system used in RMAIL file. | ||
| 561 | 1.259 (kwzh 08-Apr-98): | ||
| 562 | 1.259 (kwzh 08-Apr-98): This is set to nil by default.") | ||
| 563 | 1.259 (kwzh 08-Apr-98): | ||
| 564 | 1.259 (kwzh 08-Apr-98): ;;;###autoload | ||
| 565 | 1.259 (kwzh 08-Apr-98): (defcustom rmail-enable-mime nil | ||
| 566 | 1.259 (kwzh 08-Apr-98): "*If non-nil, RMAIL uses MIME feature. | ||
| 567 | 1.259 (kwzh 08-Apr-98): If the value is t, RMAIL automatically shows MIME decoded message. | ||
| 568 | 1.259 (kwzh 08-Apr-98): If the value is neither t nor nil, RMAIL does not show MIME decoded message | ||
| 569 | 1.419 (handa 19-Jan-06): until a user explicitly requires it. | ||
| 570 | 1.419 (handa 19-Jan-06): | ||
| 571 | 1.419 (handa 19-Jan-06): Even if the value is non-nil, you can't use MIME feature | ||
| 572 | 1.419 (handa 19-Jan-06): if the feature specified by `rmail-mime-feature' is not available | ||
| 573 | 1.419 (handa 19-Jan-06): in your session." | ||
| 574 | 1.259 (kwzh 08-Apr-98): :type '(choice (const :tag "on" t) | ||
| 575 | 1.259 (kwzh 08-Apr-98): (const :tag "off" nil) | ||
| 576 | 1.278 (schwab 24-Jun-98): (other :tag "when asked" ask)) | ||
| 577 | 1.259 (kwzh 08-Apr-98): :group 'rmail) | ||
| 578 | 1.259 (kwzh 08-Apr-98): | ||
| 579 | 1.350 (zsh 25-Nov-01): (defvar rmail-enable-mime-composing nil | ||
| 580 | 1.350 (zsh 25-Nov-01): "*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to forward.") | ||
| 581 | 1.350 (zsh 25-Nov-01): | ||
| 582 | 1.259 (kwzh 08-Apr-98): ;;;###autoload | ||
| 583 | 1.259 (kwzh 08-Apr-98): (defvar rmail-show-mime-function nil | ||
| 584 | 1.339 (gerd 08-May-01): "Function to show MIME decoded message of RMAIL file. | ||
| 585 | 1.339 (gerd 08-May-01): This function is called when `rmail-enable-mime' is non-nil. | ||
| 586 | 1.339 (gerd 08-May-01): It is called with no argument.") | ||
| 587 | 1.339 (gerd 08-May-01): | ||
| 588 | 1.339 (gerd 08-May-01): ;;;###autoload | ||
| 589 | 1.339 (gerd 08-May-01): (defvar rmail-insert-mime-forwarded-message-function nil | ||
| 590 | 1.339 (gerd 08-May-01): "Function to insert a message in MIME format so it can be forwarded. | ||
| 591 | 1.358 (pot 06-May-02): This function is called if `rmail-enable-mime' or | ||
| 592 | 1.350 (zsh 25-Nov-01): `rmail-enable-mime-composing' is non-nil. | ||
| 593 | 1.339 (gerd 08-May-01): It is called with one argument FORWARD-BUFFER, which is a | ||
| 594 | 1.339 (gerd 08-May-01): buffer containing the message to forward. The current buffer | ||
| 595 | 1.339 (gerd 08-May-01): is the outgoing mail buffer.") | ||
| 596 | 1.339 (gerd 08-May-01): | ||
| 597 | 1.339 (gerd 08-May-01): ;;;###autoload | ||
| 598 | 1.342 (gerd 31-May-01): (defvar rmail-insert-mime-resent-message-function nil | ||
| 599 | 1.342 (gerd 31-May-01): "Function to insert a message in MIME format so it can be resent. | ||
| 600 | 1.342 (gerd 31-May-01): This function is called if `rmail-enable-mime' is non-nil. | ||
| 601 | 1.342 (gerd 31-May-01): It is called with one argument FORWARD-BUFFER, which is a | ||
| 602 | 1.342 (gerd 31-May-01): buffer containing the message to forward. The current buffer | ||
| 603 | 1.342 (gerd 31-May-01): is the outgoing mail buffer.") | ||
| 604 | 1.342 (gerd 31-May-01): | ||
| 605 | 1.342 (gerd 31-May-01): ;;;###autoload | ||
| 606 | 1.339 (gerd 08-May-01): (defvar rmail-search-mime-message-function nil | ||
| 607 | 1.339 (gerd 08-May-01): "Function to check if a regexp matches a MIME message. | ||
| 608 | 1.339 (gerd 08-May-01): This function is called if `rmail-enable-mime' is non-nil. | ||
| 609 | 1.339 (gerd 08-May-01): It is called with two arguments MSG and REGEXP, where | ||
| 610 | 1.339 (gerd 08-May-01): MSG is the message number, REGEXP is the regular expression.") | ||
| 611 | 1.339 (gerd 08-May-01): | ||
| 612 | 1.339 (gerd 08-May-01): ;;;###autoload | ||
| 613 | 1.339 (gerd 08-May-01): (defvar rmail-search-mime-header-function nil | ||
| 614 | 1.339 (gerd 08-May-01): "Function to check if a regexp matches a header of MIME message. | ||
| 615 | 1.339 (gerd 08-May-01): This function is called if `rmail-enable-mime' is non-nil. | ||
| 616 | 1.362 (rms 17-Aug-02): It is called with three arguments MSG, REGEXP, and LIMIT, where | ||
| 617 | 1.339 (gerd 08-May-01): MSG is the message number, | ||
| 618 | 1.339 (gerd 08-May-01): REGEXP is the regular expression, | ||
| 619 | 1.339 (gerd 08-May-01): LIMIT is the position specifying the end of header.") | ||
| 620 | 1.259 (kwzh 08-Apr-98): | ||
| 621 | 1.259 (kwzh 08-Apr-98): ;;;###autoload | ||
| 622 | 1.259 (kwzh 08-Apr-98): (defvar rmail-mime-feature 'rmail-mime | ||
| 623 | 1.267 (rms 19-May-98): "Feature to require to load MIME support in Rmail. | ||
| 624 | 1.267 (rms 19-May-98): When starting Rmail, if `rmail-enable-mime' is non-nil, | ||
| 625 | 1.419 (handa 19-Jan-06): this feature is required with `require'. | ||
| 626 | 1.419 (handa 19-Jan-06): | ||
| 627 | 1.419 (handa 19-Jan-06): The default value is `rmail-mime'. This feature is provided by | ||
| 628 | 1.419 (handa 19-Jan-06): the rmail-mime package available at <http://www.m17n.org/rmail-mime/>.") | ||
| 629 | 1.295 (rms 28-Jan-99): | ||
| 630 | 1.295 (rms 28-Jan-99): ;;;###autoload | ||
| 631 | 1.295 (rms 28-Jan-99): (defvar rmail-decode-mime-charset t | ||
| 632 | 1.295 (rms 28-Jan-99): "*Non-nil means a message is decoded by MIME's charset specification. | ||
| 633 | 1.295 (rms 28-Jan-99): If this variable is nil, or the message has not MIME specification, | ||
| 634 | 1.295 (rms 28-Jan-99): the message is decoded as normal way. | ||
| 635 | 1.295 (rms 28-Jan-99): | ||
| 636 | 1.295 (rms 28-Jan-99): If the variable `rmail-enable-mime' is non-nil, this variables is | ||
| 637 | 1.295 (rms 28-Jan-99): ignored, and all the decoding work is done by a feature specified by | ||
| 638 | 1.295 (rms 28-Jan-99): the variable `rmail-mime-feature'.") | ||
| 639 | 1.295 (rms 28-Jan-99): | ||
| 640 | 1.295 (rms 28-Jan-99): ;;;###autoload | ||
| 641 | 1.295 (rms 28-Jan-99): (defvar rmail-mime-charset-pattern | ||
| 642 | 1.429 (eliz 07-Oct-06): (concat "^content-type:[ \t]*text/plain;" | ||
| 643 | 1.426 (eliz 20-May-06): "\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*" | ||
| 644 | 1.424 (rms 10-Apr-06): "[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?") | ||
| 645 | 1.295 (rms 28-Jan-99): "Regexp to match MIME-charset specification in a header of message. | ||
| 646 | 1.295 (rms 28-Jan-99): The first parenthesized expression should match the MIME-charset name.") | ||
| 647 | 1.295 (rms 28-Jan-99): | ||
| 648 | 1.259 (kwzh 08-Apr-98): | ||
| 649 | 1.11 (jimb 24-Apr-92): ;;; Regexp matching the delimiter of messages in UNIX mail format | ||
| 650 | 1.11 (jimb 24-Apr-92): ;;; (UNIX From lines), minus the initial ^. Note that if you change | ||
| 651 | 1.11 (jimb 24-Apr-92): ;;; this expression, you must change the code in rmail-nuke-pinhead-header | ||
| 652 | 1.11 (jimb 24-Apr-92): ;;; that knows the exact ordering of the \\( \\) subexpressions. | ||
| 653 | 1.10 (jimb 19-Apr-92): (defvar rmail-unix-mail-delimiter | ||
| 654 | 1.24 (jimb 13-Sep-92): (let ((time-zone-regexp | ||
| 655 | 1.158 (rms 30-Jul-95): (concat "\\([A-Z]?[A-Z]?[A-Z][A-Z]\\( DST\\)?" | ||
| 656 | 1.24 (jimb 13-Sep-92): "\\|[-+]?[0-9][0-9][0-9][0-9]" | ||
| 657 | 1.24 (jimb 13-Sep-92): "\\|" | ||
| 658 | 1.24 (jimb 13-Sep-92): "\\) *"))) | ||
| 659 | 1.24 (jimb 13-Sep-92): (concat | ||
| 660 | 1.24 (jimb 13-Sep-92): "From " | ||
| 661 | 1.24 (jimb 13-Sep-92): | ||
| 662 | 1.188 (rms 28-Jun-96): ;; Many things can happen to an RFC 822 mailbox before it is put into | ||
| 663 | 1.188 (rms 28-Jun-96): ;; a `From' line. The leading phrase can be stripped, e.g. | ||
| 664 | 1.188 (rms 28-Jun-96): ;; `Joe <@w.x:joe@y.z>' -> `<@w.x:joe@y.z>'. The <> can be stripped, e.g. | ||
| 665 | 1.188 (rms 28-Jun-96): ;; `<@x.y:joe@y.z>' -> `@x.y:joe@y.z'. Everything starting with a CRLF | ||
| 666 | 1.188 (rms 28-Jun-96): ;; can be removed, e.g. | ||
| 667 | 1.188 (rms 28-Jun-96): ;; From: joe@y.z (Joe K | ||
| 668 | 1.188 (rms 28-Jun-96): ;; User) | ||
| 669 | 1.188 (rms 28-Jun-96): ;; can yield `From joe@y.z (Joe K Fri Mar 22 08:11:15 1996', and | ||
| 670 | 1.188 (rms 28-Jun-96): ;; From: Joe User | ||
| 671 | 1.188 (rms 28-Jun-96): ;; <joe@y.z> | ||
| 672 | 1.188 (rms 28-Jun-96): ;; can yield `From Joe User Fri Mar 22 08:11:15 1996'. | ||
| 673 | 1.192 (eggert 03-Aug-96): ;; The mailbox can be removed or be replaced by white space, e.g. | ||
| 674 | 1.192 (eggert 03-Aug-96): ;; From: "Joe User"{space}{tab} | ||
| 675 | 1.192 (eggert 03-Aug-96): ;; <joe@y.z> | ||
| 676 | 1.192 (eggert 03-Aug-96): ;; can yield `From {space}{tab} Fri Mar 22 08:11:15 1996', | ||
| 677 | 1.192 (eggert 03-Aug-96): ;; where {space} and {tab} represent the Ascii space and tab characters. | ||
| 678 | 1.188 (rms 28-Jun-96): ;; We want to match the results of any of these manglings. | ||
| 679 | 1.188 (rms 28-Jun-96): ;; The following regexp rejects names whose first characters are | ||
| 680 | 1.188 (rms 28-Jun-96): ;; obviously bogus, but after that anything goes. | ||
| 681 | 1.192 (eggert 03-Aug-96): "\\([^\0-\b\n-\r\^?].*\\)? " | ||
| 682 | 1.24 (jimb 13-Sep-92): | ||
| 683 | 1.24 (jimb 13-Sep-92): ;; The time the message was sent. | ||
| 684 | 1.188 (rms 28-Jun-96): "\\([^\0-\r \^?]+\\) +" ; day of the week | ||
| 685 | 1.188 (rms 28-Jun-96): "\\([^\0-\r \^?]+\\) +" ; month | ||
| 686 | 1.188 (rms 28-Jun-96): "\\([0-3]?[0-9]\\) +" ; day of month | ||
| 687 | 1.188 (rms 28-Jun-96): "\\([0-2][0-9]:[0-5][0-9]\\(:[0-6][0-9]\\)?\\) *" ; time of day | ||
| 688 | 1.24 (jimb 13-Sep-92): | ||
| 689 | 1.24 (jimb 13-Sep-92): ;; Perhaps a time zone, specified by an abbreviation, or by a | ||
| 690 | 1.24 (jimb 13-Sep-92): ;; numeric offset. | ||
| 691 | 1.24 (jimb 13-Sep-92): time-zone-regexp | ||
| 692 | 1.24 (jimb 13-Sep-92): | ||
| 693 | 1.24 (jimb 13-Sep-92): ;; The year. | ||
| 694 | 1.188 (rms 28-Jun-96): " \\([0-9][0-9]+\\) *" | ||
| 695 | 1.24 (jimb 13-Sep-92): | ||
| 696 | 1.24 (jimb 13-Sep-92): ;; On some systems the time zone can appear after the year, too. | ||
| 697 | 1.24 (jimb 13-Sep-92): time-zone-regexp | ||
| 698 | 1.24 (jimb 13-Sep-92): | ||
| 699 | 1.96 (kwzh 23-Apr-94): ;; Old uucp cruft. | ||
| 700 | 1.96 (kwzh 23-Apr-94): "\\(remote from .*\\)?" | ||
| 701 | 1.24 (jimb 13-Sep-92): | ||
| 702 | 1.24 (jimb 13-Sep-92): "\n")) | ||
| 703 | 1.24 (jimb 13-Sep-92): nil) | ||
| 704 | 1.24 (jimb 13-Sep-92): | ||
| 705 | 1.450 (bastien1 12-Feb-08): (defvar rmail-font-lock-keywords | ||
| 706 | 1.367 (rms 06-Jan-03): ;; These are all matched case-insensitively. | ||
| 707 | 1.450 (bastien1 12-Feb-08): (eval-when-compile | ||
| 708 | 1.259 (kwzh 08-Apr-98): (let* ((cite-chars "[>|}]") | ||
| 709 | 1.367 (rms 06-Jan-03): (cite-prefix "a-z") | ||
| 710 | 1.259 (kwzh 08-Apr-98): (cite-suffix (concat cite-prefix "0-9_.@-`'\""))) | ||
| 711 | 1.367 (rms 06-Jan-03): (list '("^\\(From\\|Sender\\|Resent-From\\):" | ||
| 712 | 1.451 (bastien1 13-Feb-08): . 'rmail-header-name) | ||
| 713 | 1.451 (bastien1 13-Feb-08): '("^Reply-To:.*$" . 'rmail-header-name) | ||
| 714 | 1.451 (bastien1 13-Feb-08): '("^Subject:" . 'rmail-header-name) | ||
| 715 | 1.451 (bastien1 13-Feb-08): '("^X-Spam-Status:" . 'rmail-header-name) | ||
| 716 | 1.259 (kwzh 08-Apr-98): '("^\\(To\\|Apparently-To\\|Cc\\|Newsgroups\\):" | ||
| 717 | 1.451 (bastien1 13-Feb-08): . 'rmail-header-name) | ||
| 718 | 1.259 (kwzh 08-Apr-98): ;; Use MATCH-ANCHORED to effectively anchor the regexp left side. | ||
| 719 | 1.259 (kwzh 08-Apr-98): `(,cite-chars | ||
| 720 | 1.259 (kwzh 08-Apr-98): (,(concat "\\=[ \t]*" | ||
| 721 | 1.401 (rms 24-Apr-05): "\\(\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?" | ||
| 722 | 1.401 (rms 24-Apr-05): "\\(" cite-chars "[ \t]*\\)\\)+\\)" | ||
| 723 | 1.259 (kwzh 08-Apr-98): "\\(.*\\)") | ||
| 724 | 1.259 (kwzh 08-Apr-98): (beginning-of-line) (end-of-line) | ||
| 725 | 1.401 (rms 24-Apr-05): (1 font-lock-comment-delimiter-face nil t) | ||
| 726 | 1.401 (rms 24-Apr-05): (5 font-lock-comment-face nil t))) | ||
| 727 | 1.367 (rms 06-Jan-03): '("^\\(X-[a-z0-9-]+\\|In-reply-to\\|Date\\):.*\\(\n[ \t]+.*\\)*$" | ||
| 728 | 1.451 (bastien1 13-Feb-08): . 'rmail-header-name)))) | ||
| 729 | 1.450 (bastien1 12-Feb-08): "Additional expressions to highlight in Rmail mode.") | ||
| 730 | 1.259 (kwzh 08-Apr-98): | ||
| 731 | 1.39 (rms 09-Mar-93): ;; Perform BODY in the summary buffer | ||
| 732 | 1.39 (rms 09-Mar-93): ;; in such a way that its cursor is properly updated in its own window. | ||
| 733 | 1.39 (rms 09-Mar-93): (defmacro rmail-select-summary (&rest body) | ||
| 734 | 1.309 (gerd 15-Nov-99): `(let ((total rmail-total-messages)) | ||
| 735 | 1.309 (gerd 15-Nov-99): (if (rmail-summary-displayed) | ||
| 736 | 1.309 (gerd 15-Nov-99): (let ((window (selected-window))) | ||
| 737 | 1.309 (gerd 15-Nov-99): (save-excursion | ||
| 738 | 1.309 (gerd 15-Nov-99): (unwind-protect | ||
| 739 | 1.309 (gerd 15-Nov-99): (progn | ||
| 740 | 1.309 (gerd 15-Nov-99): (pop-to-buffer rmail-summary-buffer) | ||
| 741 | 1.309 (gerd 15-Nov-99): ;; rmail-total-messages is a buffer-local var | ||
| 742 | 1.309 (gerd 15-Nov-99): ;; in the rmail buffer. | ||
| 743 | 1.309 (gerd 15-Nov-99): ;; This way we make it available for the body | ||
| 744 | 1.309 (gerd 15-Nov-99): ;; even tho the rmail buffer is not current. | ||
| 745 | 1.309 (gerd 15-Nov-99): (let ((rmail-total-messages total)) | ||
| 746 | 1.309 (gerd 15-Nov-99): ,@body)) | ||
| 747 | 1.309 (gerd 15-Nov-99): (select-window window)))) | ||
| 748 | 1.309 (gerd 15-Nov-99): (save-excursion | ||
| 749 | 1.309 (gerd 15-Nov-99): (set-buffer rmail-summary-buffer) | ||
| 750 | 1.309 (gerd 15-Nov-99): (let ((rmail-total-messages total)) | ||
| 751 | 1.309 (gerd 15-Nov-99): ,@body))) | ||
| 752 | 1.309 (gerd 15-Nov-99): (rmail-maybe-display-summary))) | ||
| 753 | 1.1 (roland 13-May-91): | ||
| 754 | 1.1 (roland 13-May-91): ;;;; *** Rmail Mode *** | ||
| 755 | 1.1 (roland 13-May-91): | ||
| 756 | 1.340 (gerd 17-May-01): ;; This variable is dynamically bound. The defvar is here to placate | ||
| 757 | 1.340 (gerd 17-May-01): ;; the byte compiler. | ||
| 758 | 1.340 (gerd 17-May-01): | ||
| 759 | 1.247 (handa 20-Feb-98): (defvar rmail-enable-multibyte nil) | ||
| 760 | 1.247 (handa 20-Feb-98): | ||
| 761 | 1.340 (gerd 17-May-01): | ||
| 762 | 1.340 (gerd 17-May-01): (defun rmail-require-mime-maybe () | ||
| 763 | 1.340 (gerd 17-May-01): "Require `rmail-mime-feature' if that is non-nil. | ||
| 764 | 1.340 (gerd 17-May-01): Signal an error and set `rmail-mime-feature' to nil if the feature | ||
| 765 | 1.340 (gerd 17-May-01): isn't provided." | ||
| 766 | 1.340 (gerd 17-May-01): (when rmail-enable-mime | ||
| 767 | 1.340 (gerd 17-May-01): (condition-case err | ||
| 768 | 1.340 (gerd 17-May-01): (require rmail-mime-feature) | ||
| 769 | 1.340 (gerd 17-May-01): (error | ||
| 770 | 1.419 (handa 19-Jan-06): (display-warning | ||
| 771 | 1.419 (handa 19-Jan-06): :warning | ||
| 772 | 1.419 (handa 19-Jan-06): (format "Although MIME support is requested | ||
| 773 | 1.419 (handa 19-Jan-06): by setting `rmail-enable-mime' to non-nil, the required feature | ||
| 774 | 1.419 (handa 19-Jan-06): `%s' (the value of `rmail-mime-feature') | ||
| 775 | 1.419 (handa 19-Jan-06): is not available in the current session. | ||
| 776 | 1.419 (handa 19-Jan-06): So, the MIME support is turned off for the moment." | ||
| 777 | 1.419 (handa 19-Jan-06): rmail-mime-feature)) | ||
| 778 | 1.340 (gerd 17-May-01): (setq rmail-enable-mime nil))))) | ||
| 779 | 1.340 (gerd 17-May-01): | ||
| 780 | 1.340 (gerd 17-May-01): | ||
| 781 | 1.1 (roland 13-May-91): ;;;###autoload | ||
| 782 | 1.1 (roland 13-May-91): (defun rmail (&optional file-name-arg) | ||
| 783 | 1.1 (roland 13-May-91): "Read and edit incoming mail. | ||
| 784 | 1.68 (rms 09-Oct-93): Moves messages into file named by `rmail-file-name' (a babyl format file) | ||
| 785 | 1.1 (roland 13-May-91): and edits that file in RMAIL Mode. | ||
| 786 | 1.1 (roland 13-May-91): Type \\[describe-mode] once editing that file, for a list of RMAIL commands. | ||
| 787 | 1.1 (roland 13-May-91): | ||
| 788 | 1.73 (rms 23-Dec-93): May be called with file name as argument; then performs rmail editing on | ||
| 789 | 1.73 (rms 23-Dec-93): that file, but does not copy any new mail into the file. | ||
| 790 | 1.73 (rms 23-Dec-93): Interactively, if you supply a prefix argument, then you | ||
| 791 | 1.113 (rms 30-Jul-94): have a chance to specify a file name with the minibuffer. | ||
| 792 | 1.113 (rms 30-Jul-94): | ||
| 793 | 1.113 (rms 30-Jul-94): If `rmail-display-summary' is non-nil, make a summary for this RMAIL file." | ||
| 794 | 1.1 (roland 13-May-91): (interactive (if current-prefix-arg | ||
| 795 | 1.165 (rms 23-Dec-95): (list (read-file-name "Run rmail on RMAIL file: ")))) | ||
| 796 | 1.340 (gerd 17-May-01): (rmail-require-mime-maybe) | ||
| 797 | 1.1 (roland 13-May-91): (let* ((file-name (expand-file-name (or file-name-arg rmail-file-name))) | ||
| 798 | 1.354 (eliz 03-Feb-02): ;; Use find-buffer-visiting, not get-file-buffer, for those users | ||
| 799 | 1.354 (eliz 03-Feb-02): ;; who have find-file-visit-truename set to t. | ||
| 800 | 1.354 (eliz 03-Feb-02): (existed (find-buffer-visiting file-name)) | ||
| 801 | 1.349 (eliz 16-Sep-01): ;; This binding is necessary because we must decide if we | ||
| 802 | 1.248 (handa 20-Feb-98): ;; need code conversion while the buffer is unibyte | ||
| 803 | 1.248 (handa 20-Feb-98): ;; (i.e. enable-multibyte-characters is nil). | ||
| 804 | 1.280 (rms 09-Jul-98): (rmail-enable-multibyte | ||
| 805 | 1.358 (pot 06-May-02): (if existed | ||
| 806 | 1.280 (rms 09-Jul-98): (with-current-buffer existed enable-multibyte-characters) | ||
| 807 | 1.280 (rms 09-Jul-98): (default-value 'enable-multibyte-characters))) | ||
| 808 | 1.247 (handa 20-Feb-98): ;; Since the file may contain messages of different encodings | ||
| 809 | 1.247 (handa 20-Feb-98): ;; at the tail (non-BYBYL part), we can't decode them at once | ||
| 810 | 1.247 (handa 20-Feb-98): ;; on reading. So, at first, we read the file without text | ||
| 811 | 1.247 (handa 20-Feb-98): ;; code conversion, then decode the messages one by one by | ||
| 812 | 1.247 (handa 20-Feb-98): ;; rmail-decode-babyl-format or | ||
| 813 | 1.247 (handa 20-Feb-98): ;; rmail-convert-to-babyl-format. | ||
| 814 | 1.247 (handa 20-Feb-98): (coding-system-for-read (and rmail-enable-multibyte 'raw-text)) | ||
| 815 | 1.237 (kwzh 15-Oct-97): run-mail-hook msg-shown) | ||
| 816 | 1.1 (roland 13-May-91): ;; Like find-file, but in the case where a buffer existed | ||
| 817 | 1.1 (roland 13-May-91): ;; and the file was reverted, recompute the message-data. | ||
| 818 | 1.263 (rms 22-Apr-98): ;; We used to bind enable-local-variables to nil here, | ||
| 819 | 1.263 (rms 22-Apr-98): ;; but that should not be needed now that rmail-mode | ||
| 820 | 1.263 (rms 22-Apr-98): ;; sets it locally to nil. | ||
| 821 | 1.263 (rms 22-Apr-98): ;; (Binding a variable locally with let is not safe if it has | ||
| 822 | 1.263 (rms 22-Apr-98): ;; buffer-local bindings.) | ||
| 823 | 1.1 (roland 13-May-91): (if (and existed (not (verify-visited-file-modtime existed))) | ||
| 824 | 1.1 (roland 13-May-91): (progn | ||
| 825 | 1.263 (rms 22-Apr-98): (find-file file-name) | ||
| 826 | 1.39 (rms 09-Mar-93): (if (and (verify-visited-file-modtime existed) | ||
| 827 | 1.39 (rms 09-Mar-93): (eq major-mode 'rmail-mode)) | ||
| 828 | 1.1 (roland 13-May-91): (progn (rmail-forget-messages) | ||
| 829 | 1.1 (roland 13-May-91): (rmail-set-message-counters)))) | ||
| 830 | 1.358 (pot 06-May-02): (switch-to-buffer | ||
| 831 | 1.276 (rms 13-Jun-98): (let ((enable-local-variables nil)) | ||
| 832 | 1.276 (rms 13-Jun-98): (find-file-noselect file-name)))) | ||
| 833 | 1.39 (rms 09-Mar-93): (if (eq major-mode 'rmail-edit-mode) | ||
| 834 | 1.243 (rms 19-Jan-98): (error "Exit Rmail Edit mode before getting new mail")) | ||
| 835 | 1.1 (roland 13-May-91): (if (and existed (> (buffer-size) 0)) | ||
| 836 | 1.1 (roland 13-May-91): ;; Buffer not new and not empty; ensure in proper mode, but that's all. | ||
| 837 | 1.1 (roland 13-May-91): (or (eq major-mode 'rmail-mode) | ||
| 838 | 1.200 (rms 12-Oct-96): (progn (rmail-mode-2) | ||
| 839 | 1.200 (rms 12-Oct-96): (setq run-mail-hook t))) | ||
| 840 | 1.200 (rms 12-Oct-96): (setq run-mail-hook t) | ||
| 841 | 1.1 (roland 13-May-91): (rmail-mode-2) | ||
| 842 | 1.1 (roland 13-May-91): ;; Convert all or part to Babyl file if possible. | ||
| 843 | 1.1 (roland 13-May-91): (rmail-convert-file) | ||
| 844 | 1.274 (rms 06-Jun-98): (goto-char (point-max))) | ||
| 845 | 1.277 (rms 15-Jun-98): ;; As we have read a file by raw-text, the buffer is set to | ||
| 846 | 1.277 (rms 15-Jun-98): ;; unibyte. We must make it multibyte if necessary. | ||
| 847 | 1.277 (rms 15-Jun-98): (if (and rmail-enable-multibyte | ||
| 848 | 1.277 (rms 15-Jun-98): (not enable-multibyte-characters)) | ||
| 849 | 1.277 (rms 15-Jun-98): (set-buffer-multibyte t)) | ||
| 850 | 1.275 (rms 11-Jun-98): ;; If necessary, scan to find all the messages. | ||
| 851 | 1.275 (rms 11-Jun-98): (rmail-maybe-set-message-counters) | ||
| 852 | 1.242 (kwzh 18-Jan-98): (unwind-protect | ||
| 853 | 1.274 (rms 06-Jun-98): (unless (and (not file-name-arg) | ||
| 854 | 1.274 (rms 06-Jun-98): (rmail-get-new-mail)) | ||
| 855 | 1.274 (rms 06-Jun-98): (rmail-show-message (rmail-first-unseen-message))) | ||
| 856 | 1.242 (kwzh 18-Jan-98): (progn | ||
| 857 | 1.242 (kwzh 18-Jan-98): (if rmail-display-summary (rmail-summary)) | ||
| 858 | 1.242 (kwzh 18-Jan-98): (rmail-construct-io-menu) | ||
| 859 | 1.242 (kwzh 18-Jan-98): (if run-mail-hook | ||
| 860 | 1.242 (kwzh 18-Jan-98): (run-hooks 'rmail-mode-hook)))))) | ||
| 861 | 1.1 (roland 13-May-91): | ||
| 862 | 1.1 (roland 13-May-91): ;; Given the value of MAILPATH, return a list of inbox file names. | ||
| 863 | 1.1 (roland 13-May-91): ;; This is turned off because it is not clear that the user wants | ||
| 864 | 1.1 (roland 13-May-91): ;; all these inboxes to feed into the primary rmail file. | ||
| 865 | 1.1 (roland 13-May-91): ; (defun rmail-convert-mailpath (string) | ||
| 866 | 1.1 (roland 13-May-91): ; (let (idx list) | ||
| 867 | 1.1 (roland 13-May-91): ; (while (setq idx (string-match "[%:]" string)) | ||
| 868 | 1.1 (roland 13-May-91): ; (let ((this (substring string 0 idx))) | ||
| 869 | 1.1 (roland 13-May-91): ; (setq string (substring string (1+ idx))) | ||
| 870 | 1.1 (roland 13-May-91): ; (setq list (cons (if (string-match "%" this) | ||
| 871 | 1.1 (roland 13-May-91): ; (substring this 0 (string-match "%" this)) | ||
| 872 | 1.1 (roland 13-May-91): ; this) | ||
| 873 | 1.1 (roland 13-May-91): ; list)))) | ||
| 874 | 1.1 (roland 13-May-91): ; list)) | ||
| 875 | 1.1 (roland 13-May-91): | ||
| 876 | 1.1 (roland 13-May-91): ; I have checked that adding "-*- rmail -*-" to the BABYL OPTIONS line | ||
| 877 | 1.1 (roland 13-May-91): ; will not cause emacs 18.55 problems. | ||
| 878 | 1.1 (roland 13-May-91): | ||
| 879 | 1.265 (rms 12-May-98): ;; This calls rmail-decode-babyl-format if the file is already Babyl. | ||
| 880 | 1.265 (rms 12-May-98): | ||
| 881 | 1.1 (roland 13-May-91): (defun rmail-convert-file () | ||
| 882 | 1.1 (roland 13-May-91): (let (convert) | ||
| 883 | 1.1 (roland 13-May-91): (widen) | ||
| 884 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 885 | 1.1 (roland 13-May-91): ;; If file doesn't start like a Babyl file, | ||
| 886 | 1.1 (roland 13-May-91): ;; convert it to one, by adding a header and converting each message. | ||
| 887 | 1.1 (roland 13-May-91): (cond ((looking-at "BABYL OPTIONS:")) | ||
| 888 | 1.1 (roland 13-May-91): ((looking-at "Version: 5\n") | ||
| 889 | 1.1 (roland 13-May-91): ;; Losing babyl file made by old version of Rmail. | ||
| 890 | 1.1 (roland 13-May-91): ;; Just fix the babyl file header; don't make a new one, | ||
| 891 | 1.1 (roland 13-May-91): ;; so we don't lose the Labels: file attribute, etc. | ||
| 892 | 1.1 (roland 13-May-91): (let ((buffer-read-only nil)) | ||
| 893 | 1.1 (roland 13-May-91): (insert "BABYL OPTIONS: -*- rmail -*-\n"))) | ||
| 894 | 1.66 (bfox 21-Sep-93): ((equal (point-min) (point-max)) | ||
| 895 | 1.66 (bfox 21-Sep-93): ;; Empty RMAIL file. Just insert the header. | ||
| 896 | 1.66 (bfox 21-Sep-93): (rmail-insert-rmail-file-header)) | ||
| 897 | 1.1 (roland 13-May-91): (t | ||
| 898 | 1.66 (bfox 21-Sep-93): ;; Non-empty file in non-RMAIL format. Add header and convert. | ||
| 899 | 1.1 (roland 13-May-91): (setq convert t) | ||
| 900 | 1.1 (roland 13-May-91): (rmail-insert-rmail-file-header))) | ||
| 901 | 1.1 (roland 13-May-91): ;; If file was not a Babyl file or if there are | ||
| 902 | 1.1 (roland 13-May-91): ;; Unix format messages added at the end, | ||
| 903 | 1.1 (roland 13-May-91): ;; convert file as necessary. | ||
| 904 | 1.1 (roland 13-May-91): (if (or convert | ||
| 905 | 1.63 (rms 07-Sep-93): (save-excursion | ||
| 906 | 1.63 (rms 07-Sep-93): (goto-char (point-max)) | ||
| 907 | 1.159 (rms 12-Aug-95): (search-backward "\n\^_") | ||
| 908 | 1.159 (rms 12-Aug-95): (forward-char 2) | ||
| 909 | 1.63 (rms 07-Sep-93): (looking-at "\n*From "))) | ||
| 910 | 1.1 (roland 13-May-91): (let ((buffer-read-only nil)) | ||
| 911 | 1.1 (roland 13-May-91): (message "Converting to Babyl format...") | ||
| 912 | 1.63 (rms 07-Sep-93): ;; If file needs conversion, convert it all, | ||
| 913 | 1.63 (rms 07-Sep-93): ;; except for the BABYL header. | ||
| 914 | 1.63 (rms 07-Sep-93): ;; (rmail-convert-to-babyl-format would delete the header.) | ||
| 915 | 1.63 (rms 07-Sep-93): (goto-char (point-min)) | ||
| 916 | 1.63 (rms 07-Sep-93): (search-forward "\n\^_" nil t) | ||
| 917 | 1.64 (rms 11-Sep-93): (narrow-to-region (point) (point-max)) | ||
| 918 | 1.1 (roland 13-May-91): (rmail-convert-to-babyl-format) | ||
| 919 | 1.247 (handa 20-Feb-98): (message "Converting to Babyl format...done")) | ||
| 920 | 1.247 (handa 20-Feb-98): (if (and (not rmail-enable-mime) | ||
| 921 | 1.247 (handa 20-Feb-98): rmail-enable-multibyte) | ||
| 922 | 1.247 (handa 20-Feb-98): ;; We still have to decode BABYL part. | ||
| 923 | 1.247 (handa 20-Feb-98): (rmail-decode-babyl-format))))) | ||
| 924 | 1.1 (roland 13-May-91): | ||
| 925 | 1.1 (roland 13-May-91): (defun rmail-insert-rmail-file-header () | ||
| 926 | 1.1 (roland 13-May-91): (let ((buffer-read-only nil)) | ||
| 927 | 1.265 (rms 12-May-98): ;; -*-rmail-*- is here so that visiting the file normally | ||
| 928 | 1.265 (rms 12-May-98): ;; recognizes it as an Rmail file. | ||
| 929 | 1.1 (roland 13-May-91): (insert "BABYL OPTIONS: -*- rmail -*- | ||
| 930 | 1.1 (roland 13-May-91): Version: 5 | ||
| 931 | 1.1 (roland 13-May-91): Labels: | ||
| 932 | 1.1 (roland 13-May-91): Note: This is the header of an rmail file. | ||
| 933 | 1.1 (roland 13-May-91): Note: If you are seeing it in rmail, | ||
| 934 | 1.1 (roland 13-May-91): Note: it means the file has no messages in it.\n\^_"))) | ||
| 935 | 1.1 (roland 13-May-91): | ||
| 936 | 1.361 (lektu 02-Jul-02): ;; Decode Babyl formatted part at the head of current buffer by | ||
| 937 | 1.247 (handa 20-Feb-98): ;; rmail-file-coding-system, or if it is nil, do auto conversion. | ||
| 938 | 1.212 (handa 26-Feb-97): | ||
| 939 | 1.212 (handa 26-Feb-97): (defun rmail-decode-babyl-format () | ||
| 940 | 1.212 (handa 26-Feb-97): (let ((modifiedp (buffer-modified-p)) | ||
| 941 | 1.212 (handa 26-Feb-97): (buffer-read-only nil) | ||
| 942 | 1.265 (rms 12-May-98): (coding-system rmail-file-coding-system) | ||
| 943 | 1.247 (handa 20-Feb-98): from to) | ||
| 944 | 1.212 (handa 26-Feb-97): (goto-char (point-min)) | ||
| 945 | 1.265 (rms 12-May-98): (search-forward "\n\^_" nil t) ; Skip BABYL header. | ||
| 946 | 1.247 (handa 20-Feb-98): (setq from (point)) | ||
| 947 | 1.247 (handa 20-Feb-98): (goto-char (point-max)) | ||
| 948 | 1.247 (handa 20-Feb-98): (search-backward "\n\^_" from 'mv) | ||
| 949 | 1.247 (handa 20-Feb-98): (setq to (point)) | ||
| 950 | 1.265 (rms 12-May-98): (unless (and coding-system | ||
| 951 | 1.265 (rms 12-May-98): (coding-system-p coding-system)) | ||
| 952 | 1.349 (eliz 16-Sep-01): (setq coding-system | ||
| 953 | 1.447 (miles 01-Feb-08): ;; If rmail-file-coding-system is nil, Emacs 21 writes | ||
| 954 | 1.447 (miles 01-Feb-08): ;; RMAIL files in emacs-mule, Emacs 22 in utf-8, but | ||
| 955 | 1.447 (miles 01-Feb-08): ;; earlier versions did that with the current buffer's | ||
| 956 | 1.447 (miles 01-Feb-08): ;; encoding. So we want to favor detection of emacs-mule | ||
| 957 | 1.447 (miles 01-Feb-08): ;; (whose normal priority is quite low) and utf-8, but | ||
| 958 | 1.447 (miles 01-Feb-08): ;; still allow detection of other encodings if they won't | ||
| 959 | 1.447 (miles 01-Feb-08): ;; fit. The call to with-coding-priority below achieves | ||
| 960 | 1.447 (miles 01-Feb-08): ;; that. | ||
| 961 | 1.447 (miles 01-Feb-08): (with-coding-priority '(emacs-mule utf-8) | ||
| 962 | 1.447 (miles 01-Feb-08): (detect-coding-region from to 'highest)))) | ||
| 963 | 1.447 (miles 01-Feb-08): (unless (eq (coding-system-type coding-system) 'undecided) | ||
| 964 | 1.303 (rms 07-Apr-99): (set-buffer-modified-p t) ; avoid locking when decoding | ||
| 965 | 1.352 (rms 11-Jan-02): (let ((buffer-undo-list t)) | ||
| 966 | 1.352 (rms 11-Jan-02): (decode-coding-region from to coding-system)) | ||
| 967 | 1.303 (rms 07-Apr-99): (setq coding-system last-coding-system-used)) | ||
| 968 | 1.265 (rms 12-May-98): (set-buffer-modified-p modifiedp) | ||
| 969 | 1.265 (rms 12-May-98): (setq buffer-file-coding-system nil) | ||
| 970 | 1.265 (rms 12-May-98): (setq save-buffer-coding-system | ||
| 971 | 1.265 (rms 12-May-98): (or coding-system 'undecided)))) | ||
| 972 | 1.212 (handa 26-Feb-97): | ||
| 973 | 1.259 (kwzh 08-Apr-98): (defvar rmail-mode-map nil) | ||
| 974 | 1.1 (roland 13-May-91): (if rmail-mode-map | ||
| 975 | 1.1 (roland 13-May-91): nil | ||
| 976 | 1.1 (roland 13-May-91): (setq rmail-mode-map (make-keymap)) | ||
| 977 | 1.1 (roland 13-May-91): (suppress-keymap rmail-mode-map) | ||
| 978 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "a" 'rmail-add-label) | ||
| 979 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "b" 'rmail-bury) | ||
| 980 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "c" 'rmail-continue) | ||
| 981 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "d" 'rmail-delete-forward) | ||
| 982 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\C-d" 'rmail-delete-backward) | ||
| 983 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "e" 'rmail-edit-current-message) | ||
| 984 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "f" 'rmail-forward) | ||
| 985 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "g" 'rmail-get-new-mail) | ||
| 986 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "h" 'rmail-summary) | ||
| 987 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "i" 'rmail-input) | ||
| 988 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "j" 'rmail-show-message) | ||
| 989 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "k" 'rmail-kill-label) | ||
| 990 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "l" 'rmail-summary-by-labels) | ||
| 991 | 1.1 (roland 13-May-91): (define-key rmail-mode-map "\e\C-h" 'rmail-summary) | ||
| 992 | 1.1 (roland 13-May-91): (define-key rmail-mode-map "\e\C-l" 'rmail-summary-by-labels) | ||
| 993 | 1.1 (roland 13-May-91): (define-key rmail-mode-map "\e\C-r" 'rmail-summary-by-recipients) | ||
| 994 | 1.1 (roland 13-May-91): (define-key rmail-mode-map "\e\C-s" 'rmail-summary-by-regexp) | ||
| 995 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\e\C-t" 'rmail-summary-by-topic) | ||
| 996 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "m" 'rmail-mail) | ||
| 997 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\em" 'rmail-retry-failure) | ||
| 998 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "n" 'rmail-next-undeleted-message) | ||
| 999 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\en" 'rmail-next-message) | ||
| 1000 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\e\C-n" 'rmail-next-labeled-message) | ||
| 1001 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "o" 'rmail-output-to-rmail-file) | ||
| 1002 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\C-o" 'rmail-output) | ||
| 1003 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "p" 'rmail-previous-undeleted-message) | ||
| 1004 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\ep" 'rmail-previous-message) | ||
| 1005 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\e\C-p" 'rmail-previous-labeled-message) | ||
| 1006 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "q" 'rmail-quit) | ||
| 1007 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "r" 'rmail-reply) | ||
| 1008 | 1.35 (rms 21-Oct-92): ;; I find I can't live without the default M-r command -- rms. | ||
| 1009 | 1.39 (rms 09-Mar-93): ;; (define-key rmail-mode-map "\er" 'rmail-search-backwards) | ||
| 1010 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "s" 'rmail-expunge-and-save) | ||
| 1011 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\es" 'rmail-search) | ||
| 1012 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "t" 'rmail-toggle-header) | ||
| 1013 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "u" 'rmail-undelete-previous-message) | ||
| 1014 | 1.216 (rms 05-Apr-97): (define-key rmail-mode-map "w" 'rmail-output-body-to-file) | ||
| 1015 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "x" 'rmail-expunge) | ||
| 1016 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "." 'rmail-beginning-of-message) | ||
| 1017 | 1.410 (eliz 12-Aug-05): (define-key rmail-mode-map "/" 'rmail-end-of-message) | ||
| 1018 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "<" 'rmail-first-message) | ||
| 1019 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map ">" 'rmail-last-message) | ||
| 1020 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map " " 'scroll-up) | ||
| 1021 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "\177" 'scroll-down) | ||
| 1022 | 1.39 (rms 09-Mar-93): (define-key rmail-mode-map "?" 'describe-mode) | ||
| 1023 | 1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-d" 'rmail-sort-by-date) | ||
| 1024 | 1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-s" 'rmail-sort-by-subject) | ||
| 1025 | 1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-a" 'rmail-sort-by-author) | ||
| 1026 | 1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-r" 'rmail-sort-by-recipient) | ||
| 1027 | 1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-c" 'rmail-sort-by-correspondent) | ||
| 1028 | 1.52 (rms 22-Jun-93): (define-key rmail-mode-map "\C-c\C-s\C-l" 'rmail-sort-by-lines) | ||
| 1029 | 1.338 (gerd 07-May-01): (define-key rmail-mode-map "\C-c\C-s\C-k" 'rmail-sort-by-labels) | ||
| 1030 | 1.144 (rms 05-Feb-95): (define-key rmail-mode-map "\C-c\C-n" 'rmail-next-same-subject) | ||
| 1031 | 1.144 (rms 05-Feb-95): (define-key rmail-mode-map "\C-c\C-p" 'rmail-previous-same-subject) | ||
| 1032 | 1.39 (rms 09-Mar-93): ) | ||
| 1033 | 1.50 (rms 22-Jun-93): | ||
| 1034 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar] (make-sparse-keymap)) | ||
| 1035 | 1.50 (rms 22-Jun-93): | ||
| 1036 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar classify] | ||
| 1037 | 1.50 (rms 22-Jun-93): (cons "Classify" (make-sparse-keymap "Classify"))) | ||
| 1038 | 1.50 (rms 22-Jun-93): | ||
| 1039 | 1.92 (rms 23-Mar-94): (define-key rmail-mode-map [menu-bar classify input-menu] | ||
| 1040 | 1.126 (rms 19-Sep-94): nil) | ||
| 1041 | 1.92 (rms 23-Mar-94): | ||
| 1042 | 1.92 (rms 23-Mar-94): (define-key rmail-mode-map [menu-bar classify output-menu] | ||
| 1043 | 1.126 (rms 19-Sep-94): nil) | ||
| 1044 | 1.216 (rms 05-Apr-97): | ||
| 1045 | 1.216 (rms 05-Apr-97): (define-key rmail-mode-map [menu-bar classify output-body] | ||
| 1046 | 1.216 (rms 05-Apr-97): '("Output body to file..." . rmail-output-body-to-file)) | ||
| 1047 | 1.92 (rms 23-Mar-94): | ||
| 1048 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar classify output-inbox] | ||
| 1049 | 1.117 (rms 02-Aug-94): '("Output (inbox)..." . rmail-output)) | ||
| 1050 | 1.50 (rms 22-Jun-93): | ||
| 1051 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar classify output] | ||
| 1052 | 1.117 (rms 02-Aug-94): '("Output (Rmail)..." . rmail-output-to-rmail-file)) | ||
| 1053 | 1.50 (rms 22-Jun-93): | ||
| 1054 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar classify kill-label] | ||
| 1055 | 1.117 (rms 02-Aug-94): '("Kill Label..." . rmail-kill-label)) | ||
| 1056 | 1.50 (rms 22-Jun-93): | ||
| 1057 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar classify add-label] | ||
| 1058 | 1.117 (rms 02-Aug-94): '("Add Label..." . rmail-add-label)) | ||
| 1059 | 1.50 (rms 22-Jun-93): | ||
| 1060 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary] | ||
| 1061 | 1.50 (rms 22-Jun-93): (cons "Summary" (make-sparse-keymap "Summary"))) | ||
| 1062 | 1.50 (rms 22-Jun-93): | ||
| 1063 | 1.156 (rms 30-Jun-95): (define-key rmail-mode-map [menu-bar summary senders] | ||
| 1064 | 1.156 (rms 30-Jun-95): '("By Senders..." . rmail-summary-by-senders)) | ||
| 1065 | 1.156 (rms 30-Jun-95): | ||
| 1066 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary labels] | ||
| 1067 | 1.117 (rms 02-Aug-94): '("By Labels..." . rmail-summary-by-labels)) | ||
| 1068 | 1.50 (rms 22-Jun-93): | ||
| 1069 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary recipients] | ||
| 1070 | 1.117 (rms 02-Aug-94): '("By Recipients..." . rmail-summary-by-recipients)) | ||
| 1071 | 1.50 (rms 22-Jun-93): | ||
| 1072 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary topic] | ||
| 1073 | 1.117 (rms 02-Aug-94): '("By Topic..." . rmail-summary-by-topic)) | ||
| 1074 | 1.50 (rms 22-Jun-93): | ||
| 1075 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary regexp] | ||
| 1076 | 1.117 (rms 02-Aug-94): '("By Regexp..." . rmail-summary-by-regexp)) | ||
| 1077 | 1.50 (rms 22-Jun-93): | ||
| 1078 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar summary all] | ||
| 1079 | 1.50 (rms 22-Jun-93): '("All" . rmail-summary)) | ||
| 1080 | 1.50 (rms 22-Jun-93): | ||
| 1081 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar mail] | ||
| 1082 | 1.50 (rms 22-Jun-93): (cons "Mail" (make-sparse-keymap "Mail"))) | ||
| 1083 | 1.50 (rms 22-Jun-93): | ||
| 1084 | 1.116 (rms 02-Aug-94): (define-key rmail-mode-map [menu-bar mail rmail-get-new-mail] | ||
| 1085 | 1.108 (rms 12-Jul-94): '("Get New Mail" . rmail-get-new-mail)) | ||
| 1086 | 1.108 (rms 12-Jul-94): | ||
| 1087 | 1.108 (rms 12-Jul-94): (define-key rmail-mode-map [menu-bar mail lambda] | ||
| 1088 | 1.109 (rms 13-Jul-94): '("----")) | ||
| 1089 | 1.108 (rms 12-Jul-94): | ||
| 1090 | 1.108 (rms 12-Jul-94): (define-key rmail-mode-map [menu-bar mail continue] | ||
| 1091 | 1.50 (rms 22-Jun-93): '("Continue" . rmail-continue)) | ||
| 1092 | 1.114 (rms 31-Jul-94): | ||
| 1093 | 1.114 (rms 31-Jul-94): (define-key rmail-mode-map [menu-bar mail resend] | ||
| 1094 | 1.117 (rms 02-Aug-94): '("Re-send..." . rmail-resend)) | ||
| 1095 | 1.50 (rms 22-Jun-93): | ||
| 1096 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar mail forward] | ||
| 1097 | 1.50 (rms 22-Jun-93): '("Forward" . rmail-forward)) | ||
| 1098 | 1.50 (rms 22-Jun-93): | ||
| 1099 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar mail retry] | ||
| 1100 | 1.50 (rms 22-Jun-93): '("Retry" . rmail-retry-failure)) | ||
| 1101 | 1.50 (rms 22-Jun-93): | ||
| 1102 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar mail reply] | ||
| 1103 | 1.50 (rms 22-Jun-93): '("Reply" . rmail-reply)) | ||
| 1104 | 1.1 (roland 13-May-91): | ||
| 1105 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar mail mail] | ||
| 1106 | 1.50 (rms 22-Jun-93): '("Mail" . rmail-mail)) | ||
| 1107 | 1.50 (rms 22-Jun-93): | ||
| 1108 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar delete] | ||
| 1109 | 1.50 (rms 22-Jun-93): (cons "Delete" (make-sparse-keymap "Delete"))) | ||
| 1110 | 1.50 (rms 22-Jun-93): | ||
| 1111 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar delete expunge/save] | ||
| 1112 | 1.50 (rms 22-Jun-93): '("Expunge/Save" . rmail-expunge-and-save)) | ||
| 1113 | 1.50 (rms 22-Jun-93): | ||
| 1114 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar delete expunge] | ||
| 1115 | 1.50 (rms 22-Jun-93): '("Expunge" . rmail-expunge)) | ||
| 1116 | 1.50 (rms 22-Jun-93): | ||
| 1117 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar delete undelete] | ||
| 1118 | 1.50 (rms 22-Jun-93): '("Undelete" . rmail-undelete-previous-message)) | ||
| 1119 | 1.50 (rms 22-Jun-93): | ||
| 1120 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar delete delete] | ||
| 1121 | 1.50 (rms 22-Jun-93): '("Delete" . rmail-delete-forward)) | ||
| 1122 | 1.50 (rms 22-Jun-93): | ||
| 1123 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move] | ||
| 1124 | 1.50 (rms 22-Jun-93): (cons "Move" (make-sparse-keymap "Move"))) | ||
| 1125 | 1.50 (rms 22-Jun-93): | ||
| 1126 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move search-back] | ||
| 1127 | 1.140 (rms 18-Dec-94): '("Search Back..." . rmail-search-backwards)) | ||
| 1128 | 1.50 (rms 22-Jun-93): | ||
| 1129 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move search] | ||
| 1130 | 1.117 (rms 02-Aug-94): '("Search..." . rmail-search)) | ||
| 1131 | 1.50 (rms 22-Jun-93): | ||
| 1132 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move previous] | ||
| 1133 | 1.50 (rms 22-Jun-93): '("Previous Nondeleted" . rmail-previous-undeleted-message)) | ||
| 1134 | 1.50 (rms 22-Jun-93): | ||
| 1135 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move next] | ||
| 1136 | 1.50 (rms 22-Jun-93): '("Next Nondeleted" . rmail-next-undeleted-message)) | ||
| 1137 | 1.50 (rms 22-Jun-93): | ||
| 1138 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move last] | ||
| 1139 | 1.50 (rms 22-Jun-93): '("Last" . rmail-last-message)) | ||
| 1140 | 1.50 (rms 22-Jun-93): | ||
| 1141 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move first] | ||
| 1142 | 1.50 (rms 22-Jun-93): '("First" . rmail-first-message)) | ||
| 1143 | 1.50 (rms 22-Jun-93): | ||
| 1144 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move previous] | ||
| 1145 | 1.50 (rms 22-Jun-93): '("Previous" . rmail-previous-message)) | ||
| 1146 | 1.50 (rms 22-Jun-93): | ||
| 1147 | 1.50 (rms 22-Jun-93): (define-key rmail-mode-map [menu-bar move next] | ||
| 1148 | 1.50 (rms 22-Jun-93): '("Next" . rmail-next-message)) | ||
| 1149 | 1.423 (eliz 25-Mar-06): | ||
| 1150 | 1.423 (eliz 25-Mar-06): ;; Rmail toolbar | ||
| 1151 | 1.423 (eliz 25-Mar-06): (defvar rmail-tool-bar-map | ||
| 1152 | 1.423 (eliz 25-Mar-06): (if (display-graphic-p) | ||
| 1153 | 1.423 (eliz 25-Mar-06): (let ((map (make-sparse-keymap))) | ||
| 1154 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-get-new-mail "mail/inbox" | ||
| 1155 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1156 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-next-undeleted-message "right-arrow" | ||
| 1157 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1158 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-previous-undeleted-message "left-arrow" | ||
| 1159 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1160 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-search "search" | ||
| 1161 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1162 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-input "open" | ||
| 1163 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1164 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-mail "mail/compose" | ||
| 1165 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1166 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-reply "mail/reply-all" | ||
| 1167 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1168 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-forward "mail/forward" | ||
| 1169 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1170 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-delete-forward "close" | ||
| 1171 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1172 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-output "mail/move" | ||
| 1173 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1174 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-output-body-to-file "mail/save" | ||
| 1175 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1176 | 1.423 (eliz 25-Mar-06): (tool-bar-local-item-from-menu 'rmail-expunge "delete" | ||
| 1177 | 1.423 (eliz 25-Mar-06): map rmail-mode-map) | ||
| 1178 | 1.423 (eliz 25-Mar-06): map))) | ||
| 1179 | 1.423 (eliz 25-Mar-06): | ||
| 1180 | 1.423 (eliz 25-Mar-06): | ||
| 1181 | 1.50 (rms 22-Jun-93): | ||
| 1182 | 1.1 (roland 13-May-91): ;; Rmail mode is suitable only for specially formatted data. | ||
| 1183 | 1.1 (roland 13-May-91): (put 'rmail-mode 'mode-class 'special) | ||
| 1184 | 1.1 (roland 13-May-91): | ||
| 1185 | 1.127 (rms 21-Sep-94): (defun rmail-mode-kill-summary () | ||
| 1186 | 1.127 (rms 21-Sep-94): (if rmail-summary-buffer (kill-buffer rmail-summary-buffer))) | ||
| 1187 | 1.127 (rms 21-Sep-94): | ||
| 1188 | 1.34 (jimb 11-Oct-92): ;;;###autoload | ||
| 1189 | 1.1 (roland 13-May-91): (defun rmail-mode () | ||
| 1190 | 1.1 (roland 13-May-91): "Rmail Mode is used by \\<rmail-mode-map>\\[rmail] for editing Rmail files. | ||
| 1191 | 1.1 (roland 13-May-91): All normal editing commands are turned off. | ||
| 1192 | 1.1 (roland 13-May-91): Instead, these commands are available: | ||
| 1193 | 1.1 (roland 13-May-91): | ||
| 1194 | 1.410 (eliz 12-Aug-05): \\[rmail-beginning-of-message] Move point to front of this message. | ||
| 1195 | 1.410 (eliz 12-Aug-05): \\[rmail-end-of-message] Move point to bottom of this message. | ||
| 1196 | 1.1 (roland 13-May-91): \\[scroll-up] Scroll to next screen of this message. | ||
| 1197 | 1.1 (roland 13-May-91): \\[scroll-down] Scroll to previous screen of this message. | ||
| 1198 | 1.1 (roland 13-May-91): \\[rmail-next-undeleted-message] Move to Next non-deleted message. | ||
| 1199 | 1.1 (roland 13-May-91): \\[rmail-previous-undeleted-message] Move to Previous non-deleted message. | ||
| 1200 | 1.1 (roland 13-May-91): \\[rmail-next-message] Move to Next message whether deleted or not. | ||
| 1201 | 1.1 (roland 13-May-91): \\[rmail-previous-message] Move to Previous message whether deleted or not. | ||
| 1202 | 1.1 (roland 13-May-91): \\[rmail-first-message] Move to the first message in Rmail file. | ||
| 1203 | 1.1 (roland 13-May-91): \\[rmail-last-message] Move to the last message in Rmail file. | ||
| 1204 | 1.1 (roland 13-May-91): \\[rmail-show-message] Jump to message specified by numeric position in file. | ||
| 1205 | 1.1 (roland 13-May-91): \\[rmail-search] Search for string and show message it is found in. | ||
| 1206 | 1.1 (roland 13-May-91): \\[rmail-delete-forward] Delete this message, move to next nondeleted. | ||
| 1207 | 1.1 (roland 13-May-91): \\[rmail-delete-backward] Delete this message, move to previous nondeleted. | ||
| 1208 | 1.1 (roland 13-May-91): \\[rmail-undelete-previous-message] Undelete message. Tries current message, then earlier messages | ||
| 1209 | 1.1 (roland 13-May-91): till a deleted message is found. | ||
| 1210 | 1.39 (rms 09-Mar-93): \\[rmail-edit-current-message] Edit the current message. \\[rmail-cease-edit] to return to Rmail. | ||
| 1211 | 1.1 (roland 13-May-91): \\[rmail-expunge] Expunge deleted messages. | ||
| 1212 | 1.1 (roland 13-May-91): \\[rmail-expunge-and-save] Expunge and save the file. | ||
| 1213 | 1.1 (roland 13-May-91): \\[rmail-quit] Quit Rmail: expunge, save, then switch to another buffer. | ||
| 1214 | 1.1 (roland 13-May-91): \\[save-buffer] Save without expunging. | ||
| 1215 | 1.40 (rms 29-Mar-93): \\[rmail-get-new-mail] Move new mail from system spool directory into this file. | ||
| 1216 | 1.1 (roland 13-May-91): \\[rmail-mail] Mail a message (same as \\[mail-other-window]). | ||
| 1217 | 1.1 (roland 13-May-91): \\[rmail-continue] Continue composing outgoing message started before. | ||
| 1218 | 1.39 (rms 09-Mar-93): \\[rmail-reply] Reply to this message. Like \\[rmail-mail] but initializes some fields. | ||
| 1219 | 1.39 (rms 09-Mar-93): \\[rmail-retry-failure] Send this message again. Used on a mailer failure message. | ||
| 1220 | 1.1 (roland 13-May-91): \\[rmail-forward] Forward this message to another user. | ||
| 1221 | 1.1 (roland 13-May-91): \\[rmail-output-to-rmail-file] Output this message to an Rmail file (append it). | ||
| 1222 | 1.1 (roland 13-May-91): \\[rmail-output] Output this message to a Unix-format mail file (append it). | ||
| 1223 | 1.258 (stephen 07-Apr-98): \\[rmail-output-body-to-file] Save message body to a file. Default filename comes from Subject line. | ||
| 1224 | 1.1 (roland 13-May-91): \\[rmail-input] Input Rmail file. Run Rmail on that file. | ||
| 1225 | 1.1 (roland 13-May-91): \\[rmail-add-label] Add label to message. It will be displayed in the mode line. | ||
| 1226 | 1.1 (roland 13-May-91): \\[rmail-kill-label] Kill label. Remove a label from current message. | ||
| 1227 | 1.1 (roland 13-May-91): \\[rmail-next-labeled-message] Move to Next message with specified label | ||
| 1228 | 1.1 (roland 13-May-91): (label defaults to last one specified). | ||
| 1229 | 1.1 (roland 13-May-91): Standard labels: filed, unseen, answered, forwarded, deleted. | ||
| 1230 | 1.39 (rms 09-Mar-93): Any other label is present only if you add it with \\[rmail-add-label]. | ||
| 1231 | 1.1 (roland 13-May-91): \\[rmail-previous-labeled-message] Move to Previous message with specified label | ||
| 1232 | 1.1 (roland 13-May-91): \\[rmail-summary] Show headers buffer, with a one line summary of each message. | ||
| 1233 | 1.39 (rms 09-Mar-93): \\[rmail-summary-by-labels] Summarize only messages with particular label(s). | ||
| 1234 | 1.39 (rms 09-Mar-93): \\[rmail-summary-by-recipients] Summarize only messages with particular recipient(s). | ||
| 1235 | 1.39 (rms 09-Mar-93): \\[rmail-summary-by-regexp] Summarize only messages with particular regexp(s). | ||
| 1236 | 1.39 (rms 09-Mar-93): \\[rmail-summary-by-topic] Summarize only messages with subject line regexp(s). | ||
| 1237 | 1.39 (rms 09-Mar-93): \\[rmail-toggle-header] Toggle display of complete header." | ||
| 1238 | 1.1 (roland 13-May-91): (interactive) | ||
| 1239 | 1.340 (gerd 17-May-01): (let ((finding-rmail-file (not (eq major-mode 'rmail-mode)))) | ||
| 1240 | 1.340 (gerd 17-May-01): (rmail-mode-2) | ||
| 1241 | 1.340 (gerd 17-May-01): (when (and finding-rmail-file | ||
| 1242 | 1.340 (gerd 17-May-01): (null coding-system-for-read) | ||
| 1243 | 1.340 (gerd 17-May-01): default-enable-multibyte-characters) | ||
| 1244 | 1.340 (gerd 17-May-01): (let ((rmail-enable-multibyte t)) | ||
| 1245 | 1.340 (gerd 17-May-01): (rmail-require-mime-maybe) | ||
| 1246 | 1.340 (gerd 17-May-01): (rmail-convert-file) | ||
| 1247 | 1.340 (gerd 17-May-01): (goto-char (point-max)) | ||
| 1248 | 1.340 (gerd 17-May-01): (set-buffer-multibyte t))) | ||
| 1249 | 1.340 (gerd 17-May-01): (rmail-set-message-counters) | ||
| 1250 | 1.340 (gerd 17-May-01): (rmail-show-message rmail-total-messages) | ||
| 1251 | 1.340 (gerd 17-May-01): (when finding-rmail-file | ||
| 1252 | 1.340 (gerd 17-May-01): (when rmail-display-summary | ||
| 1253 | 1.340 (gerd 17-May-01): (rmail-summary)) | ||
| 1254 | 1.340 (gerd 17-May-01): (rmail-construct-io-menu)) | ||
| 1255 | 1.404 (lute 26-May-05): (run-mode-hooks 'rmail-mode-hook))) | ||
| 1256 | 1.1 (roland 13-May-91): | ||
| 1257 | 1.1 (roland 13-May-91): (defun rmail-mode-2 () | ||
| 1258 | 1.1 (roland 13-May-91): (kill-all-local-variables) | ||
| 1259 | 1.1 (roland 13-May-91): (rmail-mode-1) | ||
| 1260 | 1.259 (kwzh 08-Apr-98): (rmail-perm-variables) | ||
| 1261 | 1.200 (rms 12-Oct-96): (rmail-variables)) | ||
| 1262 | 1.1 (roland 13-May-91): | ||
| 1263 | 1.1 (roland 13-May-91): (defun rmail-mode-1 () | ||
| 1264 | 1.1 (roland 13-May-91): (setq major-mode 'rmail-mode) | ||
| 1265 | 1.1 (roland 13-May-91): (setq mode-name "RMAIL") | ||
| 1266 | 1.1 (roland 13-May-91): (setq buffer-read-only t) | ||
| 1267 | 1.75 (rms 24-Dec-93): ;; No need to auto save RMAIL files in normal circumstances | ||
| 1268 | 1.75 (rms 24-Dec-93): ;; because they contain no info except attribute changes | ||
| 1269 | 1.75 (rms 24-Dec-93): ;; and deletion of messages. | ||
| 1270 | 1.75 (rms 24-Dec-93): ;; The one exception is when messages are copied into an Rmail mode buffer. | ||
| 1271 | 1.75 (rms 24-Dec-93): ;; rmail-output-to-rmail-file enables auto save when you do that. | ||
| 1272 | 1.1 (roland 13-May-91): (setq buffer-auto-save-file-name nil) | ||
| 1273 | 1.235 (rms 26-Aug-97): (setq mode-line-modified "--") | ||
| 1274 | 1.1 (roland 13-May-91): (use-local-map rmail-mode-map) | ||
| 1275 | 1.1 (roland 13-May-91): (set-syntax-table text-mode-syntax-table) | ||
| 1276 | 1.1 (roland 13-May-91): (setq local-abbrev-table text-mode-abbrev-table)) | ||
| 1277 | 1.1 (roland 13-May-91): | ||
| 1278 | 1.259 (kwzh 08-Apr-98): ;; Set up the permanent locals associated with an Rmail file. | ||
| 1279 | 1.259 (kwzh 08-Apr-98): (defun rmail-perm-variables () | ||
| 1280 | 1.1 (roland 13-May-91): (make-local-variable 'rmail-last-label) | ||
| 1281 | 1.39 (rms 09-Mar-93): (make-local-variable 'rmail-last-regexp) | ||
| 1282 | 1.1 (roland 13-May-91): (make-local-variable 'rmail-deleted-vector) | ||
| 1283 | 1.212 (handa 26-Feb-97): (make-local-variable 'rmail-buffer) | ||
| 1284 | 1.212 (handa 26-Feb-97): (setq rmail-buffer (current-buffer)) | ||
| 1285 | 1.212 (handa 26-Feb-97): (make-local-variable 'rmail-view-buffer) | ||
| 1286 | 1.212 (handa 26-Feb-97): (setq rmail-view-buffer rmail-buffer) | ||
| 1287 | 1.1 (roland 13-May-91): (make-local-variable 'rmail-summary-buffer) | ||
| 1288 | 1.1 (roland 13-May-91): (make-local-variable 'rmail-summary-vector) | ||
| 1289 | 1.1 (roland 13-May-91): (make-local-variable 'rmail-current-message) | ||
| 1290 | 1.1 (roland 13-May-91): (make-local-variable 'rmail-total-messages) | ||
| 1291 | 1.98 (rms 24-Apr-94): (make-local-variable 'rmail-overlay-list) | ||
| 1292 | 1.98 (rms 24-Apr-94): (setq rmail-overlay-list nil) | ||
| 1293 | 1.1 (roland 13-May-91): (make-local-variable 'rmail-message-vector) | ||
| 1294 | 1.218 (rms 02-May-97): (make-local-variable 'rmail-msgref-vector) | ||
| 1295 | 1.1 (roland 13-May-91): (make-local-variable 'rmail-inbox-list) | ||
| 1296 | 1.1 (roland 13-May-91): (setq rmail-inbox-list (rmail-parse-file-inboxes)) | ||
| 1297 | 1.47 (rms 07-Jun-93): ;; Provide default set of inboxes for primary mail file ~/RMAIL. | ||
| 1298 | 1.47 (rms 07-Jun-93): (and (null rmail-inbox-list) | ||
| 1299 | 1.54 (rms 06-Jul-93): (or (equal buffer-file-name (expand-file-name rmail-file-name)) | ||
| 1300 | 1.72 (rms 26-Nov-93): (equal buffer-file-truename | ||
| 1301 | 1.72 (rms 26-Nov-93): (abbreviate-file-name (file-truename rmail-file-name)))) | ||
| 1302 | 1.47 (rms 07-Jun-93): (setq rmail-inbox-list | ||
| 1303 | 1.47 (rms 07-Jun-93): (or rmail-primary-inbox-list | ||
| 1304 | 1.47 (rms 07-Jun-93): (list (or (getenv "MAIL") | ||
| 1305 | 1.47 (rms 07-Jun-93): (concat rmail-spool-directory | ||
| 1306 | 1.86 (kwzh 11-Feb-94): (user-login-name))))))) | ||
| 1307 | 1.1 (roland 13-May-91): (make-local-variable 'rmail-keywords) | ||
| 1308 | 1.423 (eliz 25-Mar-06): (set (make-local-variable 'tool-bar-map) rmail-tool-bar-map) | ||
| 1309 | 1.1 (roland 13-May-91): ;; this gets generated as needed | ||
| 1310 | 1.104 (rms 19-May-94): (setq rmail-keywords nil)) | ||
| 1311 | 1.1 (roland 13-May-91): | ||
| 1312 | 1.259 (kwzh 08-Apr-98): ;; Set up the non-permanent locals associated with Rmail mode. | ||
| 1313 | 1.259 (kwzh 08-Apr-98): (defun rmail-variables () | ||
| 1314 | 1.265 (rms 12-May-98): (make-local-variable 'save-buffer-coding-system) | ||
| 1315 | 1.265 (rms 12-May-98): ;; If we don't already have a value for save-buffer-coding-system, | ||
| 1316 | 1.265 (rms 12-May-98): ;; get it from buffer-file-coding-system, and clear that | ||
| 1317 | 1.265 (rms 12-May-98): ;; because it should be determined in rmail-show-message. | ||
| 1318 | 1.265 (rms 12-May-98): (unless save-buffer-coding-system | ||
| 1319 | 1.265 (rms 12-May-98): (setq save-buffer-coding-system (or buffer-file-coding-system 'undecided)) | ||
| 1320 | 1.265 (rms 12-May-98): (setq buffer-file-coding-system nil)) | ||
| 1321 | 1.259 (kwzh 08-Apr-98): ;; Don't let a local variables list in a message cause confusion. | ||
| 1322 | 1.276 (rms 13-Jun-98): (make-local-variable 'local-enable-local-variables) | ||
| 1323 | 1.276 (rms 13-Jun-98): (setq local-enable-local-variables nil) | ||
| 1324 | 1.259 (kwzh 08-Apr-98): (make-local-variable 'revert-buffer-function) | ||
| 1325 | 1.259 (kwzh 08-Apr-98): (setq revert-buffer-function 'rmail-revert) | ||
| 1326 | 1.259 (kwzh 08-Apr-98): (make-local-variable 'font-lock-defaults) | ||
| 1327 | 1.259 (kwzh 08-Apr-98): (setq font-lock-defaults | ||
| 1328 | 1.265 (rms 12-May-98): '(rmail-font-lock-keywords | ||
| 1329 | 1.367 (rms 06-Jan-03): t t nil nil | ||
| 1330 | 1.265 (rms 12-May-98): (font-lock-maximum-size . nil) | ||
| 1331 | 1.265 (rms 12-May-98): (font-lock-fontify-buffer-function . rmail-fontify-buffer-function) | ||
| 1332 | 1.265 (rms 12-May-98): (font-lock-unfontify-buffer-function . rmail-unfontify-buffer-function) | ||
| 1333 | 1.265 (rms 12-May-98): (font-lock-inhibit-thing-lock . (lazy-lock-mode fast-lock-mode)))) | ||
| 1334 | 1.259 (kwzh 08-Apr-98): (make-local-variable 'require-final-newline) | ||
| 1335 | 1.259 (kwzh 08-Apr-98): (setq require-final-newline nil) | ||
| 1336 | 1.259 (kwzh 08-Apr-98): (make-local-variable 'version-control) | ||
| 1337 | 1.259 (kwzh 08-Apr-98): (setq version-control 'never) | ||
| 1338 | 1.259 (kwzh 08-Apr-98): (make-local-variable 'kill-buffer-hook) | ||
| 1339 | 1.259 (kwzh 08-Apr-98): (add-hook 'kill-buffer-hook 'rmail-mode-kill-summary) | ||
| 1340 | 1.259 (kwzh 08-Apr-98): (make-local-variable 'file-precious-flag) | ||
| 1341 | 1.391 (lh 26-Apr-04): (setq file-precious-flag t) | ||
| 1342 | 1.391 (lh 26-Apr-04): (make-local-variable 'desktop-save-buffer) | ||
| 1343 | 1.391 (lh 26-Apr-04): (setq desktop-save-buffer t)) | ||
| 1344 | 1.259 (kwzh 08-Apr-98): | ||
| 1345 | 1.1 (roland 13-May-91): ;; Handle M-x revert-buffer done in an rmail-mode buffer. | ||
| 1346 | 1.1 (roland 13-May-91): (defun rmail-revert (arg noconfirm) | ||
| 1347 | 1.342 (gerd 31-May-01): (set-buffer rmail-buffer) | ||
| 1348 | 1.280 (rms 09-Jul-98): (let* ((revert-buffer-function (default-value 'revert-buffer-function)) | ||
| 1349 | 1.280 (rms 09-Jul-98): (rmail-enable-multibyte enable-multibyte-characters) | ||
| 1350 | 1.280 (rms 09-Jul-98): ;; See similar code in `rmail'. | ||
| 1351 | 1.280 (rms 09-Jul-98): (coding-system-for-read (and rmail-enable-multibyte 'raw-text))) | ||
| 1352 | 1.1 (roland 13-May-91): ;; Call our caller again, but this time it does the default thing. | ||
| 1353 | 1.1 (roland 13-May-91): (if (revert-buffer arg noconfirm) | ||
| 1354 | 1.1 (roland 13-May-91): ;; If the user said "yes", and we changed something, | ||
| 1355 | 1.1 (roland 13-May-91): ;; reparse the messages. | ||
| 1356 | 1.243 (rms 19-Jan-98): (progn | ||
| 1357 | 1.342 (gerd 31-May-01): (set-buffer rmail-buffer) | ||
| 1358 | 1.342 (gerd 31-May-01): (rmail-mode-2) | ||
| 1359 | 1.280 (rms 09-Jul-98): ;; Convert all or part to Babyl file if possible. | ||
| 1360 | 1.1 (roland 13-May-91): (rmail-convert-file) | ||
| 1361 | 1.280 (rms 09-Jul-98): ;; We have read the file as raw-text, so the buffer is set to | ||
| 1362 | 1.280 (rms 09-Jul-98): ;; unibyte. Make it multibyte if necessary. | ||
| 1363 | 1.280 (rms 09-Jul-98): (if (and rmail-enable-multibyte | ||
| 1364 | 1.280 (rms 09-Jul-98): (not enable-multibyte-characters)) | ||
| 1365 | 1.280 (rms 09-Jul-98): (set-buffer-multibyte t)) | ||
| 1366 | 1.1 (roland 13-May-91): (goto-char (point-max)) | ||
| 1367 | 1.280 (rms 09-Jul-98): (rmail-set-message-counters) | ||
| 1368 | 1.280 (rms 09-Jul-98): (rmail-show-message rmail-total-messages) | ||
| 1369 | 1.280 (rms 09-Jul-98): (run-hooks 'rmail-mode-hook))))) | ||
| 1370 | 1.1 (roland 13-May-91): | ||
| 1371 | 1.1 (roland 13-May-91): ;; Return a list of files from this buffer's Mail: option. | ||
| 1372 | 1.1 (roland 13-May-91): ;; Does not assume that messages have been parsed. | ||
| 1373 | 1.1 (roland 13-May-91): ;; Just returns nil if buffer does not look like Babyl format. | ||
| 1374 | 1.1 (roland 13-May-91): (defun rmail-parse-file-inboxes () | ||
| 1375 | 1.1 (roland 13-May-91): (save-excursion | ||
| 1376 | 1.1 (roland 13-May-91): (save-restriction | ||
| 1377 | 1.1 (roland 13-May-91): (widen) | ||
| 1378 | 1.1 (roland 13-May-91): (goto-char 1) | ||
| 1379 | 1.1 (roland 13-May-91): (cond ((looking-at "BABYL OPTIONS:") | ||
| 1380 | 1.1 (roland 13-May-91): (search-forward "\n\^_" nil 'move) | ||
| 1381 | 1.1 (roland 13-May-91): (narrow-to-region 1 (point)) | ||
| 1382 | 1.1 (roland 13-May-91): (goto-char 1) | ||
| 1383 | 1.1 (roland 13-May-91): (if (search-forward "\nMail:" nil t) | ||
| 1384 | 1.1 (roland 13-May-91): (progn | ||
| 1385 | 1.1 (roland 13-May-91): (narrow-to-region (point) (progn (end-of-line) (point))) | ||
| 1386 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 1387 | 1.1 (roland 13-May-91): (mail-parse-comma-list)))))))) | ||
| 1388 | 1.1 (roland 13-May-91): | ||
| 1389 | 1.1 (roland 13-May-91): (defun rmail-expunge-and-save () | ||
| 1390 | 1.1 (roland 13-May-91): "Expunge and save RMAIL file." | ||
| 1391 | 1.1 (roland 13-May-91): (interactive) | ||
| 1392 | 1.1 (roland 13-May-91): (rmail-expunge) | ||
| 1393 | 1.339 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 1394 | 1.85 (kwzh 09-Feb-94): (save-buffer) | ||
| 1395 | 1.85 (kwzh 09-Feb-94): (if (rmail-summary-exists) | ||
| 1396 | 1.85 (kwzh 09-Feb-94): (rmail-select-summary (set-buffer-modified-p nil)))) | ||
| 1397 | 1.1 (roland 13-May-91): | ||
| 1398 | 1.1 (roland 13-May-91): (defun rmail-quit () | ||
| 1399 | 1.294 (rms 18-Jan-99): "Quit out of RMAIL. | ||
| 1400 | 1.294 (rms 18-Jan-99): Hook `rmail-quit-hook' is run after expunging." | ||
| 1401 | 1.1 (roland 13-May-91): (interactive) | ||
| 1402 | 1.1 (roland 13-May-91): (rmail-expunge-and-save) | ||
| 1403 | 1.294 (rms 18-Jan-99): (when (boundp 'rmail-quit-hook) | ||
| 1404 | 1.294 (rms 18-Jan-99): (run-hooks 'rmail-quit-hook)) | ||
| 1405 | 1.1 (roland 13-May-91): ;; Don't switch to the summary buffer even if it was recently visible. | ||
| 1406 | 1.251 (rms 08-Mar-98): (when rmail-summary-buffer | ||
| 1407 | 1.251 (rms 08-Mar-98): (replace-buffer-in-windows rmail-summary-buffer) | ||
| 1408 | 1.251 (rms 08-Mar-98): (bury-buffer rmail-summary-buffer)) | ||
| 1409 | 1.339 (gerd 08-May-01): (if rmail-enable-mime | ||
| 1410 | 1.339 (gerd 08-May-01): (let ((obuf rmail-buffer) | ||
| 1411 | 1.339 (gerd 08-May-01): (ovbuf rmail-view-buffer)) | ||
| 1412 | 1.339 (gerd 08-May-01): (set-buffer rmail-view-buffer) | ||
| 1413 | 1.339 (gerd 08-May-01): (quit-window) | ||
| 1414 | 1.339 (gerd 08-May-01): (replace-buffer-in-windows ovbuf) | ||
| 1415 | 1.339 (gerd 08-May-01): (replace-buffer-in-windows obuf) | ||
| 1416 | 1.339 (gerd 08-May-01): (bury-buffer obuf)) | ||
| 1417 | 1.339 (gerd 08-May-01): (let ((obuf (current-buffer))) | ||
| 1418 | 1.339 (gerd 08-May-01): (quit-window) | ||
| 1419 | 1.339 (gerd 08-May-01): (replace-buffer-in-windows obuf)))) | ||
| 1420 | 1.1 (roland 13-May-91): | ||
| 1421 | 1.147 (rms 12-Mar-95): (defun rmail-bury () | ||
| 1422 | 1.147 (rms 12-Mar-95): "Bury current Rmail buffer and its summary buffer." | ||
| 1423 | 1.147 (rms 12-Mar-95): (interactive) | ||
| 1424 | 1.147 (rms 12-Mar-95): ;; This let var was called rmail-buffer, but that interfered | ||
| 1425 | 1.147 (rms 12-Mar-95): ;; with the buffer-local var used in summary buffers. | ||
| 1426 | 1.147 (rms 12-Mar-95): (let ((buffer-to-bury (current-buffer))) | ||
| 1427 | 1.147 (rms 12-Mar-95): (if (rmail-summary-exists) | ||
| 1428 | 1.147 (rms 12-Mar-95): (let (window) | ||
| 1429 | 1.147 (rms 12-Mar-95): (while (setq window (get-buffer-window rmail-summary-buffer)) | ||
| 1430 | 1.251 (rms 08-Mar-98): (quit-window nil window)) | ||
| 1431 | 1.147 (rms 12-Mar-95): (bury-buffer rmail-summary-buffer))) | ||
| 1432 | 1.251 (rms 08-Mar-98): (quit-window))) | ||
| 1433 | 1.147 (rms 12-Mar-95): | ||
| 1434 | 1.147 (rms 12-Mar-95): (defun rmail-duplicate-message () | ||
| 1435 | 1.147 (rms 12-Mar-95): "Create a duplicated copy of the current message. | ||
| 1436 | 1.147 (rms 12-Mar-95): The duplicate copy goes into the Rmail file just after the | ||
| 1437 | 1.147 (rms 12-Mar-95): original copy." | ||
| 1438 | 1.147 (rms 12-Mar-95): (interactive) | ||
| 1439 | 1.147 (rms 12-Mar-95): (widen) | ||
| 1440 | 1.147 (rms 12-Mar-95): (let ((buffer-read-only nil) | ||
| 1441 | 1.147 (rms 12-Mar-95): (number rmail-current-message) | ||
| 1442 | 1.147 (rms 12-Mar-95): (string (buffer-substring (rmail-msgbeg rmail-current-message) | ||
| 1443 | 1.147 (rms 12-Mar-95): (rmail-msgend rmail-current-message)))) | ||
| 1444 | 1.147 (rms 12-Mar-95): (goto-char (rmail-msgend rmail-current-message)) | ||
| 1445 | 1.147 (rms 12-Mar-95): (insert string) | ||
| 1446 | 1.147 (rms 12-Mar-95): (rmail-forget-messages) | ||
| 1447 | 1.147 (rms 12-Mar-95): (rmail-show-message number) | ||
| 1448 | 1.147 (rms 12-Mar-95): (message "Message duplicated"))) | ||
| 1449 | 1.147 (rms 12-Mar-95): | ||
| 1450 | 1.1 (roland 13-May-91): ;;;###autoload | ||
| 1451 | 1.1 (roland 13-May-91): (defun rmail-input (filename) | ||
| 1452 | 1.39 (rms 09-Mar-93): "Run Rmail on file FILENAME." | ||
| 1453 | 1.1 (roland 13-May-91): (interactive "FRun rmail on RMAIL file: ") | ||
| 1454 | 1.1 (roland 13-May-91): (rmail filename)) | ||
| 1455 | 1.1 (roland 13-May-91): | ||
| 1456 | 1.198 (rms 19-Sep-96): | ||
| 1457 | 1.198 (rms 19-Sep-96): ;; This used to scan subdirectories recursively, but someone pointed out | ||
| 1458 | 1.198 (rms 19-Sep-96): ;; that if the user wants that, person can put all the files in one dir. | ||
| 1459 | 1.198 (rms 19-Sep-96): ;; And the recursive scan was slow. So I took it out. | ||
| 1460 | 1.198 (rms 19-Sep-96): ;; rms, Sep 1996. | ||
| 1461 | 1.126 (rms 19-Sep-94): (defun rmail-find-all-files (start) | ||
| 1462 | 1.198 (rms 19-Sep-96): "Return list of file in dir START that match `rmail-secondary-file-regexp'." | ||
| 1463 | 1.126 (rms 19-Sep-94): (if (file-accessible-directory-p start) | ||
| 1464 | 1.135 (rms 11-Oct-94): ;; Don't sort here. | ||
| 1465 | 1.198 (rms 19-Sep-96): (let* ((case-fold-search t) | ||
| 1466 | 1.198 (rms 19-Sep-96): (files (directory-files start t rmail-secondary-file-regexp))) | ||
| 1467 | 1.135 (rms 11-Oct-94): ;; Sort here instead of in directory-files | ||
| 1468 | 1.135 (rms 11-Oct-94): ;; because this list is usually much shorter. | ||
| 1469 | 1.198 (rms 19-Sep-96): (sort files 'string<)))) | ||
| 1470 | 1.126 (rms 19-Sep-94): | ||
| 1471 | 1.126 (rms 19-Sep-94): (defun rmail-list-to-menu (menu-name l action &optional full-name) | ||
| 1472 | 1.126 (rms 19-Sep-94): (let ((menu (make-sparse-keymap menu-name))) | ||
| 1473 | 1.440 (gm 12-Oct-07): (mapc | ||
| 1474 | 1.126 (rms 19-Sep-94): (function (lambda (item) | ||
| 1475 | 1.148 (rms 12-Mar-95): (let (command) | ||
| 1476 | 1.148 (rms 12-Mar-95): (if (consp item) | ||
| 1477 | 1.148 (rms 12-Mar-95): (progn | ||
| 1478 | 1.148 (rms 12-Mar-95): (setq command | ||
| 1479 | 1.358 (pot 06-May-02): (rmail-list-to-menu (car item) (cdr item) | ||
| 1480 | 1.358 (pot 06-May-02): action | ||
| 1481 | 1.148 (rms 12-Mar-95): (if full-name | ||
| 1482 | 1.148 (rms 12-Mar-95): (concat full-name "/" | ||
| 1483 | 1.148 (rms 12-Mar-95): (car item)) | ||
| 1484 | 1.148 (rms 12-Mar-95): (car item)))) | ||
| 1485 | 1.148 (rms 12-Mar-95): (setq name (car item))) | ||
| 1486 | 1.126 (rms 19-Sep-94): (progn | ||
| 1487 | 1.148 (rms 12-Mar-95): (setq name item) | ||
| 1488 | 1.358 (pot 06-May-02): (setq command | ||
| 1489 | 1.148 (rms 12-Mar-95): (list 'lambda () '(interactive) | ||
| 1490 | 1.148 (rms 12-Mar-95): (list action | ||
| 1491 | 1.358 (pot 06-May-02): (expand-file-name | ||
| 1492 | 1.148 (rms 12-Mar-95): (if full-name | ||
| 1493 | 1.148 (rms 12-Mar-95): (concat full-name "/" item) | ||
| 1494 | 1.148 (rms 12-Mar-95): item) | ||
| 1495 | 1.148 (rms 12-Mar-95): rmail-secondary-file-directory)))))) | ||
| 1496 | 1.148 (rms 12-Mar-95): (define-key menu (vector (intern name)) | ||
| 1497 | 1.148 (rms 12-Mar-95): (cons name command))))) | ||
| 1498 | 1.135 (rms 11-Oct-94): (reverse l)) | ||
| 1499 | 1.126 (rms 19-Sep-94): menu)) | ||
| 1500 | 1.358 (pot 06-May-02): | ||
| 1501 | 1.135 (rms 11-Oct-94): ;; This command is always "disabled" when it appears in a menu. | ||
| 1502 | 1.135 (rms 11-Oct-94): (put 'rmail-disable-menu 'menu-enable ''nil) | ||
| 1503 | 1.135 (rms 11-Oct-94): | ||
| 1504 | 1.126 (rms 19-Sep-94): (defun rmail-construct-io-menu () | ||
| 1505 | 1.126 (rms 19-Sep-94): (let ((files (rmail-find-all-files rmail-secondary-file-directory))) | ||
| 1506 | 1.135 (rms 11-Oct-94): (if files | ||
| 1507 | 1.126 (rms 19-Sep-94): (progn | ||
| 1508 | 1.126 (rms 19-Sep-94): (define-key rmail-mode-map [menu-bar classify input-menu] | ||
| 1509 | 1.358 (pot 06-May-02): (cons "Input Rmail File" | ||
| 1510 | 1.358 (pot 06-May-02): (rmail-list-to-menu "Input Rmail File" | ||
| 1511 | 1.135 (rms 11-Oct-94): files | ||
| 1512 | 1.126 (rms 19-Sep-94): 'rmail-input))) | ||
| 1513 | 1.126 (rms 19-Sep-94): (define-key rmail-mode-map [menu-bar classify output-menu] | ||
| 1514 | 1.358 (pot 06-May-02): (cons "Output Rmail File" | ||
| 1515 | 1.358 (pot 06-May-02): (rmail-list-to-menu "Output Rmail File" | ||
| 1516 | 1.135 (rms 11-Oct-94): files | ||
| 1517 | 1.135 (rms 11-Oct-94): 'rmail-output-to-rmail-file)))) | ||
| 1518 | 1.135 (rms 11-Oct-94): | ||
| 1519 | 1.135 (rms 11-Oct-94): (define-key rmail-mode-map [menu-bar classify input-menu] | ||
| 1520 | 1.135 (rms 11-Oct-94): '("Input Rmail File" . rmail-disable-menu)) | ||
| 1521 | 1.135 (rms 11-Oct-94): (define-key rmail-mode-map [menu-bar classify output-menu] | ||
| 1522 | 1.135 (rms 11-Oct-94): '("Output Rmail File" . rmail-disable-menu))))) | ||
| 1523 | 1.102 (rms 04-May-94): | ||
| 1524 | 1.1 (roland 13-May-91): | ||
| 1525 | 1.1 (roland 13-May-91): ;;;; *** Rmail input *** | ||
| 1526 | 1.1 (roland 13-May-91): | ||
| 1527 | 1.443 (dann 27-Nov-07): (declare-function rmail-spam-filter "rmail-spam-filter" (msg)) | ||
| 1528 | 1.443 (dann 27-Nov-07): (declare-function rmail-summary-goto-msg "rmailsum" (&optional n nowarn skip-rmail)) | ||
| 1529 | 1.443 (dann 27-Nov-07): (declare-function rmail-summary-mark-undeleted "rmailsum" (n)) | ||
| 1530 | 1.443 (dann 27-Nov-07): (declare-function rmail-summary-mark-deleted "rmailsum" (&optional n undel)) | ||
| 1531 | 1.443 (dann 27-Nov-07): (declare-function rfc822-addresses "rfc822" (header-text)) | ||
| 1532 | 1.443 (dann 27-Nov-07): (declare-function mail-abbrev-make-syntax-table "mailabbrev.el" ()) | ||
| 1533 | 1.443 (dann 27-Nov-07): (declare-function mail-sendmail-delimit-header "sendmail" ()) | ||
| 1534 | 1.443 (dann 27-Nov-07): (declare-function mail-header-end "sendmail" ()) | ||
| 1535 | 1.443 (dann 27-Nov-07): | ||
| 1536 | 1.1 (roland 13-May-91): ;; RLK feature not added in this version: | ||
| 1537 | 1.1 (roland 13-May-91): ;; argument specifies inbox file or files in various ways. | ||
| 1538 | 1.1 (roland 13-May-91): | ||
| 1539 | 1.1 (roland 13-May-91): (defun rmail-get-new-mail (&optional file-name) | ||
| 1540 | 1.1 (roland 13-May-91): "Move any new mail from this RMAIL file's inbox files. | ||
| 1541 | 1.1 (roland 13-May-91): The inbox files can be specified with the file's Mail: option. The | ||
| 1542 | 1.1 (roland 13-May-91): variable `rmail-primary-inbox-list' specifies the inboxes for your | ||
| 1543 | 1.40 (rms 29-Mar-93): primary RMAIL file if it has no Mail: option. By default, this is | ||
| 1544 | 1.40 (rms 29-Mar-93): your /usr/spool/mail/$USER. | ||
| 1545 | 1.1 (roland 13-May-91): | ||
| 1546 | 1.1 (roland 13-May-91): You can also specify the file to get new mail from. In this case, the | ||
| 1547 | 1.1 (roland 13-May-91): file of new mail is not changed or deleted. Noninteractively, you can | ||
| 1548 | 1.1 (roland 13-May-91): pass the inbox file name as an argument. Interactively, a prefix | ||
| 1549 | 1.124 (rms 05-Sep-94): argument causes us to read a file name and use that file as the inbox. | ||
| 1550 | 1.124 (rms 05-Sep-94): | ||
| 1551 | 1.205 (rms 21-Jan-97): If the variable `rmail-preserve-inbox' is non-nil, new mail will | ||
| 1552 | 1.205 (rms 21-Jan-97): always be left in inbox files rather than deleted. | ||
| 1553 | 1.205 (rms 21-Jan-97): | ||
| 1554 | 1.138 (rms 03-Dec-94): This function runs `rmail-get-new-mail-hook' before saving the updated file. | ||
| 1555 | 1.138 (rms 03-Dec-94): It returns t if it got any new messages." | ||
| 1556 | 1.1 (roland 13-May-91): (interactive | ||
| 1557 | 1.1 (roland 13-May-91): (list (if current-prefix-arg | ||
| 1558 | 1.1 (roland 13-May-91): (read-file-name "Get new mail from file: ")))) | ||
| 1559 | 1.190 (rms 28-Jun-96): (run-hooks 'rmail-before-get-new-mail-hook) | ||
| 1560 | 1.152 (rms 24-Apr-95): ;; If the disk file has been changed from under us, | ||
| 1561 | 1.152 (rms 24-Apr-95): ;; revert to it before we get new mail. | ||
| 1562 | 1.1 (roland 13-May-91): (or (verify-visited-file-modtime (current-buffer)) | ||
| 1563 | 1.152 (rms 24-Apr-95): (find-file (buffer-file-name))) | ||
| 1564 | 1.339 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 1565 | 1.1 (roland 13-May-91): (rmail-maybe-set-message-counters) | ||
| 1566 | 1.1 (roland 13-May-91): (widen) | ||
| 1567 | 1.1 (roland 13-May-91): ;; Get rid of all undo records for this buffer. | ||
| 1568 | 1.1 (roland 13-May-91): (or (eq buffer-undo-list t) | ||
| 1569 | 1.1 (roland 13-May-91): (setq buffer-undo-list nil)) | ||
| 1570 | 1.198 (rms 19-Sep-96): (let ((all-files (if file-name (list file-name) | ||
| 1571 | 1.237 (kwzh 15-Oct-97): rmail-inbox-list)) | ||
| 1572 | 1.247 (handa 20-Feb-98): (rmail-enable-multibyte (default-value 'enable-multibyte-characters)) | ||
| 1573 | 1.237 (kwzh 15-Oct-97): found) | ||
| 1574 | 1.198 (rms 19-Sep-96): (unwind-protect | ||
| 1575 | 1.237 (kwzh 15-Oct-97): (progn | ||
| 1576 | 1.206 (kwzh 25-Jan-97): (while all-files | ||
| 1577 | 1.206 (kwzh 25-Jan-97): (let ((opoint (point)) | ||
| 1578 | 1.206 (kwzh 25-Jan-97): (new-messages 0) | ||
| 1579 | 1.380 (uid65566 16-Jan-04): (rsf-number-of-spam 0) | ||
| 1580 | 1.206 (kwzh 25-Jan-97): (delete-files ()) | ||
| 1581 | 1.206 (kwzh 25-Jan-97): ;; If buffer has not changed yet, and has not been saved yet, | ||
| 1582 | 1.206 (kwzh 25-Jan-97): ;; don't replace the old backup file now. | ||
| 1583 | 1.206 (kwzh 25-Jan-97): (make-backup-files (and make-backup-files (buffer-modified-p))) | ||
| 1584 | 1.206 (kwzh 25-Jan-97): (buffer-read-only nil) | ||
| 1585 | 1.206 (kwzh 25-Jan-97): ;; Don't make undo records for what we do in getting mail. | ||
| 1586 | 1.206 (kwzh 25-Jan-97): (buffer-undo-list t) | ||
| 1587 | 1.206 (kwzh 25-Jan-97): success | ||
| 1588 | 1.206 (kwzh 25-Jan-97): ;; Files to insert this time around. | ||
| 1589 | 1.206 (kwzh 25-Jan-97): files | ||
| 1590 | 1.206 (kwzh 25-Jan-97): ;; Last names of those files. | ||
| 1591 | 1.206 (kwzh 25-Jan-97): file-last-names) | ||
| 1592 | 1.206 (kwzh 25-Jan-97): ;; Pull files off all-files onto files | ||
| 1593 | 1.206 (kwzh 25-Jan-97): ;; as long as there is no name conflict. | ||
| 1594 | 1.206 (kwzh 25-Jan-97): ;; A conflict happens when two inbox file names | ||
| 1595 | 1.206 (kwzh 25-Jan-97): ;; have the same last component. | ||
| 1596 | 1.206 (kwzh 25-Jan-97): (while (and all-files | ||
| 1597 | 1.206 (kwzh 25-Jan-97): (not (member (file-name-nondirectory (car all-files)) | ||
| 1598 | 1.206 (kwzh 25-Jan-97): file-last-names))) | ||
| 1599 | 1.206 (kwzh 25-Jan-97): (setq files (cons (car all-files) files) | ||
| 1600 | 1.206 (kwzh 25-Jan-97): file-last-names | ||
| 1601 | 1.206 (kwzh 25-Jan-97): (cons (file-name-nondirectory (car all-files)) files)) | ||
| 1602 | 1.206 (kwzh 25-Jan-97): (setq all-files (cdr all-files))) | ||
| 1603 | 1.206 (kwzh 25-Jan-97): ;; Put them back in their original order. | ||
| 1604 | 1.206 (kwzh 25-Jan-97): (setq files (nreverse files)) | ||
| 1605 | 1.198 (rms 19-Sep-96): | ||
| 1606 | 1.206 (kwzh 25-Jan-97): (goto-char (point-max)) | ||
| 1607 | 1.206 (kwzh 25-Jan-97): (skip-chars-backward " \t\n") ; just in case of brain damage | ||
| 1608 | 1.206 (kwzh 25-Jan-97): (delete-region (point) (point-max)) ; caused by require-final-newline | ||
| 1609 | 1.206 (kwzh 25-Jan-97): (save-excursion | ||
| 1610 | 1.206 (kwzh 25-Jan-97): (save-restriction | ||
| 1611 | 1.206 (kwzh 25-Jan-97): (narrow-to-region (point) (point)) | ||
| 1612 | 1.206 (kwzh 25-Jan-97): ;; Read in the contents of the inbox files, | ||
| 1613 | 1.206 (kwzh 25-Jan-97): ;; renaming them as necessary, | ||
| 1614 | 1.206 (kwzh 25-Jan-97): ;; and adding to the list of files to delete eventually. | ||
| 1615 | 1.206 (kwzh 25-Jan-97): (if file-name | ||
| 1616 | 1.206 (kwzh 25-Jan-97): (rmail-insert-inbox-text files nil) | ||
| 1617 | 1.206 (kwzh 25-Jan-97): (setq delete-files (rmail-insert-inbox-text files t))) | ||
| 1618 | 1.206 (kwzh 25-Jan-97): ;; Scan the new text and convert each message to babyl format. | ||
| 1619 | 1.206 (kwzh 25-Jan-97): (goto-char (point-min)) | ||
| 1620 | 1.206 (kwzh 25-Jan-97): (unwind-protect | ||
| 1621 | 1.206 (kwzh 25-Jan-97): (save-excursion | ||
| 1622 | 1.206 (kwzh 25-Jan-97): (setq new-messages (rmail-convert-to-babyl-format) | ||
| 1623 | 1.206 (kwzh 25-Jan-97): success t)) | ||
| 1624 | 1.290 (rms 21-Oct-98): ;; Try to delete the garbage just inserted. | ||
| 1625 | 1.290 (rms 21-Oct-98): (or success (delete-region (point-min) (point-max))) | ||
| 1626 | 1.206 (kwzh 25-Jan-97): ;; If we could not convert the file's inboxes, | ||
| 1627 | 1.206 (kwzh 25-Jan-97): ;; rename the files we tried to read | ||
| 1628 | 1.206 (kwzh 25-Jan-97): ;; so we won't over and over again. | ||
| 1629 | 1.206 (kwzh 25-Jan-97): (if (and (not file-name) (not success)) | ||
| 1630 | 1.206 (kwzh 25-Jan-97): (let ((delfiles delete-files) | ||
| 1631 | 1.206 (kwzh 25-Jan-97): (count 0)) | ||
| 1632 | 1.206 (kwzh 25-Jan-97): (while delfiles | ||
| 1633 | 1.206 (kwzh 25-Jan-97): (while (file-exists-p (format "RMAILOSE.%d" count)) | ||
| 1634 | 1.206 (kwzh 25-Jan-97): (setq count (1+ count))) | ||
| 1635 | 1.206 (kwzh 25-Jan-97): (rename-file (car delfiles) | ||
| 1636 | 1.206 (kwzh 25-Jan-97): (format "RMAILOSE.%d" count)) | ||
| 1637 | 1.206 (kwzh 25-Jan-97): (setq delfiles (cdr delfiles)))))) | ||
| 1638 | 1.206 (kwzh 25-Jan-97): (or (zerop new-messages) | ||
| 1639 | 1.206 (kwzh 25-Jan-97): (let (success) | ||
| 1640 | 1.206 (kwzh 25-Jan-97): (widen) | ||
| 1641 | 1.206 (kwzh 25-Jan-97): (search-backward "\n\^_" nil t) | ||
| 1642 | 1.206 (kwzh 25-Jan-97): (narrow-to-region (point) (point-max)) | ||
| 1643 | 1.206 (kwzh 25-Jan-97): (goto-char (1+ (point-min))) | ||
| 1644 | 1.206 (kwzh 25-Jan-97): (rmail-count-new-messages) | ||
| 1645 | 1.206 (kwzh 25-Jan-97): (run-hooks 'rmail-get-new-mail-hook) | ||
| 1646 | 1.206 (kwzh 25-Jan-97): (save-buffer))) | ||
| 1647 | 1.206 (kwzh 25-Jan-97): ;; Delete the old files, now that babyl file is saved. | ||
| 1648 | 1.206 (kwzh 25-Jan-97): (while delete-files | ||
| 1649 | 1.206 (kwzh 25-Jan-97): (condition-case () | ||
| 1650 | 1.206 (kwzh 25-Jan-97): ;; First, try deleting. | ||
| 1651 | 1.206 (kwzh 25-Jan-97): (condition-case () | ||
| 1652 | 1.206 (kwzh 25-Jan-97): (delete-file (car delete-files)) | ||
| 1653 | 1.206 (kwzh 25-Jan-97): (file-error | ||
| 1654 | 1.206 (kwzh 25-Jan-97): ;; If we can't delete it, truncate it. | ||
| 1655 | 1.206 (kwzh 25-Jan-97): (write-region (point) (point) (car delete-files)))) | ||
| 1656 | 1.206 (kwzh 25-Jan-97): (file-error nil)) | ||
| 1657 | 1.206 (kwzh 25-Jan-97): (setq delete-files (cdr delete-files))))) | ||
| 1658 | 1.206 (kwzh 25-Jan-97): (if (= new-messages 0) | ||
| 1659 | 1.206 (kwzh 25-Jan-97): (progn (goto-char opoint) | ||
| 1660 | 1.206 (kwzh 25-Jan-97): (if (or file-name rmail-inbox-list) | ||
| 1661 | 1.206 (kwzh 25-Jan-97): (message "(No new mail has arrived)"))) | ||
| 1662 | 1.380 (uid65566 16-Jan-04): ;; check new messages to see if any of them is spam: | ||
| 1663 | 1.385 (uid65627 17-Feb-04): (if (and (featurep 'rmail-spam-filter) | ||
| 1664 | 1.385 (uid65627 17-Feb-04): rmail-use-spam-filter) | ||
| 1665 | 1.380 (uid65566 16-Jan-04): (let* | ||
| 1666 | 1.380 (uid65566 16-Jan-04): ((old-messages (- rmail-total-messages new-messages)) | ||
| 1667 | 1.380 (uid65566 16-Jan-04): (rsf-scanned-message-number (1+ old-messages)) | ||
| 1668 | 1.380 (uid65566 16-Jan-04): ;; save deletion flags of old messages: vector starts | ||
| 1669 | 1.380 (uid65566 16-Jan-04): ;; at zero (is one longer that no of messages), | ||
| 1670 | 1.380 (uid65566 16-Jan-04): ;; therefore take 1+ old-messages | ||
| 1671 | 1.380 (uid65566 16-Jan-04): (save-deleted | ||
| 1672 | 1.380 (uid65566 16-Jan-04): (substring rmail-deleted-vector 0 (1+ | ||
| 1673 | 1.380 (uid65566 16-Jan-04): old-messages)))) | ||
| 1674 | 1.380 (uid65566 16-Jan-04): ;; set all messages to undeleted | ||
| 1675 | 1.380 (uid65566 16-Jan-04): (setq rmail-deleted-vector | ||
| 1676 | 1.380 (uid65566 16-Jan-04): (make-string (1+ rmail-total-messages) ?\ )) | ||
| 1677 | 1.380 (uid65566 16-Jan-04): (while (<= rsf-scanned-message-number | ||
| 1678 | 1.380 (uid65566 16-Jan-04): rmail-total-messages) | ||
| 1679 | 1.380 (uid65566 16-Jan-04): (progn | ||
| 1680 | 1.380 (uid65566 16-Jan-04): (if (not (rmail-spam-filter rsf-scanned-message-number)) | ||
| 1681 | 1.380 (uid65566 16-Jan-04): (progn (setq rsf-number-of-spam (1+ rsf-number-of-spam))) | ||
| 1682 | 1.380 (uid65566 16-Jan-04): ) | ||
| 1683 | 1.380 (uid65566 16-Jan-04): (setq rsf-scanned-message-number (1+ rsf-scanned-message-number)) | ||
| 1684 | 1.380 (uid65566 16-Jan-04): )) | ||
| 1685 | 1.380 (uid65566 16-Jan-04): (if (> rsf-number-of-spam 0) | ||
| 1686 | 1.380 (uid65566 16-Jan-04): (progn | ||
| 1687 | 1.380 (uid65566 16-Jan-04): (when (rmail-expunge-confirmed) | ||
| 1688 | 1.380 (uid65566 16-Jan-04): (rmail-only-expunge t)) | ||
| 1689 | 1.380 (uid65566 16-Jan-04): )) | ||
| 1690 | 1.380 (uid65566 16-Jan-04): (setq rmail-deleted-vector | ||
| 1691 | 1.380 (uid65566 16-Jan-04): (concat | ||
| 1692 | 1.380 (uid65566 16-Jan-04): save-deleted | ||
| 1693 | 1.380 (uid65566 16-Jan-04): (make-string (- rmail-total-messages old-messages) | ||
| 1694 | 1.380 (uid65566 16-Jan-04): ?\ ))) | ||
| 1695 | 1.380 (uid65566 16-Jan-04): )) | ||
| 1696 | 1.380 (uid65566 16-Jan-04): (if (rmail-summary-exists) | ||
| 1697 | 1.206 (kwzh 25-Jan-97): (rmail-select-summary | ||
| 1698 | 1.206 (kwzh 25-Jan-97): (rmail-update-summary))) | ||
| 1699 | 1.380 (uid65566 16-Jan-04): (message "%d new message%s read%s" | ||
| 1700 | 1.380 (uid65566 16-Jan-04): new-messages (if (= 1 new-messages) "" "s") | ||
| 1701 | 1.380 (uid65566 16-Jan-04): ;; print out a message on number of spam messages found: | ||
| 1702 | 1.385 (uid65627 17-Feb-04): (if (and (featurep 'rmail-spam-filter) | ||
| 1703 | 1.385 (uid65627 17-Feb-04): rmail-use-spam-filter | ||
| 1704 | 1.385 (uid65627 17-Feb-04): (> rsf-number-of-spam 0)) | ||
| 1705 | 1.427 (rms 08-Sep-06): (cond ((= 1 new-messages) | ||
| 1706 | 1.427 (rms 08-Sep-06): ", and appears to be spam") | ||
| 1707 | 1.427 (rms 08-Sep-06): ((= rsf-number-of-spam new-messages) | ||
| 1708 | 1.427 (rms 08-Sep-06): ", and all appear to be spam") | ||
| 1709 | 1.427 (rms 08-Sep-06): ((> rsf-number-of-spam 1) | ||
| 1710 | 1.427 (rms 08-Sep-06): (format ", and %d appear to be spam" | ||
| 1711 | 1.427 (rms 08-Sep-06): rsf-number-of-spam)) | ||
| 1712 | 1.427 (rms 08-Sep-06): (t | ||
| 1713 | 1.427 (rms 08-Sep-06): ", and 1 appears to be spam")) | ||
| 1714 | 1.380 (uid65566 16-Jan-04): "")) | ||
| 1715 | 1.385 (uid65627 17-Feb-04): (if (and (featurep 'rmail-spam-filter) | ||
| 1716 | 1.385 (uid65627 17-Feb-04): rmail-use-spam-filter | ||
| 1717 | 1.385 (uid65627 17-Feb-04): (> rsf-number-of-spam 0)) | ||
| 1718 | 1.393 (eliz 12-Nov-04): (progn (if rsf-beep (beep t)) | ||
| 1719 | 1.393 (eliz 12-Nov-04): (sleep-for rsf-sleep-after-message))) | ||
| 1720 | 1.380 (uid65566 16-Jan-04): | ||
| 1721 | 1.206 (kwzh 25-Jan-97): ;; Move to the first new message | ||
| 1722 | 1.206 (kwzh 25-Jan-97): ;; unless we have other unseen messages before it. | ||
| 1723 | 1.206 (kwzh 25-Jan-97): (rmail-show-message (rmail-first-unseen-message)) | ||
| 1724 | 1.206 (kwzh 25-Jan-97): (run-hooks 'rmail-after-get-new-mail-hook) | ||
| 1725 | 1.206 (kwzh 25-Jan-97): (setq found t)))) | ||
| 1726 | 1.206 (kwzh 25-Jan-97): found) | ||
| 1727 | 1.198 (rms 19-Sep-96): ;; Don't leave the buffer screwed up if we get a disk-full error. | ||
| 1728 | 1.237 (kwzh 15-Oct-97): (or found (rmail-show-message))))) | ||
| 1729 | 1.1 (roland 13-May-91): | ||
| 1730 | 1.395 (eliz 15-Jan-05): (defun rmail-parse-url (file) | ||
| 1731 | 1.395 (eliz 15-Jan-05): "Parse the supplied URL. Return (list MAILBOX-NAME REMOTE PASSWORD GOT-PASSWORD) | ||
| 1732 | 1.395 (eliz 15-Jan-05): WHERE MAILBOX-NAME is the name of the mailbox suitable as argument to the | ||
| 1733 | 1.395 (eliz 15-Jan-05): actual version of `movemail', REMOTE is non-nil if MAILBOX-NAME refers to | ||
| 1734 | 1.395 (eliz 15-Jan-05): a remote mailbox, PASSWORD is the password if it should be | ||
| 1735 | 1.395 (eliz 15-Jan-05): supplied as a separate argument to `movemail' or nil otherwise, GOT-PASSWORD | ||
| 1736 | 1.395 (eliz 15-Jan-05): is non-nil if the user has supplied the password interactively. | ||
| 1737 | 1.395 (eliz 15-Jan-05): " | ||
| 1738 | 1.398 (eliz 02-Apr-05): (cond | ||
| 1739 | 1.398 (eliz 02-Apr-05): ((string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file) | ||
| 1740 | 1.396 (kfstorm 09-Feb-05): (let (got-password supplied-password | ||
| 1741 | 1.395 (eliz 15-Jan-05): (proto (match-string 1 file)) | ||
| 1742 | 1.395 (eliz 15-Jan-05): (user (match-string 3 file)) | ||
| 1743 | 1.395 (eliz 15-Jan-05): (pass (match-string 5 file)) | ||
| 1744 | 1.395 (eliz 15-Jan-05): (host (substring file (or (match-end 2) | ||
| 1745 | 1.395 (eliz 15-Jan-05): (+ 3 (match-end 1)))))) | ||
| 1746 | 1.407 (ttn 06-Aug-05): | ||
| 1747 | 1.395 (eliz 15-Jan-05): (if (not pass) | ||
| 1748 | 1.395 (eliz 15-Jan-05): (when rmail-remote-password-required | ||
| 1749 | 1.395 (eliz 15-Jan-05): (setq got-password (not (rmail-have-password))) | ||
| 1750 | 1.395 (eliz 15-Jan-05): (setq supplied-password (rmail-get-remote-password | ||
| 1751 | 1.395 (eliz 15-Jan-05): (string-equal proto "imap"))))) | ||
| 1752 | 1.396 (kfstorm 09-Feb-05): | ||
| 1753 | 1.395 (eliz 15-Jan-05): (if (rmail-movemail-variant-p 'emacs) | ||
| 1754 | 1.395 (eliz 15-Jan-05): (if (string-equal proto "pop") | ||
| 1755 | 1.395 (eliz 15-Jan-05): (list (concat "po:" user ":" host) | ||
| 1756 | 1.395 (eliz 15-Jan-05): t | ||
| 1757 | 1.395 (eliz 15-Jan-05): (or pass supplied-password) | ||
| 1758 | 1.395 (eliz 15-Jan-05): got-password) | ||
| 1759 | 1.395 (eliz 15-Jan-05): (error "Emacs movemail does not support %s protocol" proto)) | ||
| 1760 | 1.395 (eliz 15-Jan-05): (list file | ||
| 1761 | 1.395 (eliz 15-Jan-05): (or (string-equal proto "pop") (string-equal proto "imap")) | ||
| 1762 | 1.395 (eliz 15-Jan-05): supplied-password | ||
| 1763 | 1.398 (eliz 02-Apr-05): got-password)))) | ||
| 1764 | 1.407 (ttn 06-Aug-05): | ||
| 1765 | 1.398 (eliz 02-Apr-05): ((string-match "^po:\\([^:]+\\)\\(:\\(.*\\)\\)?" file) | ||
| 1766 | 1.398 (eliz 02-Apr-05): (let (got-password supplied-password | ||
| 1767 | 1.398 (eliz 02-Apr-05): (proto "pop") | ||
| 1768 | 1.398 (eliz 02-Apr-05): (user (match-string 1 file)) | ||
| 1769 | 1.398 (eliz 02-Apr-05): (host (match-string 3 file))) | ||
| 1770 | 1.407 (ttn 06-Aug-05): | ||
| 1771 | 1.398 (eliz 02-Apr-05): (when rmail-remote-password-required | ||
| 1772 | 1.398 (eliz 02-Apr-05): (setq got-password (not (rmail-have-password))) | ||
| 1773 | 1.398 (eliz 02-Apr-05): (setq supplied-password (rmail-get-remote-password nil))) | ||
| 1774 | 1.398 (eliz 02-Apr-05): | ||
| 1775 | 1.398 (eliz 02-Apr-05): (list file "pop" supplied-password got-password))) | ||
| 1776 | 1.407 (ttn 06-Aug-05): | ||
| 1777 | 1.398 (eliz 02-Apr-05): (t | ||
| 1778 | 1.398 (eliz 02-Apr-05): (list file nil nil nil)))) | ||
| 1779 | 1.395 (eliz 15-Jan-05): | ||
| 1780 | 1.1 (roland 13-May-91): (defun rmail-insert-inbox-text (files renamep) | ||
| 1781 | 1.198 (rms 19-Sep-96): ;; Detect a locked file now, so that we avoid moving mail | ||
| 1782 | 1.198 (rms 19-Sep-96): ;; out of the real inbox file. (That could scare people.) | ||
| 1783 | 1.198 (rms 19-Sep-96): (or (memq (file-locked-p buffer-file-name) '(nil t)) | ||
| 1784 | 1.198 (rms 19-Sep-96): (error "RMAIL file %s is locked" | ||
| 1785 | 1.198 (rms 19-Sep-96): (file-name-nondirectory buffer-file-name))) | ||
| 1786 | 1.282 (rms 27-Jul-98): (let (file tofile delete-files movemail popmail got-password password) | ||
| 1787 | 1.1 (roland 13-May-91): (while files | ||
| 1788 | 1.395 (eliz 15-Jan-05): ;; Handle remote mailbox names specially; don't expand as filenames | ||
| 1789 | 1.296 (andrewi 29-Jan-99): ;; in case the userid contains a directory separator. | ||
| 1790 | 1.296 (andrewi 29-Jan-99): (setq file (car files)) | ||
| 1791 | 1.395 (eliz 15-Jan-05): (let ((url-data (rmail-parse-url file))) | ||
| 1792 | 1.395 (eliz 15-Jan-05): (setq file (nth 0 url-data)) | ||
| 1793 | 1.395 (eliz 15-Jan-05): (setq popmail (nth 1 url-data)) | ||
| 1794 | 1.395 (eliz 15-Jan-05): (setq password (nth 2 url-data)) | ||
| 1795 | 1.395 (eliz 15-Jan-05): (setq got-password (nth 3 url-data))) | ||
| 1796 | 1.395 (eliz 15-Jan-05): | ||
| 1797 | 1.296 (andrewi 29-Jan-99): (if popmail | ||
| 1798 | 1.296 (andrewi 29-Jan-99): (setq renamep t) | ||
| 1799 | 1.296 (andrewi 29-Jan-99): (setq file (file-truename | ||
| 1800 | 1.333 (handa 16-Mar-01): (substitute-in-file-name (expand-file-name file))))) | ||
| 1801 | 1.296 (andrewi 29-Jan-99): (setq tofile (expand-file-name | ||
| 1802 | 1.157 (rms 25-Jul-95): ;; Generate name to move to from inbox name, | ||
| 1803 | 1.157 (rms 25-Jul-95): ;; in case of multiple inboxes that need moving. | ||
| 1804 | 1.395 (eliz 15-Jan-05): (concat ".newmail-" | ||
| 1805 | 1.396 (kfstorm 09-Feb-05): (file-name-nondirectory | ||
| 1806 | 1.395 (eliz 15-Jan-05): (if (memq system-type '(windows-nt cygwin)) | ||
| 1807 | 1.395 (eliz 15-Jan-05): ;; cannot have "po:" in file name | ||
| 1808 | 1.395 (eliz 15-Jan-05): (substring file 3) | ||
| 1809 | 1.395 (eliz 15-Jan-05): file))) | ||
| 1810 | 1.157 (rms 25-Jul-95): ;; Use the directory of this rmail file | ||
| 1811 | 1.157 (rms 25-Jul-95): ;; because it's a nuisance to use the homedir | ||
| 1812 | 1.157 (rms 25-Jul-95): ;; if that is on a full disk and this rmail | ||
| 1813 | 1.157 (rms 25-Jul-95): ;; file isn't. | ||
| 1814 | 1.157 (rms 25-Jul-95): (file-name-directory | ||
| 1815 | 1.157 (rms 25-Jul-95): (expand-file-name buffer-file-name)))) | ||
| 1816 | 1.157 (rms 25-Jul-95): ;; Always use movemail to rename the file, | ||
| 1817 | 1.157 (rms 25-Jul-95): ;; since there can be mailboxes in various directories. | ||
| 1818 | 1.398 (eliz 02-Apr-05): (if (not popmail) | ||
| 1819 | 1.1 (roland 13-May-91): (progn | ||
| 1820 | 1.1 (roland 13-May-91): ;; On some systems, /usr/spool/mail/foo is a directory | ||
| 1821 | 1.1 (roland 13-May-91): ;; and the actual inbox is /usr/spool/mail/foo/foo. | ||
| 1822 | 1.1 (roland 13-May-91): (if (file-directory-p file) | ||
| 1823 | 1.86 (kwzh 11-Feb-94): (setq file (expand-file-name (user-login-name) | ||
| 1824 | 1.1 (roland 13-May-91): file))))) | ||
| 1825 | 1.150 (rms 14-Apr-95): (cond (popmail | ||
| 1826 | 1.395 (eliz 15-Jan-05): (message "Getting mail from the remote server ...")) | ||
| 1827 | 1.150 (rms 14-Apr-95): ((and (file-exists-p tofile) | ||
| 1828 | 1.150 (rms 14-Apr-95): (/= 0 (nth 7 (file-attributes tofile)))) | ||
| 1829 | 1.150 (rms 14-Apr-95): (message "Getting mail from %s..." tofile)) | ||
| 1830 | 1.150 (rms 14-Apr-95): ((and (file-exists-p file) | ||
| 1831 | 1.150 (rms 14-Apr-95): (/= 0 (nth 7 (file-attributes file)))) | ||
| 1832 | 1.150 (rms 14-Apr-95): (message "Getting mail from %s..." file))) | ||
| 1833 | 1.1 (roland 13-May-91): ;; Set TOFILE if have not already done so, and | ||
| 1834 | 1.1 (roland 13-May-91): ;; rename or copy the file FILE to TOFILE if and as appropriate. | ||
| 1835 | 1.1 (roland 13-May-91): (cond ((not renamep) | ||
| 1836 | 1.1 (roland 13-May-91): (setq tofile file)) | ||
| 1837 | 1.39 (rms 09-Mar-93): ((or (file-exists-p tofile) (and (not popmail) | ||
| 1838 | 1.39 (rms 09-Mar-93): (not (file-exists-p file)))) | ||
| 1839 | 1.1 (roland 13-May-91): nil) | ||
| 1840 | 1.1 (roland 13-May-91): (t | ||
| 1841 | 1.395 (eliz 15-Jan-05): (with-temp-buffer | ||
| 1842 | 1.395 (eliz 15-Jan-05): (let ((errors (current-buffer))) | ||
| 1843 | 1.395 (eliz 15-Jan-05): (buffer-disable-undo errors) | ||
| 1844 | 1.395 (eliz 15-Jan-05): (let ((args | ||
| 1845 | 1.395 (eliz 15-Jan-05): (append | ||
| 1846 | 1.439 (gm 22-Aug-07): (list rmail-movemail-program nil errors nil) | ||
| 1847 | 1.395 (eliz 15-Jan-05): (if rmail-preserve-inbox | ||
| 1848 | 1.395 (eliz 15-Jan-05): (list "-p") | ||
| 1849 | 1.395 (eliz 15-Jan-05): nil) | ||
| 1850 | 1.395 (eliz 15-Jan-05): (if (rmail-movemail-variant-p 'mailutils) | ||
| 1851 | 1.395 (eliz 15-Jan-05): (append (list "--emacs") rmail-movemail-flags) | ||
| 1852 | 1.395 (eliz 15-Jan-05): rmail-movemail-flags) | ||
| 1853 | 1.395 (eliz 15-Jan-05): (list file tofile) | ||
| 1854 | 1.395 (eliz 15-Jan-05): (if password (list password) nil)))) | ||
| 1855 | 1.395 (eliz 15-Jan-05): (apply 'call-process args)) | ||
| 1856 | 1.395 (eliz 15-Jan-05): (if (not (buffer-modified-p errors)) | ||
| 1857 | 1.395 (eliz 15-Jan-05): ;; No output => movemail won | ||
| 1858 | 1.395 (eliz 15-Jan-05): nil | ||
| 1859 | 1.395 (eliz 15-Jan-05): (set-buffer errors) | ||
| 1860 | 1.395 (eliz 15-Jan-05): (subst-char-in-region (point-min) (point-max) | ||
| 1861 | 1.395 (eliz 15-Jan-05): ?\n ?\ ) | ||
| 1862 | 1.395 (eliz 15-Jan-05): (goto-char (point-max)) | ||
| 1863 | 1.395 (eliz 15-Jan-05): (skip-chars-backward " \t") | ||
| 1864 | 1.395 (eliz 15-Jan-05): (delete-region (point) (point-max)) | ||
| 1865 | 1.395 (eliz 15-Jan-05): (goto-char (point-min)) | ||
| 1866 | 1.395 (eliz 15-Jan-05): (if (looking-at "movemail: ") | ||
| 1867 | 1.395 (eliz 15-Jan-05): (delete-region (point-min) (match-end 0))) | ||
| 1868 | 1.395 (eliz 15-Jan-05): (beep t) | ||
| 1869 | 1.395 (eliz 15-Jan-05): ;; If we just read the password, most likely it is | ||
| 1870 | 1.395 (eliz 15-Jan-05): ;; wrong. Otherwise, see if there is a specific | ||
| 1871 | 1.395 (eliz 15-Jan-05): ;; reason to think that the problem is a wrong passwd. | ||
| 1872 | 1.395 (eliz 15-Jan-05): (if (or got-password | ||
| 1873 | 1.395 (eliz 15-Jan-05): (re-search-forward rmail-remote-password-error | ||
| 1874 | 1.395 (eliz 15-Jan-05): nil t)) | ||
| 1875 | 1.395 (eliz 15-Jan-05): (rmail-set-remote-password nil)) | ||
| 1876 | 1.395 (eliz 15-Jan-05): | ||
| 1877 | 1.395 (eliz 15-Jan-05): ;; If using Mailutils, remove initial error code | ||
| 1878 | 1.395 (eliz 15-Jan-05): ;; abbreviation | ||
| 1879 | 1.395 (eliz 15-Jan-05): (when (rmail-movemail-variant-p 'mailutils) | ||
| 1880 | 1.395 (eliz 15-Jan-05): (goto-char (point-min)) | ||
| 1881 | 1.395 (eliz 15-Jan-05): (when (looking-at "[A-Z][A-Z0-9_]*:") | ||
| 1882 | 1.395 (eliz 15-Jan-05): (delete-region (point-min) (match-end 0)))) | ||
| 1883 | 1.396 (kfstorm 09-Feb-05): | ||
| 1884 | 1.395 (eliz 15-Jan-05): (message "movemail: %s" | ||
| 1885 | 1.395 (eliz 15-Jan-05): (buffer-substring (point-min) | ||
| 1886 | 1.395 (eliz 15-Jan-05): (point-max))) | ||
| 1887 | 1.396 (kfstorm 09-Feb-05): | ||
| 1888 | 1.395 (eliz 15-Jan-05): (sit-for 3) | ||
| 1889 | 1.395 (eliz 15-Jan-05): nil))))) | ||
| 1890 | 1.396 (kfstorm 09-Feb-05): | ||
| 1891 | 1.1 (roland 13-May-91): ;; At this point, TOFILE contains the name to read: | ||
| 1892 | 1.1 (roland 13-May-91): ;; Either the alternate name (if we renamed) | ||
| 1893 | 1.1 (roland 13-May-91): ;; or the actual inbox (if not renaming). | ||
| 1894 | 1.1 (roland 13-May-91): (if (file-exists-p tofile) | ||
| 1895 | 1.212 (handa 26-Feb-97): (let ((coding-system-for-read 'no-conversion) | ||
| 1896 | 1.212 (handa 26-Feb-97): size) | ||
| 1897 | 1.1 (roland 13-May-91): (goto-char (point-max)) | ||
| 1898 | 1.212 (handa 26-Feb-97): (setq size (nth 1 (insert-file-contents tofile))) | ||
| 1899 | 1.1 (roland 13-May-91): (goto-char (point-max)) | ||
| 1900 | 1.1 (roland 13-May-91): (or (= (preceding-char) ?\n) | ||
| 1901 | 1.1 (roland 13-May-91): (zerop size) | ||
| 1902 | 1.1 (roland 13-May-91): (insert ?\n)) | ||
| 1903 | 1.205 (rms 21-Jan-97): (if (not (and rmail-preserve-inbox (string= file tofile))) | ||
| 1904 | 1.205 (rms 21-Jan-97): (setq delete-files (cons tofile delete-files))))) | ||
| 1905 | 1.1 (roland 13-May-91): (message "") | ||
| 1906 | 1.1 (roland 13-May-91): (setq files (cdr files))) | ||
| 1907 | 1.1 (roland 13-May-91): delete-files)) | ||
| 1908 | 1.183 (rms 26-Apr-96): | ||
| 1909 | 1.295 (rms 28-Jan-99): ;; Decode the region specified by FROM and TO by CODING. | ||
| 1910 | 1.295 (rms 28-Jan-99): ;; If CODING is nil or an invalid coding system, decode by `undecided'. | ||
| 1911 | 1.295 (rms 28-Jan-99): (defun rmail-decode-region (from to coding) | ||
| 1912 | 1.295 (rms 28-Jan-99): (if (or (not coding) (not (coding-system-p coding))) | ||
| 1913 | 1.295 (rms 28-Jan-99): (setq coding 'undecided)) | ||
| 1914 | 1.390 (eliz 24-Apr-04): ;; Use -dos decoding, to remove ^M characters left from base64 or | ||
| 1915 | 1.390 (eliz 24-Apr-04): ;; rogue qp-encoded text. | ||
| 1916 | 1.390 (eliz 24-Apr-04): (decode-coding-region from to | ||
| 1917 | 1.390 (eliz 24-Apr-04): (coding-system-change-eol-conversion coding 1)) | ||
| 1918 | 1.390 (eliz 24-Apr-04): ;; Don't reveal the fact we used -dos decoding, as users generally | ||
| 1919 | 1.390 (eliz 24-Apr-04): ;; will not expect the RMAIL buffer to use DOS EOL format. | ||
| 1920 | 1.390 (eliz 24-Apr-04): (setq buffer-file-coding-system | ||
| 1921 | 1.390 (eliz 24-Apr-04): (setq last-coding-system-used | ||
| 1922 | 1.390 (eliz 24-Apr-04): (coding-system-change-eol-conversion coding 0)))) | ||
| 1923 | 1.295 (rms 28-Jan-99): | ||
| 1924 | 1.1 (roland 13-May-91): ;; the rmail-break-forwarded-messages feature is not implemented | ||
| 1925 | 1.1 (roland 13-May-91): (defun rmail-convert-to-babyl-format () | ||
| 1926 | 1.1 (roland 13-May-91): (let ((count 0) start | ||
| 1927 | 1.5 (rms 18-Aug-91): (case-fold-search nil) | ||
| 1928 | 1.427 (rms 08-Sep-06): (buffer-undo-list t) | ||
| 1929 | 1.5 (rms 18-Aug-91): (invalid-input-resync | ||
| 1930 | 1.5 (rms 18-Aug-91): (function (lambda () | ||
| 1931 | 1.5 (rms 18-Aug-91): (message "Invalid Babyl format in inbox!") | ||
| 1932 | 1.198 (rms 19-Sep-96): (sit-for 3) | ||
| 1933 | 1.5 (rms 18-Aug-91): ;; Try to get back in sync with a real message. | ||
| 1934 | 1.5 (rms 18-Aug-91): (if (re-search-forward | ||
| 1935 | 1.226 (rms 01-Jun-97): (concat rmail-mmdf-delim1 "\\|^From") nil t) | ||
| 1936 | 1.5 (rms 18-Aug-91): (beginning-of-line) | ||
| 1937 | 1.5 (rms 18-Aug-91): (goto-char (point-max))))))) | ||
| 1938 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 1939 | 1.1 (roland 13-May-91): (save-restriction | ||
| 1940 | 1.1 (roland 13-May-91): (while (not (eobp)) | ||
| 1941 | 1.212 (handa 26-Feb-97): (setq start (point)) | ||
| 1942 | 1.445 (m061211 13-Jan-08): (cond ((looking-at "BABYL OPTIONS:") ;Babyl header | ||
| 1943 | 1.5 (rms 18-Aug-91): (if (search-forward "\n\^_" nil t) | ||
| 1944 | 1.5 (rms 18-Aug-91): ;; If we find the proper terminator, delete through there. | ||
| 1945 | 1.5 (rms 18-Aug-91): (delete-region (point-min) (point)) | ||
| 1946 | 1.5 (rms 18-Aug-91): (funcall invalid-input-resync) | ||
| 1947 | 1.7 (mib 20-Aug-91): (delete-region (point-min) (point)))) | ||
| 1948 | 1.1 (roland 13-May-91): ;; Babyl format message | ||
| 1949 | 1.1 (roland 13-May-91): ((looking-at "\^L") | ||
| 1950 | 1.1 (roland 13-May-91): (or (search-forward "\n\^_" nil t) | ||
| 1951 | 1.5 (rms 18-Aug-91): (funcall invalid-input-resync)) | ||
| 1952 | 1.1 (roland 13-May-91): (setq count (1+ count)) | ||
| 1953 | 1.1 (roland 13-May-91): ;; Make sure there is no extra white space after the ^_ | ||
| 1954 | 1.1 (roland 13-May-91): ;; at the end of the message. | ||
| 1955 | 1.1 (roland 13-May-91): ;; Narrowing will make sure that whatever follows the junk | ||
| 1956 | 1.1 (roland 13-May-91): ;; will be treated properly. | ||
| 1957 | 1.1 (roland 13-May-91): (delete-region (point) | ||
| 1958 | 1.1 (roland 13-May-91): (save-excursion | ||
| 1959 | 1.1 (roland 13-May-91): (skip-chars-forward " \t\n") | ||
| 1960 | 1.1 (roland 13-May-91): (point))) | ||
| 1961 | 1.445 (m061211 13-Jan-08): ;; The following let* form was wrapped in a `save-excursion' | ||
| 1962 | 1.445 (m061211 13-Jan-08): ;; which in one case caused infinite looping, see: | ||
| 1963 | 1.445 (m061211 13-Jan-08): ;; http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00968.html | ||
| 1964 | 1.445 (m061211 13-Jan-08): ;; Removing that form leaves `point' at the end of the | ||
| 1965 | 1.445 (m061211 13-Jan-08): ;; region decoded by `rmail-decode-region' which should | ||
| 1966 | 1.445 (m061211 13-Jan-08): ;; be correct. | ||
| 1967 | 1.445 (m061211 13-Jan-08): (let* ((header-end | ||
| 1968 | 1.445 (m061211 13-Jan-08): (progn | ||
| 1969 | 1.372 (eliz 28-Aug-03): (save-excursion | ||
| 1970 | 1.372 (eliz 28-Aug-03): (goto-char start) | ||
| 1971 | 1.445 (m061211 13-Jan-08): (forward-line 1) | ||
| 1972 | 1.445 (m061211 13-Jan-08): (if (looking-at "0") | ||
| 1973 | 1.445 (m061211 13-Jan-08): (forward-line 1) | ||
| 1974 | 1.445 (m061211 13-Jan-08): (forward-line 2)) | ||
| 1975 | 1.445 (m061211 13-Jan-08): (save-restriction | ||
| 1976 | 1.445 (m061211 13-Jan-08): (narrow-to-region (point) (point-max)) | ||
| 1977 | 1.445 (m061211 13-Jan-08): (rfc822-goto-eoh) | ||
| 1978 | 1.445 (m061211 13-Jan-08): (point))))) | ||
| 1979 | 1.445 (m061211 13-Jan-08): (case-fold-search t) | ||
| 1980 | 1.445 (m061211 13-Jan-08): (quoted-printable-header-field-end | ||
| 1981 | 1.445 (m061211 13-Jan-08): (save-excursion | ||
| 1982 | 1.445 (m061211 13-Jan-08): (goto-char start) | ||
| 1983 | 1.445 (m061211 13-Jan-08): (re-search-forward | ||
| 1984 | 1.445 (m061211 13-Jan-08): "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*" | ||
| 1985 | 1.445 (m061211 13-Jan-08): header-end t))) | ||
| 1986 | 1.445 (m061211 13-Jan-08): (base64-header-field-end | ||
| 1987 | 1.372 (eliz 28-Aug-03): (save-excursion | ||
| 1988 | 1.445 (m061211 13-Jan-08): (goto-char start) | ||
| 1989 | 1.445 (m061211 13-Jan-08): ;; Don't try to decode non-text data. | ||
| 1990 | 1.445 (m061211 13-Jan-08): (and (re-search-forward | ||
| 1991 | 1.445 (m061211 13-Jan-08): "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/" | ||
| 1992 | 1.445 (m061211 13-Jan-08): header-end t) | ||
| 1993 | 1.445 (m061211 13-Jan-08): (goto-char start) | ||
| 1994 | 1.445 (m061211 13-Jan-08): (re-search-forward | ||
| 1995 | 1.445 (m061211 13-Jan-08): "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*" | ||
| 1996 | 1.445 (m061211 13-Jan-08): header-end t))))) | ||
| 1997 | 1.445 (m061211 13-Jan-08): (if quoted-printable-header-field-end | ||
| 1998 | 1.445 (m061211 13-Jan-08): (save-excursion | ||
| 1999 | 1.445 (m061211 13-Jan-08): (unless | ||
| 2000 | 1.445 (m061211 13-Jan-08): (mail-unquote-printable-region header-end (point) nil t t) | ||
| 2001 | 1.445 (m061211 13-Jan-08): (message "Malformed MIME quoted-printable message")) | ||
| 2002 | 1.445 (m061211 13-Jan-08): ;; Change "quoted-printable" to "8bit", | ||
| 2003 | 1.445 (m061211 13-Jan-08): ;; to reflect the decoding we just did. | ||
| 2004 | 1.445 (m061211 13-Jan-08): (goto-char quoted-printable-header-field-end) | ||
| 2005 | 1.445 (m061211 13-Jan-08): (delete-region (point) (search-backward ":")) | ||
| 2006 | 1.445 (m061211 13-Jan-08): (insert ": 8bit"))) | ||
| 2007 | 1.445 (m061211 13-Jan-08): (if base64-header-field-end | ||
| 2008 | 1.445 (m061211 13-Jan-08): (save-excursion | ||
| 2009 | 1.445 (m061211 13-Jan-08): (when | ||
| 2010 | 1.445 (m061211 13-Jan-08): (condition-case nil | ||
| 2011 | 1.445 (m061211 13-Jan-08): (progn | ||
| 2012 | 1.445 (m061211 13-Jan-08): (base64-decode-region (1+ header-end) | ||
| 2013 | 1.445 (m061211 13-Jan-08): (- (point) 2)) | ||
| 2014 | 1.445 (m061211 13-Jan-08): t) | ||
| 2015 | 1.445 (m061211 13-Jan-08): (error nil)) | ||
| 2016 | 1.445 (m061211 13-Jan-08): ;; Change "base64" to "8bit", to reflect the | ||
| 2017 | 1.445 (m061211 13-Jan-08): ;; decoding we just did. | ||
| 2018 | 1.445 (m061211 13-Jan-08): (goto-char base64-header-field-end) | ||
| 2019 | 1.372 (eliz 28-Aug-03): (delete-region (point) (search-backward ":")) | ||
| 2020 | 1.445 (m061211 13-Jan-08): (insert ": 8bit")))) | ||
| 2021 | 1.445 (m061211 13-Jan-08): (setq last-coding-system-used nil) | ||
| 2022 | 1.445 (m061211 13-Jan-08): (or rmail-enable-mime | ||
| 2023 | 1.445 (m061211 13-Jan-08): (not rmail-enable-multibyte) | ||
| 2024 | 1.445 (m061211 13-Jan-08): (let ((mime-charset | ||
| 2025 | 1.445 (m061211 13-Jan-08): (if (and rmail-decode-mime-charset | ||
| 2026 | 1.445 (m061211 13-Jan-08): (save-excursion | ||
| 2027 | 1.445 (m061211 13-Jan-08): (goto-char start) | ||
| 2028 | 1.445 (m061211 13-Jan-08): (search-forward "\n\n" nil t) | ||
| 2029 | 1.445 (m061211 13-Jan-08): (let ((case-fold-search t)) | ||
| 2030 | 1.445 (m061211 13-Jan-08): (re-search-backward | ||
| 2031 | 1.445 (m061211 13-Jan-08): rmail-mime-charset-pattern | ||
| 2032 | 1.445 (m061211 13-Jan-08): start t)))) | ||
| 2033 | 1.445 (m061211 13-Jan-08): (intern (downcase (match-string 1)))))) | ||
| 2034 | 1.445 (m061211 13-Jan-08): (rmail-decode-region start (point) mime-charset)))) | ||
| 2035 | 1.265 (rms 12-May-98): ;; Add an X-Coding-System: header if we don't have one. | ||
| 2036 | 1.265 (rms 12-May-98): (save-excursion | ||
| 2037 | 1.265 (rms 12-May-98): (goto-char start) | ||
| 2038 | 1.265 (rms 12-May-98): (forward-line 1) | ||
| 2039 | 1.265 (rms 12-May-98): (if (looking-at "0") | ||
| 2040 | 1.265 (rms 12-May-98): (forward-line 1) | ||
| 2041 | 1.265 (rms 12-May-98): (forward-line 2)) | ||
| 2042 | 1.265 (rms 12-May-98): (or (save-restriction | ||
| 2043 | 1.265 (rms 12-May-98): (narrow-to-region (point) (point-max)) | ||
| 2044 | 1.265 (rms 12-May-98): (rfc822-goto-eoh) | ||
| 2045 | 1.265 (rms 12-May-98): (goto-char (point-min)) | ||
| 2046 | 1.265 (rms 12-May-98): (re-search-forward "^X-Coding-System:" nil t)) | ||
| 2047 | 1.265 (rms 12-May-98): (insert "X-Coding-System: " | ||
| 2048 | 1.265 (rms 12-May-98): (symbol-name last-coding-system-used) | ||
| 2049 | 1.265 (rms 12-May-98): "\n"))) | ||
| 2050 | 1.374 (eliz 16-Oct-03): (narrow-to-region (point) (point-max)) | ||
| 2051 | 1.374 (eliz 16-Oct-03): (and (= 0 (% count 10)) | ||
| 2052 | 1.375 (eliz 16-Oct-03): (message "Converting to Babyl format...%d" count))) | ||
| 2053 | 1.1 (roland 13-May-91): ;;*** MMDF format | ||
| 2054 | 1.1 (roland 13-May-91): ((let ((case-fold-search t)) | ||
| 2055 | 1.226 (rms 01-Jun-97): (looking-at rmail-mmdf-delim1)) | ||
| 2056 | 1.1 (roland 13-May-91): (let ((case-fold-search t)) | ||
| 2057 | 1.1 (roland 13-May-91): (replace-match "\^L\n0, unseen,,\n*** EOOH ***\n") | ||
| 2058 | 1.226 (rms 01-Jun-97): (re-search-forward rmail-mmdf-delim2 nil t) | ||
| 2059 | 1.1 (roland 13-May-91): (replace-match "\^_")) | ||
| 2060 | 1.1 (roland 13-May-91): (save-excursion | ||
| 2061 | 1.1 (roland 13-May-91): (save-restriction | ||
| 2062 | 1.1 (roland 13-May-91): (narrow-to-region start (1- (point))) | ||
| 2063 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 2064 | 1.445 (m061211 13-Jan-08): (while (search-forward "\n\^_" nil t) ; single char "\^_" | ||
| 2065 | 1.445 (m061211 13-Jan-08): (replace-match "\n^_")))) ; 2 chars: "^" and "_" | ||
| 2066 | 1.265 (rms 12-May-98): (setq last-coding-system-used nil) | ||
| 2067 | 1.212 (handa 26-Feb-97): (or rmail-enable-mime | ||
| 2068 | 1.247 (handa 20-Feb-98): (not rmail-enable-multibyte) | ||
| 2069 | 1.225 (handa 16-May-97): (decode-coding-region start (point) 'undecided)) | ||
| 2070 | 1.265 (rms 12-May-98): (save-excursion | ||
| 2071 | 1.265 (rms 12-May-98): (goto-char start) | ||
| 2072 | 1.265 (rms 12-May-98): (forward-line 3) | ||
| 2073 | 1.265 (rms 12-May-98): (insert "X-Coding-System: " | ||
| 2074 | 1.265 (rms 12-May-98): (symbol-name last-coding-system-used) | ||
| 2075 | 1.265 (rms 12-May-98): "\n")) | ||
| 2076 | 1.1 (roland 13-May-91): (narrow-to-region (point) (point-max)) | ||
| 2077 | 1.374 (eliz 16-Oct-03): (setq count (1+ count)) | ||
| 2078 | 1.374 (eliz 16-Oct-03): (and (= 0 (% count 10)) | ||
| 2079 | 1.375 (eliz 16-Oct-03): (message "Converting to Babyl format...%d" count))) | ||
| 2080 | 1.1 (roland 13-May-91): ;;*** Mail format | ||
| 2081 | 1.1 (roland 13-May-91): ((looking-at "^From ") | ||
| 2082 | 1.1 (roland 13-May-91): (insert "\^L\n0, unseen,,\n*** EOOH ***\n") | ||
| 2083 | 1.1 (roland 13-May-91): (rmail-nuke-pinhead-header) | ||
| 2084 | 1.39 (rms 09-Mar-93): ;; If this message has a Content-Length field, | ||
| 2085 | 1.39 (rms 09-Mar-93): ;; skip to the end of the contents. | ||
| 2086 | 1.39 (rms 09-Mar-93): (let* ((header-end (save-excursion | ||
| 2087 | 1.39 (rms 09-Mar-93): (and (re-search-forward "\n\n" nil t) | ||
| 2088 | 1.77 (rms 06-Jan-94): (1- (point))))) | ||
| 2089 | 1.39 (rms 09-Mar-93): (case-fold-search t) | ||
| 2090 | 1.239 (kwzh 18-Nov-97): (quoted-printable-header-field-end | ||
| 2091 | 1.239 (kwzh 18-Nov-97): (save-excursion | ||
| 2092 | 1.239 (kwzh 18-Nov-97): (re-search-forward | ||
| 2093 | 1.240 (kwzh 18-Nov-97): "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*" | ||
| 2094 | 1.239 (kwzh 18-Nov-97): header-end t))) | ||
| 2095 | 1.372 (eliz 28-Aug-03): (base64-header-field-end | ||
| 2096 | 1.433 (eliz 03-Apr-07): (and | ||
| 2097 | 1.434 (eliz 14-May-07): ;; Don't decode non-text data. | ||
| 2098 | 1.433 (eliz 03-Apr-07): (save-excursion | ||
| 2099 | 1.433 (eliz 03-Apr-07): (re-search-forward | ||
| 2100 | 1.434 (eliz 14-May-07): "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/" | ||
| 2101 | 1.433 (eliz 03-Apr-07): header-end t)) | ||
| 2102 | 1.433 (eliz 03-Apr-07): (save-excursion | ||
| 2103 | 1.433 (eliz 03-Apr-07): (re-search-forward | ||
| 2104 | 1.434 (eliz 14-May-07): "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*" | ||
| 2105 | 1.433 (eliz 03-Apr-07): header-end t)))) | ||
| 2106 | 1.39 (rms 09-Mar-93): (size | ||
| 2107 | 1.39 (rms 09-Mar-93): ;; Get the numeric value from the Content-Length field. | ||
| 2108 | 1.39 (rms 09-Mar-93): (save-excursion | ||
| 2109 | 1.39 (rms 09-Mar-93): ;; Back up to end of prev line, | ||
| 2110 | 1.39 (rms 09-Mar-93): ;; in case the Content-Length field comes first. | ||
| 2111 | 1.39 (rms 09-Mar-93): (forward-char -1) | ||
| 2112 | 1.39 (rms 09-Mar-93): (and (search-forward "\ncontent-length: " | ||
| 2113 | 1.39 (rms 09-Mar-93): header-end t) | ||
| 2114 | 1.39 (rms 09-Mar-93): (let ((beg (point)) | ||
| 2115 | 1.39 (rms 09-Mar-93): (eol (progn (end-of-line) (point)))) | ||
| 2116 | 1.402 (lektu 16-May-05): (string-to-number (buffer-substring beg eol))))))) | ||
| 2117 | 1.90 (kwzh 17-Mar-94): (and size | ||
| 2118 | 1.90 (kwzh 17-Mar-94): (if (and (natnump size) | ||
| 2119 | 1.90 (kwzh 17-Mar-94): (<= (+ header-end size) (point-max)) | ||
| 2120 | 1.90 (kwzh 17-Mar-94): ;; Make sure this would put us at a position | ||
| 2121 | 1.90 (kwzh 17-Mar-94): ;; that we could continue from. | ||
| 2122 | 1.90 (kwzh 17-Mar-94): (save-excursion | ||
| 2123 | 1.90 (kwzh 17-Mar-94): (goto-char (+ header-end size)) | ||
| 2124 | 1.90 (kwzh 17-Mar-94): (skip-chars-forward "\n") | ||
| 2125 | 1.90 (kwzh 17-Mar-94): (or (eobp) | ||
| 2126 | 1.90 (kwzh 17-Mar-94): (and (looking-at "BABYL OPTIONS:") | ||
| 2127 | 1.90 (kwzh 17-Mar-94): (search-forward "\n\^_" nil t)) | ||
| 2128 | 1.90 (kwzh 17-Mar-94): (and (looking-at "\^L") | ||
| 2129 | 1.90 (kwzh 17-Mar-94): (search-forward "\n\^_" nil t)) | ||
| 2130 | 1.90 (kwzh 17-Mar-94): (let ((case-fold-search t)) | ||
| 2131 | 1.226 (rms 01-Jun-97): (looking-at rmail-mmdf-delim1)) | ||
| 2132 | 1.90 (kwzh 17-Mar-94): (looking-at "From ")))) | ||
| 2133 | 1.90 (kwzh 17-Mar-94): (goto-char (+ header-end size)) | ||
| 2134 | 1.90 (kwzh 17-Mar-94): (message "Ignoring invalid Content-Length field") | ||
| 2135 | 1.239 (kwzh 18-Nov-97): (sit-for 1 0 t))) | ||
| 2136 | 1.365 (rms 29-Nov-02): (if (let ((case-fold-search nil)) | ||
| 2137 | 1.365 (rms 29-Nov-02): (re-search-forward | ||
| 2138 | 1.365 (rms 29-Nov-02): (concat "^[\^_]?\\(" | ||
| 2139 | 1.365 (rms 29-Nov-02): rmail-unix-mail-delimiter | ||
| 2140 | 1.365 (rms 29-Nov-02): "\\|" | ||
| 2141 | 1.365 (rms 29-Nov-02): rmail-mmdf-delim1 "\\|" | ||
| 2142 | 1.365 (rms 29-Nov-02): "^BABYL OPTIONS:\\|" | ||
| 2143 | 1.365 (rms 29-Nov-02): "\^L\n[01],\\)") nil t)) | ||
| 2144 | 1.239 (kwzh 18-Nov-97): (goto-char (match-beginning 1)) | ||
| 2145 | 1.239 (kwzh 18-Nov-97): (goto-char (point-max))) | ||
| 2146 | 1.239 (kwzh 18-Nov-97): (setq count (1+ count)) | ||
| 2147 | 1.239 (kwzh 18-Nov-97): (if quoted-printable-header-field-end | ||
| 2148 | 1.239 (kwzh 18-Nov-97): (save-excursion | ||
| 2149 | 1.379 (uid65566 12-Jan-04): (unless | ||
| 2150 | 1.386 (rms 04-Mar-04): (mail-unquote-printable-region header-end (point) nil t t) | ||
| 2151 | 1.379 (uid65566 12-Jan-04): (message "Malformed MIME quoted-printable message")) | ||
| 2152 | 1.239 (kwzh 18-Nov-97): ;; Change "quoted-printable" to "8bit", | ||
| 2153 | 1.239 (kwzh 18-Nov-97): ;; to reflect the decoding we just did. | ||
| 2154 | 1.239 (kwzh 18-Nov-97): (goto-char quoted-printable-header-field-end) | ||
| 2155 | 1.372 (eliz 28-Aug-03): (delete-region (point) (search-backward ":")) | ||
| 2156 | 1.372 (eliz 28-Aug-03): (insert ": 8bit"))) | ||
| 2157 | 1.372 (eliz 28-Aug-03): (if base64-header-field-end | ||
| 2158 | 1.377 (uid65627 30-Dec-03): (save-excursion | ||
| 2159 | 1.377 (uid65627 30-Dec-03): (when | ||
| 2160 | 1.377 (uid65627 30-Dec-03): (condition-case nil | ||
| 2161 | 1.377 (uid65627 30-Dec-03): (progn | ||
| 2162 | 1.381 (uid66361 21-Jan-04): (base64-decode-region | ||
| 2163 | 1.381 (uid66361 21-Jan-04): (1+ header-end) | ||
| 2164 | 1.381 (uid66361 21-Jan-04): (save-excursion | ||
| 2165 | 1.381 (uid66361 21-Jan-04): ;; Prevent base64-decode-region | ||
| 2166 | 1.381 (uid66361 21-Jan-04): ;; from removing newline characters. | ||
| 2167 | 1.381 (uid66361 21-Jan-04): (skip-chars-backward "\n\t ") | ||
| 2168 | 1.381 (uid66361 21-Jan-04): (point))) | ||
| 2169 | 1.377 (uid65627 30-Dec-03): t) | ||
| 2170 | 1.377 (uid65627 30-Dec-03): (error nil)) | ||
| 2171 | 1.377 (uid65627 30-Dec-03): ;; Change "base64" to "8bit", to reflect the | ||
| 2172 | 1.377 (uid65627 30-Dec-03): ;; decoding we just did. | ||
| 2173 | 1.377 (uid65627 30-Dec-03): (goto-char base64-header-field-end) | ||
| 2174 | 1.377 (uid65627 30-Dec-03): (delete-region (point) (search-backward ":")) | ||
| 2175 | 1.377 (uid65627 30-Dec-03): (insert ": 8bit"))))) | ||
| 2176 | 1.39 (rms 09-Mar-93): | ||
| 2177 | 1.1 (roland 13-May-91): (save-excursion | ||
| 2178 | 1.1 (roland 13-May-91): (save-restriction | ||
| 2179 | 1.1 (roland 13-May-91): (narrow-to-region start (point)) | ||
| 2180 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 2181 | 1.445 (m061211 13-Jan-08): (while (search-forward "\n\^_" nil t) ; single char | ||
| 2182 | 1.445 (m061211 13-Jan-08): (replace-match "\n^_")))) ; 2 chars: "^" and "_" | ||
| 2183 | 1.386 (rms 04-Mar-04): ;; This is for malformed messages that don't end in newline. | ||
| 2184 | 1.386 (rms 04-Mar-04): ;; There shouldn't be any, but some users say occasionally | ||
| 2185 | 1.386 (rms 04-Mar-04): ;; there are some. | ||
| 2186 | 1.386 (rms 04-Mar-04): (or (bolp) (newline)) | ||
| 2187 | 1.1 (roland 13-May-91): (insert ?\^_) | ||
| 2188 | 1.265 (rms 12-May-98): (setq last-coding-system-used nil) | ||
| 2189 | 1.212 (handa 26-Feb-97): (or rmail-enable-mime | ||
| 2190 | 1.247 (handa 20-Feb-98): (not rmail-enable-multibyte) | ||
| 2191 | 1.295 (rms 28-Jan-99): (let ((mime-charset | ||
| 2192 | 1.295 (rms 28-Jan-99): (if (and rmail-decode-mime-charset | ||
| 2193 | 1.295 (rms 28-Jan-99): (save-excursion | ||
| 2194 | 1.295 (rms 28-Jan-99): (goto-char start) | ||
| 2195 | 1.295 (rms 28-Jan-99): (search-forward "\n\n" nil t) | ||
| 2196 | 1.295 (rms 28-Jan-99): (let ((case-fold-search t)) | ||
| 2197 | 1.295 (rms 28-Jan-99): (re-search-backward | ||
| 2198 | 1.295 (rms 28-Jan-99): rmail-mime-charset-pattern | ||
| 2199 | 1.295 (rms 28-Jan-99): start t)))) | ||
| 2200 | 1.426 (eliz 20-May-06): (intern (downcase (match-string 1)))))) | ||
| 2201 | 1.295 (rms 28-Jan-99): (rmail-decode-region start (point) mime-charset))) | ||
| 2202 | 1.265 (rms 12-May-98): (save-excursion | ||
| 2203 | 1.265 (rms 12-May-98): (goto-char start) | ||
| 2204 | 1.265 (rms 12-May-98): (forward-line 3) | ||
| 2205 | 1.265 (rms 12-May-98): (insert "X-Coding-System: " | ||
| 2206 | 1.265 (rms 12-May-98): (symbol-name last-coding-system-used) | ||
| 2207 | 1.265 (rms 12-May-98): "\n")) | ||
| 2208 | 1.374 (eliz 16-Oct-03): (narrow-to-region (point) (point-max)) | ||
| 2209 | 1.374 (eliz 16-Oct-03): (and (= 0 (% count 10)) | ||
| 2210 | 1.375 (eliz 16-Oct-03): (message "Converting to Babyl format...%d" count))) | ||
| 2211 | 1.1 (roland 13-May-91): ;; | ||
| 2212 | 1.43 (rms 09-May-93): ;; This kludge is because some versions of sendmail.el | ||
| 2213 | 1.43 (rms 09-May-93): ;; insert an extra newline at the beginning that shouldn't | ||
| 2214 | 1.43 (rms 09-May-93): ;; be there. sendmail.el has been fixed, but old versions | ||
| 2215 | 1.43 (rms 09-May-93): ;; may still be in use. -- rms, 7 May 1993. | ||
| 2216 | 1.43 (rms 09-May-93): ((eolp) (delete-char 1)) | ||
| 2217 | 1.7 (mib 20-Aug-91): (t (error "Cannot convert to babyl format"))))) | ||
| 2218 | 1.427 (rms 08-Sep-06): (setq buffer-undo-list nil) | ||
| 2219 | 1.1 (roland 13-May-91): count)) | ||
| 2220 | 1.1 (roland 13-May-91): | ||
| 2221 | 1.1 (roland 13-May-91): ;; Delete the "From ..." line, creating various other headers with | ||
| 2222 | 1.1 (roland 13-May-91): ;; information from it if they don't already exist. Now puts the | ||
| 2223 | 1.68 (rms 09-Oct-93): ;; original line into a mail-from: header line for debugging and for | ||
| 2224 | 1.68 (rms 09-Oct-93): ;; use by the rmail-output function. | ||
| 2225 | 1.1 (roland 13-May-91): (defun rmail-nuke-pinhead-header () | ||
| 2226 | 1.1 (roland 13-May-91): (save-excursion | ||
| 2227 | 1.1 (roland 13-May-91): (save-restriction | ||
| 2228 | 1.1 (roland 13-May-91): (let ((start (point)) | ||
| 2229 | 1.1 (roland 13-May-91): (end (progn | ||
| 2230 | 1.1 (roland 13-May-91): (condition-case () | ||
| 2231 | 1.1 (roland 13-May-91): (search-forward "\n\n") | ||
| 2232 | 1.1 (roland 13-May-91): (error | ||
| 2233 | 1.1 (roland 13-May-91): (goto-char (point-max)) | ||
| 2234 | 1.1 (roland 13-May-91): (insert "\n\n"))) | ||
| 2235 | 1.1 (roland 13-May-91): (point))) | ||
| 2236 | 1.1 (roland 13-May-91): has-from has-date) | ||
| 2237 | 1.1 (roland 13-May-91): (narrow-to-region start end) | ||
| 2238 | 1.1 (roland 13-May-91): (let ((case-fold-search t)) | ||
| 2239 | 1.1 (roland 13-May-91): (goto-char start) | ||
| 2240 | 1.1 (roland 13-May-91): (setq has-from (search-forward "\nFrom:" nil t)) | ||
| 2241 | 1.1 (roland 13-May-91): (goto-char start) | ||
| 2242 | 1.1 (roland 13-May-91): (setq has-date (and (search-forward "\nDate:" nil t) (point))) | ||
| 2243 | 1.1 (roland 13-May-91): (goto-char start)) | ||
| 2244 | 1.1 (roland 13-May-91): (let ((case-fold-search nil)) | ||
| 2245 | 1.10 (jimb 19-Apr-92): (if (re-search-forward (concat "^" rmail-unix-mail-delimiter) nil t) | ||
| 2246 | 1.1 (roland 13-May-91): (replace-match | ||
| 2247 | 1.1 (roland 13-May-91): (concat | ||
| 2248 | 1.1 (roland 13-May-91): "Mail-from: \\&" | ||
| 2249 | 1.1 (roland 13-May-91): ;; Keep and reformat the date if we don't | ||
| 2250 | 1.1 (roland 13-May-91): ;; have a Date: field. | ||
| 2251 | 1.1 (roland 13-May-91): (if has-date | ||
| 2252 | 1.1 (roland 13-May-91): "" | ||
| 2253 | 1.24 (jimb 13-Sep-92): (concat | ||
| 2254 | 1.188 (rms 28-Jun-96): "Date: \\2, \\4 \\3 \\9 \\5 " | ||
| 2255 | 1.358 (pot 06-May-02): | ||
| 2256 | 1.24 (jimb 13-Sep-92): ;; The timezone could be matched by group 7 or group 10. | ||
| 2257 | 1.24 (jimb 13-Sep-92): ;; If neither of them matched, assume EST, since only | ||
| 2258 | 1.24 (jimb 13-Sep-92): ;; Easterners would be so sloppy. | ||
| 2259 | 1.24 (jimb 13-Sep-92): ;; It's a shame the substitution can't use "\\10". | ||
| 2260 | 1.24 (jimb 13-Sep-92): (cond | ||
| 2261 | 1.24 (jimb 13-Sep-92): ((/= (match-beginning 7) (match-end 7)) "\\7") | ||
| 2262 | 1.24 (jimb 13-Sep-92): ((/= (match-beginning 10) (match-end 10)) | ||
| 2263 | 1.24 (jimb 13-Sep-92): (buffer-substring (match-beginning 10) | ||
| 2264 | 1.24 (jimb 13-Sep-92): (match-end 10))) | ||
| 2265 | 1.24 (jimb 13-Sep-92): (t "EST")) | ||
| 2266 | 1.24 (jimb 13-Sep-92): "\n")) | ||
| 2267 | 1.1 (roland 13-May-91): ;; Keep and reformat the sender if we don't | ||
| 2268 | 1.1 (roland 13-May-91): ;; have a From: field. | ||
| 2269 | 1.1 (roland 13-May-91): (if has-from | ||
| 2270 | 1.1 (roland 13-May-91): "" | ||
| 2271 | 1.60 (rms 29-Jul-93): "From: \\1\n")) | ||
| 2272 | 1.60 (rms 29-Jul-93): t))))))) | ||
| 2273 | 1.1 (roland 13-May-91): | ||
| 2274 | 1.1 (roland 13-May-91): ;;;; *** Rmail Message Formatting and Header Manipulation *** | ||
| 2275 | 1.1 (roland 13-May-91): | ||
| 2276 | 1.1 (roland 13-May-91): (defun rmail-reformat-message (beg end) | ||
| 2277 | 1.1 (roland 13-May-91): (goto-char beg) | ||
| 2278 | 1.1 (roland 13-May-91): (forward-line 1) | ||
| 2279 | 1.1 (roland 13-May-91): (if (/= (following-char) ?0) | ||
| 2280 | 1.348 (pj 15-Jul-01): (error "Bad format in RMAIL file")) | ||
| 2281 | 1.344 (rms 29-Jun-01): (let ((inhibit-read-only t) | ||
| 2282 | 1.1 (roland 13-May-91): (delta (- (buffer-size) end))) | ||
| 2283 | 1.1 (roland 13-May-91): (delete-char 1) | ||
| 2284 | 1.1 (roland 13-May-91): (insert ?1) | ||
| 2285 | 1.1 (roland 13-May-91): (forward-line 1) | ||
| 2286 | 1.60 (rms 29-Jul-93): (let ((case-fold-search t)) | ||
| 2287 | 1.68 (rms 09-Oct-93): (while (looking-at "Summary-line:\\|Mail-From:") | ||
| 2288 | 1.68 (rms 09-Oct-93): (forward-line 1))) | ||
| 2289 | 1.1 (roland 13-May-91): (if (looking-at "\\*\\*\\* EOOH \\*\\*\\*\n") | ||
| 2290 | 1.1 (roland 13-May-91): (delete-region (point) | ||
| 2291 | 1.1 (roland 13-May-91): (progn (forward-line 1) (point)))) | ||
| 2292 | 1.1 (roland 13-May-91): (let ((str (buffer-substring (point) | ||
| 2293 | 1.1 (roland 13-May-91): (save-excursion (search-forward "\n\n" end 'move) | ||
| 2294 | 1.1 (roland 13-May-91): (point))))) | ||
| 2295 | 1.1 (roland 13-May-91): (insert str "*** EOOH ***\n") | ||
| 2296 | 1.1 (roland 13-May-91): (narrow-to-region (point) (- (buffer-size) delta))) | ||
| 2297 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 2298 | 1.129 (rms 24-Sep-94): (if rmail-message-filter (funcall rmail-message-filter)) | ||
| 2299 | 1.150 (rms 14-Apr-95): (if (or rmail-displayed-headers rmail-ignored-headers) | ||
| 2300 | 1.150 (rms 14-Apr-95): (rmail-clear-headers)))) | ||
| 2301 | 1.1 (roland 13-May-91): | ||
| 2302 | 1.128 (rms 23-Sep-94): (defun rmail-clear-headers (&optional ignored-headers) | ||
| 2303 | 1.150 (rms 14-Apr-95): "Delete all header fields that Rmail should not show. | ||
| 2304 | 1.150 (rms 14-Apr-95): If the optional argument IGNORED-HEADERS is non-nil, | ||
| 2305 | 1.150 (rms 14-Apr-95): delete all header fields whose names match that regexp. | ||
| 2306 | 1.150 (rms 14-Apr-95): Otherwise, if `rmail-displayed-headers' is non-nil, | ||
| 2307 | 1.150 (rms 14-Apr-95): delete all header fields *except* those whose names match that regexp. | ||
| 2308 | 1.413 (rms 15-Aug-05): Otherwise, delete all header fields whose names match `rmail-ignored-headers' | ||
| 2309 | 1.413 (rms 15-Aug-05): unless they also match `rmail-nonignored-headers'." | ||
| 2310 | 1.253 (rms 16-Mar-98): (when (search-forward "\n\n" nil t) | ||
| 2311 | 1.253 (rms 16-Mar-98): (forward-char -1) | ||
| 2312 | 1.253 (rms 16-Mar-98): (let ((case-fold-search t) | ||
| 2313 | 1.253 (rms 16-Mar-98): (buffer-read-only nil)) | ||
| 2314 | 1.253 (rms 16-Mar-98): (if (and rmail-displayed-headers (null ignored-headers)) | ||
| 2315 | 1.254 (rms 26-Mar-98): (save-restriction | ||
| 2316 | 1.254 (rms 26-Mar-98): (narrow-to-region (point-min) (point)) | ||
| 2317 | 1.254 (rms 26-Mar-98): (let (lim next) | ||
| 2318 | 1.254 (rms 26-Mar-98): (goto-char (point-min)) | ||
| 2319 | 1.254 (rms 26-Mar-98): (while (and (not (eobp)) | ||
| 2320 | 1.254 (rms 26-Mar-98): (save-excursion | ||
| 2321 | 1.254 (rms 26-Mar-98): (if (re-search-forward "\n[^ \t]" nil t) | ||
| 2322 | 1.254 (rms 26-Mar-98): (setq lim (match-beginning 0) | ||
| 2323 | 1.254 (rms 26-Mar-98): next (1+ lim)) | ||
| 2324 | 1.254 (rms 26-Mar-98): (setq lim nil next (point-max))))) | ||
| 2325 | 1.254 (rms 26-Mar-98): (if (save-excursion | ||
| 2326 | 1.254 (rms 26-Mar-98): (re-search-forward rmail-displayed-headers lim t)) | ||
| 2327 | 1.254 (rms 26-Mar-98): (goto-char next) | ||
| 2328 | 1.254 (rms 26-Mar-98): (delete-region (point) next)))) | ||
| 2329 | 1.254 (rms 26-Mar-98): (goto-char (point-min))) | ||
| 2330 | 1.253 (rms 16-Mar-98): (or ignored-headers (setq ignored-headers rmail-ignored-headers)) | ||
| 2331 | 1.253 (rms 16-Mar-98): (save-restriction | ||
| 2332 | 1.253 (rms 16-Mar-98): (narrow-to-region (point-min) (point)) | ||
| 2333 | 1.413 (rms 15-Aug-05): (goto-char (point-min)) | ||
| 2334 | 1.320 (gerd 07-Jul-00): (while (and ignored-headers | ||
| 2335 | 1.413 (rms 15-Aug-05): (re-search-forward ignored-headers nil t)) | ||
| 2336 | 1.253 (rms 16-Mar-98): (beginning-of-line) | ||
| 2337 | 1.448 (bastien1 10-Feb-08): (if (and rmail-nonignored-headers | ||
| 2338 | 1.448 (bastien1 10-Feb-08): (looking-at rmail-nonignored-headers)) | ||
| 2339 | 1.413 (rms 15-Aug-05): (forward-line 1) | ||
| 2340 | 1.413 (rms 15-Aug-05): (delete-region (point) | ||
| 2341 | 1.413 (rms 15-Aug-05): (save-excursion | ||
| 2342 | 1.413 (rms 15-Aug-05): (if (re-search-forward "\n[^ \t]" nil t) | ||
| 2343 | 1.413 (rms 15-Aug-05): (1- (point)) | ||
| 2344 | 1.413 (rms 15-Aug-05): (point-max))))))))))) | ||
| 2345 | 1.1 (roland 13-May-91): | ||
| 2346 | 1.204 (rms 28-Dec-96): (defun rmail-msg-is-pruned () | ||
| 2347 | 1.1 (roland 13-May-91): (rmail-maybe-set-message-counters) | ||
| 2348 | 1.204 (rms 28-Dec-96): (save-restriction | ||
| 2349 | 1.271 (rms 27-May-98): (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max)) | ||
| 2350 | 1.204 (rms 28-Dec-96): (save-excursion | ||
| 2351 | 1.271 (rms 27-May-98): (goto-char (point-min)) | ||
| 2352 | 1.271 (rms 27-May-98): (forward-line 1) | ||
| 2353 | 1.204 (rms 28-Dec-96): (= (following-char) ?1)))) | ||
| 2354 | 1.204 (rms 28-Dec-96): | ||
| 2355 | 1.343 (gerd 26-Jun-01): (defun rmail-msg-restore-non-pruned-header () | ||
| 2356 | 1.344 (rms 29-Jun-01): (let ((old-point (point)) | ||
| 2357 | 1.344 (rms 29-Jun-01): new-point | ||
| 2358 | 1.344 (rms 29-Jun-01): new-start | ||
| 2359 | 1.344 (rms 29-Jun-01): (inhibit-read-only t)) | ||
| 2360 | 1.344 (rms 29-Jun-01): (save-excursion | ||
| 2361 | 1.344 (rms 29-Jun-01): (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max)) | ||
| 2362 | 1.343 (gerd 26-Jun-01): (goto-char (point-min)) | ||
| 2363 | 1.343 (gerd 26-Jun-01): (forward-line 1) | ||
| 2364 | 1.343 (gerd 26-Jun-01): ;; Change 1 to 0. | ||
| 2365 | 1.343 (gerd 26-Jun-01): (delete-char 1) | ||
| 2366 | 1.343 (gerd 26-Jun-01): (insert ?0) | ||
| 2367 | 1.343 (gerd 26-Jun-01): ;; Insert new EOOH line at the proper place. | ||
| 2368 | 1.343 (gerd 26-Jun-01): (forward-line 1) | ||
| 2369 | 1.343 (gerd 26-Jun-01): (let ((case-fold-search t)) | ||
| 2370 | 1.343 (gerd 26-Jun-01): (while (looking-at "Summary-Line:\\|Mail-From:") | ||
| 2371 | 1.343 (gerd 26-Jun-01): (forward-line 1))) | ||
| 2372 | 1.343 (gerd 26-Jun-01): (insert "*** EOOH ***\n") | ||
| 2373 | 1.343 (gerd 26-Jun-01): (setq new-start (point)) | ||
| 2374 | 1.343 (gerd 26-Jun-01): ;; Delete the old reformatted header. | ||
| 2375 | 1.343 (gerd 26-Jun-01): (forward-char -1) | ||
| 2376 | 1.343 (gerd 26-Jun-01): (search-forward "\n*** EOOH ***\n") | ||
| 2377 | 1.343 (gerd 26-Jun-01): (forward-line -1) | ||
| 2378 | 1.343 (gerd 26-Jun-01): (let ((start (point))) | ||
| 2379 | 1.343 (gerd 26-Jun-01): (search-forward "\n\n") | ||
| 2380 | 1.344 (rms 29-Jun-01): (if (and (<= start old-point) | ||
| 2381 | 1.344 (rms 29-Jun-01): (<= old-point (point))) | ||
| 2382 | 1.344 (rms 29-Jun-01): (setq new-point new-start)) | ||
| 2383 | 1.343 (gerd 26-Jun-01): (delete-region start (point))) | ||
| 2384 | 1.343 (gerd 26-Jun-01): ;; Narrow to after the new EOOH line. | ||
| 2385 | 1.344 (rms 29-Jun-01): (narrow-to-region new-start (point-max))) | ||
| 2386 | 1.344 (rms 29-Jun-01): (if new-point | ||
| 2387 | 1.344 (rms 29-Jun-01): (goto-char new-point)))) | ||
| 2388 | 1.343 (gerd 26-Jun-01): | ||
| 2389 | 1.343 (gerd 26-Jun-01): (defun rmail-msg-prune-header () | ||
| 2390 | 1.344 (rms 29-Jun-01): (let ((new-point | ||
| 2391 | 1.344 (rms 29-Jun-01): (= (point) (point-min)))) | ||
| 2392 | 1.344 (rms 29-Jun-01): (save-excursion | ||
| 2393 | 1.344 (rms 29-Jun-01): (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max)) | ||
| 2394 | 1.344 (rms 29-Jun-01): (rmail-reformat-message (point-min) (point-max))) | ||
| 2395 | 1.344 (rms 29-Jun-01): (if new-point | ||
| 2396 | 1.344 (rms 29-Jun-01): (goto-char (point-min))))) | ||
| 2397 | 1.343 (gerd 26-Jun-01): | ||
| 2398 | 1.204 (rms 28-Dec-96): (defun rmail-toggle-header (&optional arg) | ||
| 2399 | 1.204 (rms 28-Dec-96): "Show original message header if pruned header currently shown, or vice versa. | ||
| 2400 | 1.204 (rms 28-Dec-96): With argument ARG, show the message header pruned if ARG is greater than zero; | ||
| 2401 | 1.204 (rms 28-Dec-96): otherwise, show it in full." | ||
| 2402 | 1.204 (rms 28-Dec-96): (interactive "P") | ||
| 2403 | 1.343 (gerd 26-Jun-01): (let* ((pruned (with-current-buffer rmail-buffer | ||
| 2404 | 1.343 (gerd 26-Jun-01): (rmail-msg-is-pruned))) | ||
| 2405 | 1.273 (kwzh 04-Jun-98): (prune (if arg | ||
| 2406 | 1.273 (kwzh 04-Jun-98): (> (prefix-numeric-value arg) 0) | ||
| 2407 | 1.273 (kwzh 04-Jun-98): (not pruned)))) | ||
| 2408 | 1.273 (kwzh 04-Jun-98): (if (eq pruned prune) | ||
| 2409 | 1.273 (kwzh 04-Jun-98): t | ||
| 2410 | 1.343 (gerd 26-Jun-01): (set-buffer rmail-buffer) | ||
| 2411 | 1.273 (kwzh 04-Jun-98): (rmail-maybe-set-message-counters) | ||
| 2412 | 1.343 (gerd 26-Jun-01): (if rmail-enable-mime | ||
| 2413 | 1.343 (gerd 26-Jun-01): (let ((buffer-read-only nil)) | ||
| 2414 | 1.343 (gerd 26-Jun-01): (if pruned | ||
| 2415 | 1.343 (gerd 26-Jun-01): (rmail-msg-restore-non-pruned-header) | ||
| 2416 | 1.343 (gerd 26-Jun-01): (rmail-msg-prune-header)) | ||
| 2417 | 1.343 (gerd 26-Jun-01): (funcall rmail-show-mime-function)) | ||
| 2418 | 1.343 (gerd 26-Jun-01): (let* ((buffer-read-only nil) | ||
| 2419 | 1.343 (gerd 26-Jun-01): (window (get-buffer-window (current-buffer))) | ||
| 2420 | 1.343 (gerd 26-Jun-01): (at-point-min (= (point) (point-min))) | ||
| 2421 | 1.343 (gerd 26-Jun-01): (all-headers-visible (= (window-start window) (point-min))) | ||
| 2422 | 1.343 (gerd 26-Jun-01): (on-header | ||
| 2423 | 1.343 (gerd 26-Jun-01): (save-excursion | ||
| 2424 | 1.343 (gerd 26-Jun-01): (and (not (search-backward "\n\n" nil t)) | ||
| 2425 | 1.343 (gerd 26-Jun-01): (progn | ||
| 2426 | 1.343 (gerd 26-Jun-01): (end-of-line) | ||
| 2427 | 1.343 (gerd 26-Jun-01): (re-search-backward "^[-A-Za-z0-9]+:" nil t)) | ||
| 2428 | 1.343 (gerd 26-Jun-01): (match-string 0)))) | ||
| 2429 | 1.343 (gerd 26-Jun-01): (old-screen-line | ||
| 2430 | 1.343 (gerd 26-Jun-01): (rmail-count-screen-lines (window-start window) (point)))) | ||
| 2431 | 1.275 (rms 11-Jun-98): (if pruned | ||
| 2432 | 1.343 (gerd 26-Jun-01): (rmail-msg-restore-non-pruned-header) | ||
| 2433 | 1.343 (gerd 26-Jun-01): (rmail-msg-prune-header)) | ||
| 2434 | 1.343 (gerd 26-Jun-01): (cond (at-point-min | ||
| 2435 | 1.343 (gerd 26-Jun-01): (goto-char (point-min))) | ||
| 2436 | 1.343 (gerd 26-Jun-01): (on-header | ||
| 2437 | 1.343 (gerd 26-Jun-01): (goto-char (point-min)) | ||
| 2438 | 1.343 (gerd 26-Jun-01): (search-forward "\n\n") | ||
| 2439 | 1.343 (gerd 26-Jun-01): (or (re-search-backward | ||
| 2440 | 1.343 (gerd 26-Jun-01): (concat "^" (regexp-quote on-header)) nil t) | ||
| 2441 | 1.343 (gerd 26-Jun-01): (goto-char (point-min)))) | ||
| 2442 | 1.343 (gerd 26-Jun-01): (t | ||
| 2443 | 1.343 (gerd 26-Jun-01): (save-selected-window | ||
| 2444 | 1.343 (gerd 26-Jun-01): (select-window window) | ||
| 2445 | 1.343 (gerd 26-Jun-01): (recenter old-screen-line) | ||
| 2446 | 1.343 (gerd 26-Jun-01): (if (and all-headers-visible | ||
| 2447 | 1.343 (gerd 26-Jun-01): (not (= (window-start) (point-min)))) | ||
| 2448 | 1.355 (rms 06-Feb-02): (recenter (- (window-height) 2)))))))) | ||
| 2449 | 1.273 (kwzh 04-Jun-98): (rmail-highlight-headers)))) | ||
| 2450 | 1.273 (kwzh 04-Jun-98): | ||
| 2451 | 1.344 (rms 29-Jun-01): (defun rmail-narrow-to-non-pruned-header () | ||
| 2452 | 1.344 (rms 29-Jun-01): "Narrow to the whole (original) header of the current message." | ||
| 2453 | 1.344 (rms 29-Jun-01): (let (start end) | ||
| 2454 | 1.344 (rms 29-Jun-01): (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max)) | ||
| 2455 | 1.344 (rms 29-Jun-01): (goto-char (point-min)) | ||
| 2456 | 1.344 (rms 29-Jun-01): (forward-line 1) | ||
| 2457 | 1.344 (rms 29-Jun-01): (if (= (following-char) ?1) | ||
| 2458 | 1.344 (rms 29-Jun-01): (progn | ||
| 2459 | 1.344 (rms 29-Jun-01): (forward-line 1) | ||
| 2460 | 1.344 (rms 29-Jun-01): (setq start (point)) | ||
| 2461 | 1.344 (rms 29-Jun-01): (search-forward "*** EOOH ***\n") | ||
| 2462 | 1.344 (rms 29-Jun-01): (setq end (match-beginning 0))) | ||
| 2463 | 1.344 (rms 29-Jun-01): (forward-line 2) | ||
| 2464 | 1.344 (rms 29-Jun-01): (setq start (point)) | ||
| 2465 | 1.344 (rms 29-Jun-01): (search-forward "\n\n") | ||
| 2466 | 1.344 (rms 29-Jun-01): (setq end (1- (point)))) | ||
| 2467 | 1.344 (rms 29-Jun-01): (narrow-to-region start end) | ||
| 2468 | 1.344 (rms 29-Jun-01): (goto-char start))) | ||
| 2469 | 1.344 (rms 29-Jun-01): | ||
| 2470 | 1.273 (kwzh 04-Jun-98): ;; Lifted from repos-count-screen-lines. | ||
| 2471 | 1.273 (kwzh 04-Jun-98): ;; Return number of screen lines between START and END. | ||
| 2472 | 1.273 (kwzh 04-Jun-98): (defun rmail-count-screen-lines (start end) | ||
| 2473 | 1.272 (kwzh 02-Jun-98): (save-excursion | ||
| 2474 | 1.273 (kwzh 04-Jun-98): (save-restriction | ||
| 2475 | 1.273 (kwzh 04-Jun-98): (narrow-to-region start end) | ||
| 2476 | 1.273 (kwzh 04-Jun-98): (goto-char (point-min)) | ||
| 2477 | 1.273 (kwzh 04-Jun-98): (vertical-motion (- (point-max) (point-min)))))) | ||
| 2478 | 1.1 (roland 13-May-91): | ||
| 2479 | 1.1 (roland 13-May-91): ;;;; *** Rmail Attributes and Keywords *** | ||
| 2480 | 1.1 (roland 13-May-91): | ||
| 2481 | 1.1 (roland 13-May-91): ;; Make a string describing current message's attributes and keywords | ||
| 2482 | 1.1 (roland 13-May-91): ;; and set it up as the name of a minor mode | ||
| 2483 | 1.1 (roland 13-May-91): ;; so it will appear in the mode line. | ||
| 2484 | 1.1 (roland 13-May-91): (defun rmail-display-labels () | ||
| 2485 | 1.1 (roland 13-May-91): (let ((blurb "") (beg (point-min-marker)) (end (point-max-marker))) | ||
| 2486 | 1.1 (roland 13-May-91): (save-excursion | ||
| 2487 | 1.1 (roland 13-May-91): (unwind-protect | ||
| 2488 | 1.1 (roland 13-May-91): (progn | ||
| 2489 | 1.1 (roland 13-May-91): (widen) | ||
| 2490 | 1.1 (roland 13-May-91): (goto-char (rmail-msgbeg rmail-current-message)) | ||
| 2491 | 1.1 (roland 13-May-91): (forward-line 1) | ||
| 2492 | 1.1 (roland 13-May-91): (if (looking-at "[01],") | ||
| 2493 | 1.1 (roland 13-May-91): (progn | ||
| 2494 | 1.1 (roland 13-May-91): (narrow-to-region (point) (progn (end-of-line) (point))) | ||
| 2495 | 1.1 (roland 13-May-91): ;; Truly valid BABYL format requires a space before each | ||
| 2496 | 1.1 (roland 13-May-91): ;; attribute or keyword name. Put them in if missing. | ||
| 2497 | 1.1 (roland 13-May-91): (let (buffer-read-only) | ||
| 2498 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 2499 | 1.1 (roland 13-May-91): (while (search-forward "," nil t) | ||
| 2500 | 1.1 (roland 13-May-91): (or (looking-at "[ ,]") (eobp) | ||
| 2501 | 1.1 (roland 13-May-91): (insert " ")))) | ||
| 2502 | 1.1 (roland 13-May-91): (goto-char (point-max)) | ||
| 2503 | 1.1 (roland 13-May-91): (if (search-backward ",," nil 'move) | ||
| 2504 | 1.1 (roland 13-May-91): (progn | ||
| 2505 | 1.1 (roland 13-May-91): (if (> (point) (1+ (point-min))) | ||
| 2506 | 1.1 (roland 13-May-91): (setq blurb (buffer-substring (+ 1 (point-min)) (point)))) | ||
| 2507 | 1.1 (roland 13-May-91): (if (> (- (point-max) (point)) 2) | ||
| 2508 | 1.1 (roland 13-May-91): (setq blurb | ||
| 2509 | 1.1 (roland 13-May-91): (concat blurb | ||
| 2510 | 1.1 (roland 13-May-91): ";" | ||
| 2511 | 1.1 (roland 13-May-91): (buffer-substring (+ (point) 3) | ||
| 2512 | 1.1 (roland 13-May-91): (1- (point-max))))))))))) | ||
| 2513 | 1.1 (roland 13-May-91): ;; Note: we don't use save-restriction because that does not work right | ||
| 2514 | 1.1 (roland 13-May-91): ;; if changes are made outside the saved restriction | ||
| 2515 | 1.1 (roland 13-May-91): ;; before that restriction is restored. | ||
| 2516 | 1.1 (roland 13-May-91): (narrow-to-region beg end) | ||
| 2517 | 1.1 (roland 13-May-91): (set-marker beg nil) | ||
| 2518 | 1.1 (roland 13-May-91): (set-marker end nil))) | ||
| 2519 | 1.1 (roland 13-May-91): (while (string-match " +," blurb) | ||
| 2520 | 1.1 (roland 13-May-91): (setq blurb (concat (substring blurb 0 (match-beginning 0)) "," | ||
| 2521 | 1.1 (roland 13-May-91): (substring blurb (match-end 0))))) | ||
| 2522 | 1.1 (roland 13-May-91): (while (string-match ", +" blurb) | ||
| 2523 | 1.1 (roland 13-May-91): (setq blurb (concat (substring blurb 0 (match-beginning 0)) "," | ||
| 2524 | 1.1 (roland 13-May-91): (substring blurb (match-end 0))))) | ||
| 2525 | 1.1 (roland 13-May-91): (setq mode-line-process | ||
| 2526 | 1.150 (rms 14-Apr-95): (format " %d/%d%s" | ||
| 2527 | 1.339 (gerd 08-May-01): rmail-current-message rmail-total-messages blurb)) | ||
| 2528 | 1.339 (gerd 08-May-01): ;; If rmail-enable-mime is non-nil, we may have to update | ||
| 2529 | 1.339 (gerd 08-May-01): ;; `mode-line-process' of rmail-view-buffer too. | ||
| 2530 | 1.339 (gerd 08-May-01): (if (and rmail-enable-mime | ||
| 2531 | 1.339 (gerd 08-May-01): (not (eq (current-buffer) rmail-view-buffer)) | ||
| 2532 | 1.339 (gerd 08-May-01): (buffer-live-p rmail-view-buffer)) | ||
| 2533 | 1.339 (gerd 08-May-01): (let ((mlp mode-line-process)) | ||
| 2534 | 1.339 (gerd 08-May-01): (with-current-buffer rmail-view-buffer | ||
| 2535 | 1.339 (gerd 08-May-01): (setq mode-line-process mlp)))))) | ||
| 2536 | 1.1 (roland 13-May-91): | ||
| 2537 | 1.1 (roland 13-May-91): ;; Turn an attribute of a message on or off according to STATE. | ||
| 2538 | 1.1 (roland 13-May-91): ;; ATTR is the name of the attribute, as a string. | ||
| 2539 | 1.1 (roland 13-May-91): ;; MSGNUM is message number to change; nil means current message. | ||
| 2540 | 1.1 (roland 13-May-91): (defun rmail-set-attribute (attr state &optional msgnum) | ||
| 2541 | 1.339 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 2542 | 1.1 (roland 13-May-91): (let ((omax (point-max-marker)) | ||
| 2543 | 1.1 (roland 13-May-91): (omin (point-min-marker)) | ||
| 2544 | 1.1 (roland 13-May-91): (buffer-read-only nil)) | ||
| 2545 | 1.1 (roland 13-May-91): (or msgnum (setq msgnum rmail-current-message)) | ||
| 2546 | 1.71 (rms 16-Nov-93): (if (> msgnum 0) | ||
| 2547 | 1.71 (rms 16-Nov-93): (unwind-protect | ||
| 2548 | 1.71 (rms 16-Nov-93): (save-excursion | ||
| 2549 | 1.71 (rms 16-Nov-93): (widen) | ||
| 2550 | 1.71 (rms 16-Nov-93): (goto-char (+ 3 (rmail-msgbeg msgnum))) | ||
| 2551 | 1.71 (rms 16-Nov-93): (let ((curstate | ||
| 2552 | 1.71 (rms 16-Nov-93): (not | ||
| 2553 | 1.71 (rms 16-Nov-93): (null (search-backward (concat ", " attr ",") | ||
| 2554 | 1.71 (rms 16-Nov-93): (prog1 (point) (end-of-line)) t))))) | ||
| 2555 | 1.71 (rms 16-Nov-93): (or (eq curstate (not (not state))) | ||
| 2556 | 1.71 (rms 16-Nov-93): (if curstate | ||
| 2557 | 1.71 (rms 16-Nov-93): (delete-region (point) (1- (match-end 0))) | ||
| 2558 | 1.71 (rms 16-Nov-93): (beginning-of-line) | ||
| 2559 | 1.71 (rms 16-Nov-93): (forward-char 2) | ||
| 2560 | 1.71 (rms 16-Nov-93): (insert " " attr ",")))) | ||
| 2561 | 1.71 (rms 16-Nov-93): (if (string= attr "deleted") | ||
| 2562 | 1.71 (rms 16-Nov-93): (rmail-set-message-deleted-p msgnum state))) | ||
| 2563 | 1.71 (rms 16-Nov-93): ;; Note: we don't use save-restriction because that does not work right | ||
| 2564 | 1.71 (rms 16-Nov-93): ;; if changes are made outside the saved restriction | ||
| 2565 | 1.71 (rms 16-Nov-93): ;; before that restriction is restored. | ||
| 2566 | 1.71 (rms 16-Nov-93): (narrow-to-region omin omax) | ||
| 2567 | 1.71 (rms 16-Nov-93): (set-marker omin nil) | ||
| 2568 | 1.71 (rms 16-Nov-93): (set-marker omax nil) | ||
| 2569 | 1.71 (rms 16-Nov-93): (if (= msgnum rmail-current-message) | ||
| 2570 | 1.71 (rms 16-Nov-93): (rmail-display-labels)))))) | ||
| 2571 | 1.1 (roland 13-May-91): | ||
| 2572 | 1.1 (roland 13-May-91): ;; Return t if the attributes/keywords line of msg number MSG | ||
| 2573 | 1.1 (roland 13-May-91): ;; contains a match for the regexp LABELS. | ||
| 2574 | 1.1 (roland 13-May-91): (defun rmail-message-labels-p (msg labels) | ||
| 2575 | 1.1 (roland 13-May-91): (save-excursion | ||
| 2576 | 1.1 (roland 13-May-91): (save-restriction | ||
| 2577 | 1.1 (roland 13-May-91): (widen) | ||
| 2578 | 1.1 (roland 13-May-91): (goto-char (rmail-msgbeg msg)) | ||
| 2579 | 1.1 (roland 13-May-91): (forward-char 3) | ||
| 2580 | 1.1 (roland 13-May-91): (re-search-backward labels (prog1 (point) (end-of-line)) t)))) | ||
| 2581 | 1.1 (roland 13-May-91): | ||
| 2582 | 1.1 (roland 13-May-91): ;;;; *** Rmail Message Selection And Support *** | ||
| 2583 | 1.1 (roland 13-May-91): | ||
| 2584 | 1.1 (roland 13-May-91): (defun rmail-msgend (n) | ||
| 2585 | 1.1 (roland 13-May-91): (marker-position (aref rmail-message-vector (1+ n)))) | ||
| 2586 | 1.1 (roland 13-May-91): | ||
| 2587 | 1.1 (roland 13-May-91): (defun rmail-msgbeg (n) | ||
| 2588 | 1.1 (roland 13-May-91): (marker-position (aref rmail-message-vector n))) | ||
| 2589 | 1.1 (roland 13-May-91): | ||
| 2590 | 1.1 (roland 13-May-91): (defun rmail-widen-to-current-msgbeg (function) | ||
| 2591 | 1.1 (roland 13-May-91): "Call FUNCTION with point at start of internal data of current message. | ||
| 2592 | 1.1 (roland 13-May-91): Assumes that bounds were previously narrowed to display the message in Rmail. | ||
| 2593 | 1.1 (roland 13-May-91): The bounds are widened enough to move point where desired, then narrowed | ||
| 2594 | 1.1 (roland 13-May-91): again afterward. | ||
| 2595 | 1.1 (roland 13-May-91): | ||
| 2596 | 1.1 (roland 13-May-91): FUNCTION may not change the visible text of the message, but it may | ||
| 2597 | 1.1 (roland 13-May-91): change the invisible header text." | ||
| 2598 | 1.1 (roland 13-May-91): (save-excursion | ||
| 2599 | 1.318 (gerd 30-May-00): (unwind-protect | ||
| 2600 | 1.318 (gerd 30-May-00): (progn | ||
| 2601 | 1.318 (gerd 30-May-00): (narrow-to-region (rmail-msgbeg rmail-current-message) | ||
| 2602 | 1.318 (gerd 30-May-00): (point-max)) | ||
| 2603 | 1.318 (gerd 30-May-00): (goto-char (point-min)) | ||
| 2604 | 1.318 (gerd 30-May-00): (funcall function)) | ||
| 2605 | 1.1 (roland 13-May-91): ;; Note: we don't use save-restriction because that does not work right | ||
| 2606 | 1.1 (roland 13-May-91): ;; if changes are made outside the saved restriction | ||
| 2607 | 1.1 (roland 13-May-91): ;; before that restriction is restored. | ||
| 2608 | 1.318 (gerd 30-May-00): (narrow-to-region (rmail-msgbeg rmail-current-message) | ||
| 2609 | 1.318 (gerd 30-May-00): (rmail-msgend rmail-current-message))))) | ||
| 2610 | 1.1 (roland 13-May-91): | ||
| 2611 | 1.1 (roland 13-May-91): (defun rmail-forget-messages () | ||
| 2612 | 1.1 (roland 13-May-91): (unwind-protect | ||
| 2613 | 1.1 (roland 13-May-91): (if (vectorp rmail-message-vector) | ||
| 2614 | 1.1 (roland 13-May-91): (let* ((i 0) | ||
| 2615 | 1.1 (roland 13-May-91): (v rmail-message-vector) | ||
| 2616 | 1.1 (roland 13-May-91): (n (length v))) | ||
| 2617 | 1.1 (roland 13-May-91): (while (< i n) | ||
| 2618 | 1.1 (roland 13-May-91): (move-marker (aref v i) nil) | ||
| 2619 | 1.1 (roland 13-May-91): (setq i (1+ i))))) | ||
| 2620 | 1.1 (roland 13-May-91): (setq rmail-message-vector nil) | ||
| 2621 | 1.218 (rms 02-May-97): (setq rmail-msgref-vector nil) | ||
| 2622 | 1.1 (roland 13-May-91): (setq rmail-deleted-vector nil))) | ||
| 2623 | 1.1 (roland 13-May-91): | ||
| 2624 | 1.1 (roland 13-May-91): (defun rmail-maybe-set-message-counters () | ||
| 2625 | 1.1 (roland 13-May-91): (if (not (and rmail-deleted-vector | ||
| 2626 | 1.1 (roland 13-May-91): rmail-message-vector | ||
| 2627 | 1.1 (roland 13-May-91): rmail-current-message | ||
| 2628 | 1.1 (roland 13-May-91): rmail-total-messages)) | ||
| 2629 | 1.1 (roland 13-May-91): (rmail-set-message-counters))) | ||
| 2630 | 1.1 (roland 13-May-91): | ||
| 2631 | 1.1 (roland 13-May-91): (defun rmail-count-new-messages (&optional nomsg) | ||
| 2632 | 1.1 (roland 13-May-91): (let* ((case-fold-search nil) | ||
| 2633 | 1.1 (roland 13-May-91): (total-messages 0) | ||
| 2634 | 1.1 (roland 13-May-91): (messages-head nil) | ||
| 2635 | 1.1 (roland 13-May-91): (deleted-head nil)) | ||
| 2636 | 1.1 (roland 13-May-91): (or nomsg (message "Counting new messages...")) | ||
| 2637 | 1.1 (roland 13-May-91): (goto-char (point-max)) | ||
| 2638 | 1.1 (roland 13-May-91): ;; Put at the end of messages-head | ||
| 2639 | 1.1 (roland 13-May-91): ;; the entry for message N+1, which marks | ||
| 2640 | 1.1 (roland 13-May-91): ;; the end of message N. (N = number of messages). | ||
| 2641 | 1.1 (roland 13-May-91): (search-backward "\n\^_") | ||
| 2642 | 1.1 (roland 13-May-91): (forward-char 1) | ||
| 2643 | 1.1 (roland 13-May-91): (setq messages-head (list (point-marker))) | ||
| 2644 | 1.1 (roland 13-May-91): (rmail-set-message-counters-counter (point-min)) | ||
| 2645 | 1.1 (roland 13-May-91): (setq rmail-current-message (1+ rmail-total-messages)) | ||
| 2646 | 1.1 (roland 13-May-91): (setq rmail-total-messages | ||
| 2647 | 1.1 (roland 13-May-91): (+ rmail-total-messages total-messages)) | ||
| 2648 | 1.1 (roland 13-May-91): (setq rmail-message-vector | ||
| 2649 | 1.1 (roland 13-May-91): (vconcat rmail-message-vector (cdr messages-head))) | ||
| 2650 | 1.1 (roland 13-May-91): (aset rmail-message-vector | ||
| 2651 | 1.1 (roland 13-May-91): rmail-current-message (car messages-head)) | ||
| 2652 | 1.1 (roland 13-May-91): (setq rmail-deleted-vector | ||
| 2653 | 1.1 (roland 13-May-91): (concat rmail-deleted-vector deleted-head)) | ||
| 2654 | 1.1 (roland 13-May-91): (setq rmail-summary-vector | ||
| 2655 | 1.1 (roland 13-May-91): (vconcat rmail-summary-vector (make-vector total-messages nil))) | ||
| 2656 | 1.218 (rms 02-May-97): (setq rmail-msgref-vector | ||
| 2657 | 1.218 (rms 02-May-97): (vconcat rmail-msgref-vector (make-vector total-messages nil))) | ||
| 2658 | 1.218 (rms 02-May-97): ;; Fill in the new elements of rmail-msgref-vector. | ||
| 2659 | 1.220 (rms 04-May-97): (let ((i (1+ (- rmail-total-messages total-messages)))) | ||
| 2660 | 1.218 (rms 02-May-97): (while (<= i rmail-total-messages) | ||
| 2661 | 1.218 (rms 02-May-97): (aset rmail-msgref-vector i (list i)) | ||
| 2662 | 1.218 (rms 02-May-97): (setq i (1+ i)))) | ||
| 2663 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 2664 | 1.1 (roland 13-May-91): (or nomsg (message "Counting new messages...done (%d)" total-messages)))) | ||
| 2665 | 1.1 (roland 13-May-91): | ||
| 2666 | 1.1 (roland 13-May-91): (defun rmail-set-message-counters () | ||
| 2667 | 1.1 (roland 13-May-91): (rmail-forget-messages) | ||
| 2668 | 1.1 (roland 13-May-91): (save-excursion | ||
| 2669 | 1.1 (roland 13-May-91): (save-restriction | ||
| 2670 | 1.1 (roland 13-May-91): (widen) | ||
| 2671 | 1.1 (roland 13-May-91): (let* ((point-save (point)) | ||
| 2672 | 1.1 (roland 13-May-91): (total-messages 0) | ||
| 2673 | 1.1 (roland 13-May-91): (messages-after-point) | ||
| 2674 | 1.1 (roland 13-May-91): (case-fold-search nil) | ||
| 2675 | 1.1 (roland 13-May-91): (messages-head nil) | ||
| 2676 | 1.1 (roland 13-May-91): (deleted-head nil)) | ||
| 2677 | 1.1 (roland 13-May-91): (message "Counting messages...") | ||
| 2678 | 1.1 (roland 13-May-91): (goto-char (point-max)) | ||
| 2679 | 1.1 (roland 13-May-91): ;; Put at the end of messages-head | ||
| 2680 | 1.1 (roland 13-May-91): ;; the entry for message N+1, which marks | ||
| 2681 | 1.1 (roland 13-May-91): ;; the end of message N. (N = number of messages). | ||
| 2682 | 1.79 (rms 14-Jan-94): (search-backward "\n\^_" nil t) | ||
| 2683 | 1.79 (rms 14-Jan-94): (if (/= (point) (point-max)) (forward-char 1)) | ||
| 2684 | 1.1 (roland 13-May-91): (setq messages-head (list (point-marker))) | ||
| 2685 | 1.1 (roland 13-May-91): (rmail-set-message-counters-counter (min (point) point-save)) | ||
| 2686 | 1.1 (roland 13-May-91): (setq messages-after-point total-messages) | ||
| 2687 | 1.1 (roland 13-May-91): (rmail-set-message-counters-counter) | ||
| 2688 | 1.1 (roland 13-May-91): (setq rmail-total-messages total-messages) | ||
| 2689 | 1.1 (roland 13-May-91): (setq rmail-current-message | ||
| 2690 | 1.1 (roland 13-May-91): (min total-messages | ||
| 2691 | 1.1 (roland 13-May-91): (max 1 (- total-messages messages-after-point)))) | ||
| 2692 | 1.1 (roland 13-May-91): (setq rmail-message-vector | ||
| 2693 | 1.1 (roland 13-May-91): (apply 'vector (cons (point-min-marker) messages-head)) | ||
| 2694 | 1.324 (gerd 30-Nov-00): rmail-deleted-vector (concat "0" deleted-head) | ||
| 2695 | 1.218 (rms 02-May-97): rmail-summary-vector (make-vector rmail-total-messages nil) | ||
| 2696 | 1.218 (rms 02-May-97): rmail-msgref-vector (make-vector (1+ rmail-total-messages) nil)) | ||
| 2697 | 1.218 (rms 02-May-97): (let ((i 0)) | ||
| 2698 | 1.218 (rms 02-May-97): (while (<= i rmail-total-messages) | ||
| 2699 | 1.218 (rms 02-May-97): (aset rmail-msgref-vector i (list i)) | ||
| 2700 | 1.218 (rms 02-May-97): (setq i (1+ i)))) | ||
| 2701 | 1.1 (roland 13-May-91): (message "Counting messages...done"))))) | ||
| 2702 | 1.358 (pot 06-May-02): | ||
| 2703 | 1.1 (roland 13-May-91): (defun rmail-set-message-counters-counter (&optional stop) | ||
| 2704 | 1.292 (andrewi 22-Nov-98): (let ((start (point)) | ||
| 2705 | 1.292 (andrewi 22-Nov-98): next) | ||
| 2706 | 1.292 (andrewi 22-Nov-98): (while (search-backward "\n\^_\^L" stop t) | ||
| 2707 | 1.292 (andrewi 22-Nov-98): ;; Detect messages that have been added with DOS line endings and | ||
| 2708 | 1.292 (andrewi 22-Nov-98): ;; convert the line endings for such messages. | ||
| 2709 | 1.292 (andrewi 22-Nov-98): (setq next (point)) | ||
| 2710 | 1.292 (andrewi 22-Nov-98): (if (looking-at "\n\^_\^L\r\n") | ||
| 2711 | 1.292 (andrewi 22-Nov-98): (let ((buffer-read-only nil) | ||
| 2712 | 1.292 (andrewi 22-Nov-98): (buffer-undo t)) | ||
| 2713 | 1.292 (andrewi 22-Nov-98): (message "Counting messages...(converting line endings)") | ||
| 2714 | 1.292 (andrewi 22-Nov-98): (save-excursion | ||
| 2715 | 1.292 (andrewi 22-Nov-98): (goto-char start) | ||
| 2716 | 1.292 (andrewi 22-Nov-98): (while (search-backward "\r\n" next t) | ||
| 2717 | 1.292 (andrewi 22-Nov-98): (delete-char 1))))) | ||
| 2718 | 1.292 (andrewi 22-Nov-98): (setq start next) | ||
| 2719 | 1.292 (andrewi 22-Nov-98): (forward-char 1) | ||
| 2720 | 1.292 (andrewi 22-Nov-98): (setq messages-head (cons (point-marker) messages-head)) | ||
| 2721 | 1.292 (andrewi 22-Nov-98): (save-excursion | ||
| 2722 | 1.292 (andrewi 22-Nov-98): (setq deleted-head | ||
| 2723 | 1.292 (andrewi 22-Nov-98): (cons (if (search-backward ", deleted," | ||
| 2724 | 1.292 (andrewi 22-Nov-98): (prog1 (point) | ||
| 2725 | 1.292 (andrewi 22-Nov-98): (forward-line 2)) | ||
| 2726 | 1.292 (andrewi 22-Nov-98): t) | ||
| 2727 | 1.292 (andrewi 22-Nov-98): ?D ?\ ) | ||
| 2728 | 1.292 (andrewi 22-Nov-98): deleted-head))) | ||
| 2729 | 1.292 (andrewi 22-Nov-98): (if (zerop (% (setq total-messages (1+ total-messages)) 20)) | ||
| 2730 | 1.292 (andrewi 22-Nov-98): (message "Counting messages...%d" total-messages))))) | ||
| 2731 | 1.1 (roland 13-May-91): | ||
| 2732 | 1.1 (roland 13-May-91): (defun rmail-beginning-of-message () | ||
| 2733 | 1.1 (roland 13-May-91): "Show current message starting from the beginning." | ||
| 2734 | 1.1 (roland 13-May-91): (interactive) | ||
| 2735 | 1.410 (eliz 12-Aug-05): (let ((rmail-show-message-hook | ||
| 2736 | 1.410 (eliz 12-Aug-05): (list (function (lambda () | ||
| 2737 | 1.410 (eliz 12-Aug-05): (goto-char (point-min))))))) | ||
| 2738 | 1.410 (eliz 12-Aug-05): (rmail-show-message rmail-current-message))) | ||
| 2739 | 1.410 (eliz 12-Aug-05): | ||
| 2740 | 1.410 (eliz 12-Aug-05): (defun rmail-end-of-message () | ||
| 2741 | 1.410 (eliz 12-Aug-05): "Show bottom of current message." | ||
| 2742 | 1.410 (eliz 12-Aug-05): (interactive) | ||
| 2743 | 1.410 (eliz 12-Aug-05): (let ((rmail-show-message-hook | ||
| 2744 | 1.410 (eliz 12-Aug-05): (list (function (lambda () | ||
| 2745 | 1.410 (eliz 12-Aug-05): (goto-char (point-max)) | ||
| 2746 | 1.410 (eliz 12-Aug-05): (recenter (1- (window-height)))))))) | ||
| 2747 | 1.410 (eliz 12-Aug-05): (rmail-show-message rmail-current-message))) | ||
| 2748 | 1.1 (roland 13-May-91): | ||
| 2749 | 1.397 (rms 18-Mar-05): (defun rmail-unknown-mail-followup-to () | ||
| 2750 | 1.397 (rms 18-Mar-05): "Handle a \"Mail-Followup-To\" header field with an unknown mailing list. | ||
| 2751 | 1.397 (rms 18-Mar-05): Ask the user whether to add that list name to `mail-mailing-lists'." | ||
| 2752 | 1.397 (rms 18-Mar-05): (save-restriction | ||
| 2753 | 1.397 (rms 18-Mar-05): (rmail-narrow-to-non-pruned-header) | ||
| 2754 | 1.397 (rms 18-Mar-05): (let ((mail-followup-to (mail-fetch-field "mail-followup-to" nil t))) | ||
| 2755 | 1.397 (rms 18-Mar-05): (when mail-followup-to | ||
| 2756 | 1.397 (rms 18-Mar-05): (let ((addresses | ||
| 2757 | 1.407 (ttn 06-Aug-05): (split-string | ||
| 2758 | 1.397 (rms 18-Mar-05): (mail-strip-quoted-names mail-followup-to) | ||
| 2759 | 1.397 (rms 18-Mar-05): ",[[:space:]]+" t))) | ||
| 2760 | 1.397 (rms 18-Mar-05): (dolist (addr addresses) | ||
| 2761 | 1.397 (rms 18-Mar-05): (when (and (not (member addr mail-mailing-lists)) | ||
| 2762 | 1.397 (rms 18-Mar-05): (not | ||
| 2763 | 1.397 (rms 18-Mar-05): ;; taken from rmailsum.el | ||
| 2764 | 1.397 (rms 18-Mar-05): (string-match | ||
| 2765 | 1.397 (rms 18-Mar-05): (or rmail-user-mail-address-regexp | ||
| 2766 | 1.397 (rms 18-Mar-05): (concat "^\\(" | ||
| 2767 | 1.397 (rms 18-Mar-05): (regexp-quote (user-login-name)) | ||
| 2768 | 1.397 (rms 18-Mar-05): "\\($\\|@\\)\\|" | ||
| 2769 | 1.397 (rms 18-Mar-05): (regexp-quote | ||
| 2770 | 1.397 (rms 18-Mar-05): (or user-mail-address | ||
| 2771 | 1.397 (rms 18-Mar-05): (concat (user-login-name) "@" | ||
| 2772 | 1.397 (rms 18-Mar-05): (or mail-host-address | ||
| 2773 | 1.397 (rms 18-Mar-05): (system-name))))) | ||
| 2774 | 1.397 (rms 18-Mar-05): "\\>\\)")) | ||
| 2775 | 1.397 (rms 18-Mar-05): addr)) | ||
| 2776 | 1.397 (rms 18-Mar-05): (y-or-n-p | ||
| 2777 | 1.397 (rms 18-Mar-05): (format "Add `%s' to `mail-mailing-lists'? " | ||
| 2778 | 1.397 (rms 18-Mar-05): addr))) | ||
| 2779 | 1.397 (rms 18-Mar-05): (customize-save-variable 'mail-mailing-lists | ||
| 2780 | 1.397 (rms 18-Mar-05): (cons addr mail-mailing-lists))))))))) | ||
| 2781 | 1.397 (rms 18-Mar-05): | ||
| 2782 | 1.134 (rms 11-Oct-94): (defun rmail-show-message (&optional n no-summary) | ||
| 2783 | 1.39 (rms 09-Mar-93): "Show message number N (prefix argument), counting from start of file. | ||
| 2784 | 1.39 (rms 09-Mar-93): If summary buffer is currently displayed, update current message there also." | ||
| 2785 | 1.1 (roland 13-May-91): (interactive "p") | ||
| 2786 | 1.212 (handa 26-Feb-97): (or (eq major-mode 'rmail-mode) | ||
| 2787 | 1.212 (handa 26-Feb-97): (switch-to-buffer rmail-buffer)) | ||
| 2788 | 1.1 (roland 13-May-91): (rmail-maybe-set-message-counters) | ||
| 2789 | 1.1 (roland 13-May-91): (widen) | ||
| 2790 | 1.1 (roland 13-May-91): (if (zerop rmail-total-messages) | ||
| 2791 | 1.1 (roland 13-May-91): (progn (narrow-to-region (point-min) (1- (point-max))) | ||
| 2792 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 2793 | 1.1 (roland 13-May-91): (setq mode-line-process nil)) | ||
| 2794 | 1.265 (rms 12-May-98): (let (blurb coding-system) | ||
| 2795 | 1.1 (roland 13-May-91): (if (not n) | ||
| 2796 | 1.1 (roland 13-May-91): (setq n rmail-current-message) | ||
| 2797 | 1.1 (roland 13-May-91): (cond ((<= n 0) | ||
| 2798 | 1.1 (roland 13-May-91): (setq n 1 | ||
| 2799 | 1.1 (roland 13-May-91): rmail-current-message 1 | ||
| 2800 | 1.1 (roland 13-May-91): blurb "No previous message")) | ||
| 2801 | 1.1 (roland 13-May-91): ((> n rmail-total-messages) | ||
| 2802 | 1.1 (roland 13-May-91): (setq n rmail-total-messages | ||
| 2803 | 1.1 (roland 13-May-91): rmail-current-message rmail-total-messages | ||
| 2804 | 1.1 (roland 13-May-91): blurb "No following message")) | ||
| 2805 | 1.1 (roland 13-May-91): (t | ||
| 2806 | 1.1 (roland 13-May-91): (setq rmail-current-message n)))) | ||
| 2807 | 1.198 (rms 19-Sep-96): (let ((beg (rmail-msgbeg n))) | ||
| 2808 | 1.1 (roland 13-May-91): (goto-char beg) | ||
| 2809 | 1.1 (roland 13-May-91): (forward-line 1) | ||
| 2810 | 1.265 (rms 12-May-98): (save-excursion | ||
| 2811 | 1.265 (rms 12-May-98): (let ((end (rmail-msgend n))) | ||
| 2812 | 1.265 (rms 12-May-98): (save-restriction | ||
| 2813 | 1.265 (rms 12-May-98): (if (prog1 (= (following-char) ?0) | ||
| 2814 | 1.265 (rms 12-May-98): (forward-line 2) | ||
| 2815 | 1.300 (rms 16-Feb-99): ;; If there's a Summary-line in the (otherwise empty) | ||
| 2816 | 1.300 (rms 16-Feb-99): ;; header, we didn't yet get past the EOOH line. | ||
| 2817 | 1.300 (rms 16-Feb-99): (if (looking-at "^\\*\\*\\* EOOH \\*\\*\\*\n") | ||
| 2818 | 1.300 (rms 16-Feb-99): (forward-line 1)) | ||
| 2819 | 1.265 (rms 12-May-98): (narrow-to-region (point) end)) | ||
| 2820 | 1.265 (rms 12-May-98): (rfc822-goto-eoh) | ||
| 2821 | 1.265 (rms 12-May-98): (search-forward "\n*** EOOH ***\n" end t)) | ||
| 2822 | 1.265 (rms 12-May-98): (narrow-to-region beg (point)) | ||
| 2823 | 1.265 (rms 12-May-98): (goto-char (point-min)) | ||
| 2824 | 1.265 (rms 12-May-98): (if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t) | ||
| 2825 | 1.265 (rms 12-May-98): (let ((coding-system (intern (match-string 1)))) | ||
| 2826 | 1.359 (rms 10-May-02): (condition-case nil | ||
| 2827 | 1.359 (rms 10-May-02): (progn | ||
| 2828 | 1.359 (rms 10-May-02): (check-coding-system coding-system) | ||
| 2829 | 1.359 (rms 10-May-02): (setq buffer-file-coding-system coding-system)) | ||
| 2830 | 1.368 (jpw 06-Jan-03): (error | ||
| 2831 | 1.359 (rms 10-May-02): (setq buffer-file-coding-system nil)))) | ||
| 2832 | 1.265 (rms 12-May-98): (setq buffer-file-coding-system nil))))) | ||
| 2833 | 1.198 (rms 19-Sep-96): ;; Clear the "unseen" attribute when we show a message. | ||
| 2834 | 1.198 (rms 19-Sep-96): (rmail-set-attribute "unseen" nil) | ||
| 2835 | 1.198 (rms 19-Sep-96): (let ((end (rmail-msgend n))) | ||
| 2836 | 1.265 (rms 12-May-98): ;; Reformat the header, or else find the reformatted header. | ||
| 2837 | 1.198 (rms 19-Sep-96): (if (= (following-char) ?0) | ||
| 2838 | 1.1 (roland 13-May-91): (rmail-reformat-message beg end) | ||
| 2839 | 1.198 (rms 19-Sep-96): (search-forward "\n*** EOOH ***\n" end t) | ||
| 2840 | 1.198 (rms 19-Sep-96): (narrow-to-region (point) end))) | ||
| 2841 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 2842 | 1.347 (gerd 10-Jul-01): (walk-windows | ||
| 2843 | 1.347 (gerd 10-Jul-01): (function (lambda (window) | ||
| 2844 | 1.347 (gerd 10-Jul-01): (if (eq (window-buffer window) (current-buffer)) | ||
| 2845 | 1.347 (gerd 10-Jul-01): (set-window-point window (point))))) | ||
| 2846 | 1.347 (gerd 10-Jul-01): nil t) | ||
| 2847 | 1.1 (roland 13-May-91): (rmail-display-labels) | ||
| 2848 | 1.212 (handa 26-Feb-97): (if (eq rmail-enable-mime t) | ||
| 2849 | 1.212 (handa 26-Feb-97): (funcall rmail-show-mime-function) | ||
| 2850 | 1.397 (rms 18-Mar-05): (setq rmail-view-buffer rmail-buffer)) | ||
| 2851 | 1.397 (rms 18-Mar-05): (when mail-mailing-lists | ||
| 2852 | 1.397 (rms 18-Mar-05): (rmail-unknown-mail-followup-to)) | ||
| 2853 | 1.100 (kwzh 24-Apr-94): (rmail-highlight-headers) | ||
| 2854 | 1.105 (rms 26-May-94): (if transient-mark-mode (deactivate-mark)) | ||
| 2855 | 1.1 (roland 13-May-91): (run-hooks 'rmail-show-message-hook) | ||
| 2856 | 1.39 (rms 09-Mar-93): ;; If there is a summary buffer, try to move to this message | ||
| 2857 | 1.39 (rms 09-Mar-93): ;; in that buffer. But don't complain if this message | ||
| 2858 | 1.39 (rms 09-Mar-93): ;; is not mentioned in the summary. | ||
| 2859 | 1.134 (rms 11-Oct-94): ;; Don't do this at all if we were called on behalf | ||
| 2860 | 1.134 (rms 11-Oct-94): ;; of cursor motion in the summary buffer. | ||
| 2861 | 1.134 (rms 11-Oct-94): (and (rmail-summary-exists) (not no-summary) | ||
| 2862 | 1.134 (rms 11-Oct-94): (let ((curr-msg rmail-current-message)) | ||
| 2863 | 1.134 (rms 11-Oct-94): (rmail-select-summary | ||
| 2864 | 1.134 (rms 11-Oct-94): (rmail-summary-goto-msg curr-msg t t)))) | ||
| 2865 | 1.339 (gerd 08-May-01): (with-current-buffer rmail-buffer | ||
| 2866 | 1.339 (gerd 08-May-01): (rmail-auto-file)) | ||
| 2867 | 1.1 (roland 13-May-91): (if blurb | ||
| 2868 | 1.1 (roland 13-May-91): (message blurb)))))) | ||
| 2869 | 1.1 (roland 13-May-91): | ||
| 2870 | 1.430 (eliz 04-Nov-06): (defun rmail-redecode-body (coding &optional raw) | ||
| 2871 | 1.326 (eliz 22-Jan-01): "Decode the body of the current message using coding system CODING. | ||
| 2872 | 1.326 (eliz 22-Jan-01): This is useful with mail messages that have malformed or missing | ||
| 2873 | 1.326 (eliz 22-Jan-01): charset= headers. | ||
| 2874 | 1.326 (eliz 22-Jan-01): | ||
| 2875 | 1.326 (eliz 22-Jan-01): This function assumes that the current message is already decoded | ||
| 2876 | 1.326 (eliz 22-Jan-01): and displayed in the RMAIL buffer, but the coding system used to | ||
| 2877 | 1.326 (eliz 22-Jan-01): decode it was incorrect. It then encodes the message back to its | ||
| 2878 | 1.327 (eliz 25-Jan-01): original form, and decodes it again, using the coding system CODING. | ||
| 2879 | 1.326 (eliz 22-Jan-01): | ||
| 2880 | 1.430 (eliz 04-Nov-06): Optional argument RAW, if non-nil, means don't encode the message | ||
| 2881 | 1.430 (eliz 04-Nov-06): before decoding it with the new CODING. This is useful if the current | ||
| 2882 | 1.430 (eliz 04-Nov-06): message text was produced by some function which invokes `insert', | ||
| 2883 | 1.430 (eliz 04-Nov-06): since `insert' leaves unibyte character codes 128 through 255 unconverted | ||
| 2884 | 1.430 (eliz 04-Nov-06): to multibyte. One example of such a situation is when the text was | ||
| 2885 | 1.430 (eliz 04-Nov-06): produced by `base64-decode-region'. | ||
| 2886 | 1.430 (eliz 04-Nov-06): | ||
| 2887 | 1.430 (eliz 04-Nov-06): Interactively, invoke the function with a prefix argument to set RAW | ||
| 2888 | 1.430 (eliz 04-Nov-06): non-nil. | ||
| 2889 | 1.430 (eliz 04-Nov-06): | ||
| 2890 | 1.326 (eliz 22-Jan-01): Note that if Emacs erroneously auto-detected one of the iso-2022 | ||
| 2891 | 1.326 (eliz 22-Jan-01): encodings in the message, this function might fail because the escape | ||
| 2892 | 1.326 (eliz 22-Jan-01): sequences that switch between character sets and also single-shift and | ||
| 2893 | 1.326 (eliz 22-Jan-01): locking-shift codes are impossible to recover. This function is meant | ||
| 2894 | 1.326 (eliz 22-Jan-01): to be used to fix messages encoded with 8-bit encodings, such as | ||
| 2895 | 1.326 (eliz 22-Jan-01): iso-8859, koi8-r, etc." | ||
| 2896 | 1.326 (eliz 22-Jan-01): (interactive "zCoding system for re-decoding this message: ") | ||
| 2897 | 1.326 (eliz 22-Jan-01): (when (not rmail-enable-mime) | ||
| 2898 | 1.326 (eliz 22-Jan-01): (or (eq major-mode 'rmail-mode) | ||
| 2899 | 1.326 (eliz 22-Jan-01): (switch-to-buffer rmail-buffer)) | ||
| 2900 | 1.326 (eliz 22-Jan-01): (save-excursion | ||
| 2901 | 1.430 (eliz 04-Nov-06): (let ((pruned (rmail-msg-is-pruned)) | ||
| 2902 | 1.430 (eliz 04-Nov-06): (raw (or raw current-prefix-arg))) | ||
| 2903 | 1.353 (eliz 02-Feb-02): (unwind-protect | ||
| 2904 | 1.353 (eliz 02-Feb-02): (let ((msgbeg (rmail-msgbeg rmail-current-message)) | ||
| 2905 | 1.353 (eliz 02-Feb-02): (msgend (rmail-msgend rmail-current-message)) | ||
| 2906 | 1.353 (eliz 02-Feb-02): x-coding-header) | ||
| 2907 | 1.353 (eliz 02-Feb-02): ;; We need the message headers pruned (we later restore | ||
| 2908 | 1.353 (eliz 02-Feb-02): ;; the pruned stat to what it was, see the end of | ||
| 2909 | 1.353 (eliz 02-Feb-02): ;; unwind-protect form). | ||
| 2910 | 1.353 (eliz 02-Feb-02): (or pruned | ||
| 2911 | 1.353 (eliz 02-Feb-02): (rmail-toggle-header 1)) | ||
| 2912 | 1.353 (eliz 02-Feb-02): (narrow-to-region msgbeg msgend) | ||
| 2913 | 1.353 (eliz 02-Feb-02): (goto-char (point-min)) | ||
| 2914 | 1.353 (eliz 02-Feb-02): (when (search-forward "\n*** EOOH ***\n" (point-max) t) | ||
| 2915 | 1.353 (eliz 02-Feb-02): (narrow-to-region msgbeg (point))) | ||
| 2916 | 1.353 (eliz 02-Feb-02): (goto-char (point-min)) | ||
| 2917 | 1.353 (eliz 02-Feb-02): (if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t) | ||
| 2918 | 1.353 (eliz 02-Feb-02): (let ((old-coding (intern (match-string 1))) | ||
| 2919 | 1.353 (eliz 02-Feb-02): (buffer-read-only nil)) | ||
| 2920 | 1.353 (eliz 02-Feb-02): (check-coding-system old-coding) | ||
| 2921 | 1.353 (eliz 02-Feb-02): ;; Make sure the new coding system uses the same EOL | ||
| 2922 | 1.353 (eliz 02-Feb-02): ;; conversion, to prevent ^M characters from popping | ||
| 2923 | 1.353 (eliz 02-Feb-02): ;; up all over the place. | ||
| 2924 | 1.353 (eliz 02-Feb-02): (setq coding | ||
| 2925 | 1.353 (eliz 02-Feb-02): (coding-system-change-eol-conversion | ||
| 2926 | 1.353 (eliz 02-Feb-02): coding | ||
| 2927 | 1.353 (eliz 02-Feb-02): (coding-system-eol-type old-coding))) | ||
| 2928 | 1.428 (eliz 07-Oct-06): ;; If old-coding is `undecided', encode-coding-region | ||
| 2929 | 1.428 (eliz 07-Oct-06): ;; will not encode the text at all. Find a proper | ||
| 2930 | 1.428 (eliz 07-Oct-06): ;; non-trivial encoding to use. | ||
| 2931 | 1.428 (eliz 07-Oct-06): (if (memq (coding-system-base old-coding) '(nil undecided)) | ||
| 2932 | 1.428 (eliz 07-Oct-06): (setq old-coding | ||
| 2933 | 1.428 (eliz 07-Oct-06): (car (find-coding-systems-region msgbeg msgend)))) | ||
| 2934 | 1.353 (eliz 02-Feb-02): (setq x-coding-header (point-marker)) | ||
| 2935 | 1.353 (eliz 02-Feb-02): (narrow-to-region msgbeg msgend) | ||
| 2936 | 1.430 (eliz 04-Nov-06): (and (null raw) | ||
| 2937 | 1.430 (eliz 04-Nov-06): ;; If old and new encoding are the same, it | ||
| 2938 | 1.430 (eliz 04-Nov-06): ;; clearly doesn't make sense to encode. | ||
| 2939 | 1.430 (eliz 04-Nov-06): (not (coding-system-equal | ||
| 2940 | 1.430 (eliz 04-Nov-06): (coding-system-base old-coding) | ||
| 2941 | 1.430 (eliz 04-Nov-06): (coding-system-base coding))) | ||
| 2942 | 1.430 (eliz 04-Nov-06): ;; If the body includes only eight-bit-* | ||
| 2943 | 1.430 (eliz 04-Nov-06): ;; characters, encoding might fail, e.g. with | ||
| 2944 | 1.430 (eliz 04-Nov-06): ;; UTF-8, and isn't needed anyway. | ||
| 2945 | 1.430 (eliz 04-Nov-06): (> (length (delq 'ascii | ||
| 2946 | 1.430 (eliz 04-Nov-06): (delq 'eight-bit-graphic | ||
| 2947 | 1.430 (eliz 04-Nov-06): (delq 'eight-bit-control | ||
| 2948 | 1.430 (eliz 04-Nov-06): (find-charset-region | ||
| 2949 | 1.430 (eliz 04-Nov-06): msgbeg msgend))))) | ||
| 2950 | 1.430 (eliz 04-Nov-06): 0) | ||
| 2951 | 1.430 (eliz 04-Nov-06): (encode-coding-region (point) msgend old-coding)) | ||
| 2952 | 1.353 (eliz 02-Feb-02): (decode-coding-region (point) msgend coding) | ||
| 2953 | 1.353 (eliz 02-Feb-02): (setq last-coding-system-used coding) | ||
| 2954 | 1.353 (eliz 02-Feb-02): ;; Rewrite the coding-system header according | ||
| 2955 | 1.353 (eliz 02-Feb-02): ;; to what we did. | ||
| 2956 | 1.353 (eliz 02-Feb-02): (goto-char x-coding-header) | ||
| 2957 | 1.353 (eliz 02-Feb-02): (delete-region (point) | ||
| 2958 | 1.353 (eliz 02-Feb-02): (save-excursion | ||
| 2959 | 1.353 (eliz 02-Feb-02): (beginning-of-line) | ||
| 2960 | 1.353 (eliz 02-Feb-02): (point))) | ||
| 2961 | 1.353 (eliz 02-Feb-02): (insert "X-Coding-System: " | ||
| 2962 | 1.353 (eliz 02-Feb-02): (symbol-name last-coding-system-used)) | ||
| 2963 | 1.353 (eliz 02-Feb-02): (set-marker x-coding-header nil) | ||
| 2964 | 1.353 (eliz 02-Feb-02): (rmail-show-message)) | ||
| 2965 | 1.353 (eliz 02-Feb-02): (error "No X-Coding-System header found"))) | ||
| 2966 | 1.353 (eliz 02-Feb-02): (or pruned | ||
| 2967 | 1.353 (eliz 02-Feb-02): (rmail-toggle-header 0))))))) | ||
| 2968 | 1.326 (eliz 22-Jan-01): | ||
| 2969 | 1.100 (kwzh 24-Apr-94): ;; Find all occurrences of certain fields, and highlight them. | ||
| 2970 | 1.100 (kwzh 24-Apr-94): (defun rmail-highlight-headers () | ||
| 2971 | 1.100 (kwzh 24-Apr-94): ;; Do this only if the system supports faces. | ||
| 2972 | 1.107 (rms 30-Jun-94): (if (and (fboundp 'internal-find-face) | ||
| 2973 | 1.107 (rms 30-Jun-94): rmail-highlighted-headers) | ||
| 2974 | 1.100 (kwzh 24-Apr-94): (save-excursion | ||
| 2975 | 1.100 (kwzh 24-Apr-94): (search-forward "\n\n" nil 'move) | ||
| 2976 | 1.100 (kwzh 24-Apr-94): (save-restriction | ||
| 2977 | 1.100 (kwzh 24-Apr-94): (narrow-to-region (point-min) (point)) | ||
| 2978 | 1.100 (kwzh 24-Apr-94): (let ((case-fold-search t) | ||
| 2979 | 1.100 (kwzh 24-Apr-94): (inhibit-read-only t) | ||
| 2980 | 1.100 (kwzh 24-Apr-94): ;; Highlight with boldface if that is available. | ||
| 2981 | 1.100 (kwzh 24-Apr-94): ;; Otherwise use the `highlight' face. | ||
| 2982 | 1.451 (bastien1 13-Feb-08): (face (or 'rmail-highlight | ||
| 2983 | 1.112 (rms 30-Jul-94): (if (face-differs-from-default-p 'bold) | ||
| 2984 | 1.112 (rms 30-Jul-94): 'bold 'highlight))) | ||
| 2985 | 1.100 (kwzh 24-Apr-94): ;; List of overlays to reuse. | ||
| 2986 | 1.100 (kwzh 24-Apr-94): (overlays rmail-overlay-list)) | ||
| 2987 | 1.100 (kwzh 24-Apr-94): (goto-char (point-min)) | ||
| 2988 | 1.100 (kwzh 24-Apr-94): (while (re-search-forward rmail-highlighted-headers nil t) | ||
| 2989 | 1.106 (rms 18-Jun-94): (skip-chars-forward " \t") | ||
| 2990 | 1.100 (kwzh 24-Apr-94): (let ((beg (point)) | ||
| 2991 | 1.100 (kwzh 24-Apr-94): overlay) | ||
| 2992 | 1.100 (kwzh 24-Apr-94): (while (progn (forward-line 1) | ||
| 2993 | 1.100 (kwzh 24-Apr-94): (looking-at "[ \t]"))) | ||
| 2994 | 1.100 (kwzh 24-Apr-94): ;; Back up over newline, then trailing spaces or tabs | ||
| 2995 | 1.100 (kwzh 24-Apr-94): (forward-char -1) | ||
| 2996 | 1.100 (kwzh 24-Apr-94): (while (member (preceding-char) '(? ?\t)) | ||
| 2997 | 1.100 (kwzh 24-Apr-94): (forward-char -1)) | ||
| 2998 | 1.100 (kwzh 24-Apr-94): (if overlays | ||
| 2999 | 1.100 (kwzh 24-Apr-94): ;; Reuse an overlay we already have. | ||
| 3000 | 1.100 (kwzh 24-Apr-94): (progn | ||
| 3001 | 1.100 (kwzh 24-Apr-94): (setq overlay (car overlays) | ||
| 3002 | 1.100 (kwzh 24-Apr-94): overlays (cdr overlays)) | ||
| 3003 | 1.100 (kwzh 24-Apr-94): (overlay-put overlay 'face face) | ||
| 3004 | 1.100 (kwzh 24-Apr-94): (move-overlay overlay beg (point))) | ||
| 3005 | 1.100 (kwzh 24-Apr-94): ;; Make a new overlay and add it to | ||
| 3006 | 1.100 (kwzh 24-Apr-94): ;; rmail-overlay-list. | ||
| 3007 | 1.100 (kwzh 24-Apr-94): (setq overlay (make-overlay beg (point))) | ||
| 3008 | 1.100 (kwzh 24-Apr-94): (overlay-put overlay 'face face) | ||
| 3009 | 1.100 (kwzh 24-Apr-94): (setq rmail-overlay-list | ||
| 3010 | 1.100 (kwzh 24-Apr-94): (cons overlay rmail-overlay-list)))))))))) | ||
| 3011 | 1.317 (fx 24-May-00): | ||
| 3012 | 1.317 (fx 24-May-00): (defun rmail-auto-file () | ||
| 3013 | 1.317 (fx 24-May-00): "Automatically move a message into a sub-folder based on criteria. | ||
| 3014 | 1.317 (fx 24-May-00): Called when a new message is displayed." | ||
| 3015 | 1.317 (fx 24-May-00): (if (or (rmail-message-labels-p rmail-current-message "filed") | ||
| 3016 | 1.317 (fx 24-May-00): (not (string= (buffer-file-name) | ||
| 3017 | 1.317 (fx 24-May-00): (expand-file-name rmail-file-name)))) | ||
| 3018 | 1.317 (fx 24-May-00): ;; Do nothing if it's already been filed. | ||
| 3019 | 1.317 (fx 24-May-00): nil | ||
| 3020 | 1.317 (fx 24-May-00): ;; Find out some basics (common fields) | ||
| 3021 | 1.317 (fx 24-May-00): (let ((from (mail-fetch-field "from")) | ||
| 3022 | 1.317 (fx 24-May-00): (subj (mail-fetch-field "subject")) | ||
| 3023 | 1.317 (fx 24-May-00): (to (concat (mail-fetch-field "to") "," (mail-fetch-field "cc"))) | ||
| 3024 | 1.317 (fx 24-May-00): (d rmail-automatic-folder-directives) | ||
| 3025 | 1.317 (fx 24-May-00): (directive-loop nil) | ||
| 3026 | 1.317 (fx 24-May-00): (folder nil)) | ||
| 3027 | 1.317 (fx 24-May-00): (while d | ||
| 3028 | 1.317 (fx 24-May-00): (setq folder (car (car d)) | ||
| 3029 | 1.317 (fx 24-May-00): directive-loop (cdr (car d))) | ||
| 3030 | 1.317 (fx 24-May-00): (while (and (car directive-loop) | ||
| 3031 | 1.317 (fx 24-May-00): (let ((f (cond | ||
| 3032 | 1.317 (fx 24-May-00): ((string= (car directive-loop) "from") from) | ||
| 3033 | 1.317 (fx 24-May-00): ((string= (car directive-loop) "to") to) | ||
| 3034 | 1.317 (fx 24-May-00): ((string= (car directive-loop) "subject") subj) | ||
| 3035 | 1.317 (fx 24-May-00): (t (mail-fetch-field (car directive-loop)))))) | ||
| 3036 | 1.317 (fx 24-May-00): (and f (string-match (car (cdr directive-loop)) f)))) | ||
| 3037 | 1.317 (fx 24-May-00): (setq directive-loop (cdr (cdr directive-loop)))) | ||
| 3038 | 1.317 (fx 24-May-00): ;; If there are no directives left, then it was a complete match. | ||
| 3039 | 1.317 (fx 24-May-00): (if (null directive-loop) | ||
| 3040 | 1.317 (fx 24-May-00): (if (null folder) | ||
| 3041 | 1.317 (fx 24-May-00): (rmail-delete-forward) | ||
| 3042 | 1.317 (fx 24-May-00): (if (string= "/dev/null" folder) | ||
| 3043 | 1.317 (fx 24-May-00): (rmail-delete-message) | ||
| 3044 | 1.317 (fx 24-May-00): (rmail-output-to-rmail-file folder 1 t) | ||
| 3045 | 1.317 (fx 24-May-00): (setq d nil)))) | ||
| 3046 | 1.317 (fx 24-May-00): (setq d (cdr d)))))) | ||
| 3047 | 1.100 (kwzh 24-Apr-94): | ||
| 3048 | 1.1 (roland 13-May-91): (defun rmail-next-message (n) | ||
| 3049 | 1.1 (roland 13-May-91): "Show following message whether deleted or not. | ||
| 3050 | 1.1 (roland 13-May-91): With prefix arg N, moves forward N messages, or backward if N is negative." | ||
| 3051 | 1.1 (roland 13-May-91): (interactive "p") | ||
| 3052 | 1.339 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 3053 | 1.1 (roland 13-May-91): (rmail-maybe-set-message-counters) | ||
| 3054 | 1.1 (roland 13-May-91): (rmail-show-message (+ rmail-current-message n))) | ||
| 3055 | 1.1 (roland 13-May-91): | ||
| 3056 | 1.1 (roland 13-May-91): (defun rmail-previous-message (n) | ||
| 3057 | 1.1 (roland 13-May-91): "Show previous message whether deleted or not. | ||
| 3058 | 1.1 (roland 13-May-91): With prefix arg N, moves backward N messages, or forward if N is negative." | ||
| 3059 | 1.1 (roland 13-May-91): (interactive "p") | ||
| 3060 | 1.358 (pot 06-May-02): (rmail-next-message (- n))) | ||
| 3061 | 1.1 (roland 13-May-91): | ||
| 3062 | 1.1 (roland 13-May-91): (defun rmail-next-undeleted-message (n) | ||
| 3063 | 1.1 (roland 13-May-91): "Show following non-deleted message. | ||
| 3064 | 1.1 (roland 13-May-91): With prefix arg N, moves forward N non-deleted messages, | ||
| 3065 | 1.68 (rms 09-Oct-93): or backward if N is negative. | ||
| 3066 | 1.68 (rms 09-Oct-93): | ||
| 3067 | 1.68 (rms 09-Oct-93): Returns t if a new message is being shown, nil otherwise." | ||
| 3068 | 1.1 (roland 13-May-91): (interactive "p") | ||
| 3069 | 1.339 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 3070 | 1.1 (roland 13-May-91): (rmail-maybe-set-message-counters) | ||
| 3071 | 1.1 (roland 13-May-91): (let ((lastwin rmail-current-message) | ||
| 3072 | 1.1 (roland 13-May-91): (current rmail-current-message)) | ||
| 3073 | 1.1 (roland 13-May-91): (while (and (> n 0) (< current rmail-total-messages)) | ||
| 3074 | 1.1 (roland 13-May-91): (setq current (1+ current)) | ||
| 3075 | 1.1 (roland 13-May-91): (if (not (rmail-message-deleted-p current)) | ||
| 3076 | 1.1 (roland 13-May-91): (setq lastwin current n (1- n)))) | ||
| 3077 | 1.1 (roland 13-May-91): (while (and (< n 0) (> current 1)) | ||
| 3078 | 1.1 (roland 13-May-91): (setq current (1- current)) | ||
| 3079 | 1.1 (roland 13-May-91): (if (not (rmail-message-deleted-p current)) | ||
| 3080 | 1.1 (roland 13-May-91): (setq lastwin current n (1+ n)))) | ||
| 3081 | 1.1 (roland 13-May-91): (if (/= lastwin rmail-current-message) | ||
| 3082 | 1.68 (rms 09-Oct-93): (progn (rmail-show-message lastwin) | ||
| 3083 | 1.68 (rms 09-Oct-93): t) | ||
| 3084 | 1.68 (rms 09-Oct-93): (if (< n 0) | ||
| 3085 | 1.68 (rms 09-Oct-93): (message "No previous nondeleted message")) | ||
| 3086 | 1.68 (rms 09-Oct-93): (if (> n 0) | ||
| 3087 | 1.68 (rms 09-Oct-93): (message "No following nondeleted message")) | ||
| 3088 | 1.68 (rms 09-Oct-93): nil))) | ||
| 3089 | 1.1 (roland 13-May-91): | ||
| 3090 | 1.1 (roland 13-May-91): (defun rmail-previous-undeleted-message (n) | ||
| 3091 | 1.1 (roland 13-May-91): "Show previous non-deleted message. | ||
| 3092 | 1.1 (roland 13-May-91): With prefix argument N, moves backward N non-deleted messages, | ||
| 3093 | 1.1 (roland 13-May-91): or forward if N is negative." | ||
| 3094 | 1.1 (roland 13-May-91): (interactive "p") | ||
| 3095 | 1.1 (roland 13-May-91): (rmail-next-undeleted-message (- n))) | ||
| 3096 | 1.1 (roland 13-May-91): | ||
| 3097 | 1.1 (roland 13-May-91): (defun rmail-first-message () | ||
| 3098 | 1.1 (roland 13-May-91): "Show first message in file." | ||
| 3099 | 1.1 (roland 13-May-91): (interactive) | ||
| 3100 | 1.1 (roland 13-May-91): (rmail-maybe-set-message-counters) | ||
| 3101 | 1.1 (roland 13-May-91): (rmail-show-message 1)) | ||
| 3102 | 1.1 (roland 13-May-91): | ||
| 3103 | 1.1 (roland 13-May-91): (defun rmail-last-message () | ||
| 3104 | 1.1 (roland 13-May-91): "Show last message in file." | ||
| 3105 | 1.1 (roland 13-May-91): (interactive) | ||
| 3106 | 1.1 (roland 13-May-91): (rmail-maybe-set-message-counters) | ||
| 3107 | 1.1 (roland 13-May-91): (rmail-show-message rmail-total-messages)) | ||
| 3108 | 1.1 (roland 13-May-91): | ||
| 3109 | 1.1 (roland 13-May-91): (defun rmail-what-message () | ||
| 3110 | 1.1 (roland 13-May-91): (let ((where (point)) | ||
| 3111 | 1.1 (roland 13-May-91): (low 1) | ||
| 3112 | 1.1 (roland 13-May-91): (high rmail-total-messages) | ||
| 3113 | 1.1 (roland 13-May-91): (mid (/ rmail-total-messages 2))) | ||
| 3114 | 1.1 (roland 13-May-91): (while (> (- high low) 1) | ||
| 3115 | 1.1 (roland 13-May-91): (if (>= where (rmail-msgbeg mid)) | ||
| 3116 | 1.1 (roland 13-May-91): (setq low mid) | ||
| 3117 | 1.1 (roland 13-May-91): (setq high mid)) | ||
| 3118 | 1.1 (roland 13-May-91): (setq mid (+ low (/ (- high low) 2)))) | ||
| 3119 | 1.1 (roland 13-May-91): (if (>= where (rmail-msgbeg high)) high low))) | ||
| 3120 | 1.1 (roland 13-May-91): | ||
| 3121 | 1.39 (rms 09-Mar-93): (defun rmail-message-recipients-p (msg recipients &optional primary-only) | ||
| 3122 | 1.39 (rms 09-Mar-93): (save-restriction | ||
| 3123 | 1.39 (rms 09-Mar-93): (goto-char (rmail-msgbeg msg)) | ||
| 3124 | 1.261 (rms 18-Apr-98): (search-forward "\n*** EOOH ***\n") | ||
| 3125 | 1.39 (rms 09-Mar-93): (narrow-to-region (point) (progn (search-forward "\n\n") (point))) | ||
| 3126 | 1.39 (rms 09-Mar-93): (or (string-match recipients (or (mail-fetch-field "To") "")) | ||
| 3127 | 1.39 (rms 09-Mar-93): (string-match recipients (or (mail-fetch-field "From") "")) | ||
| 3128 | 1.39 (rms 09-Mar-93): (if (not primary-only) | ||
| 3129 | 1.39 (rms 09-Mar-93): (string-match recipients (or (mail-fetch-field "Cc") "")))))) | ||
| 3130 | 1.39 (rms 09-Mar-93): | ||
| 3131 | 1.334 (gerd 26-Apr-01): (defun rmail-message-regexp-p (n regexp) | ||
| 3132 | 1.334 (gerd 26-Apr-01): "Return t, if for message number N, regexp REGEXP matches in the header." | ||
| 3133 | 1.334 (gerd 26-Apr-01): (let ((beg (rmail-msgbeg n)) | ||
| 3134 | 1.334 (gerd 26-Apr-01): (end (rmail-msgend n))) | ||
| 3135 | 1.334 (gerd 26-Apr-01): (goto-char beg) | ||
| 3136 | 1.334 (gerd 26-Apr-01): (forward-line 1) | ||
| 3137 | 1.334 (gerd 26-Apr-01): (save-excursion | ||
| 3138 | 1.334 (gerd 26-Apr-01): (save-restriction | ||
| 3139 | 1.334 (gerd 26-Apr-01): (if (prog1 (= (following-char) ?0) | ||
| 3140 | 1.334 (gerd 26-Apr-01): (forward-line 2) | ||
| 3141 | 1.334 (gerd 26-Apr-01): ;; If there's a Summary-line in the (otherwise empty) | ||
| 3142 | 1.334 (gerd 26-Apr-01): ;; header, we didn't yet get past the EOOH line. | ||
| 3143 | 1.336 (gerd 30-Apr-01): (when (looking-at "^\\*\\*\\* EOOH \\*\\*\\*\n") | ||
| 3144 | 1.336 (gerd 30-Apr-01): (forward-line 1)) | ||
| 3145 | 1.335 (gerd 27-Apr-01): (setq beg (point)) | ||
| 3146 | 1.334 (gerd 26-Apr-01): (narrow-to-region (point) end)) | ||
| 3147 | 1.358 (pot 06-May-02): (progn | ||
| 3148 | 1.336 (gerd 30-Apr-01): (rfc822-goto-eoh) | ||
| 3149 | 1.336 (gerd 30-Apr-01): (setq end (point))) | ||
| 3150 | 1.335 (gerd 27-Apr-01): (setq beg (point)) | ||
| 3151 | 1.336 (gerd 30-Apr-01): (search-forward "\n*** EOOH ***\n" end t) | ||
| 3152 | 1.336 (gerd 30-Apr-01): (setq end (1+ (match-beginning 0))))) | ||
| 3153 | 1.335 (gerd 27-Apr-01): (goto-char beg) | ||
| 3154 | 1.339 (gerd 08-May-01): (if rmail-enable-mime | ||
| 3155 | 1.339 (gerd 08-May-01): (funcall rmail-search-mime-header-function n regexp end) | ||
| 3156 | 1.339 (gerd 08-May-01): (re-search-forward regexp end t))))) | ||
| 3157 | 1.339 (gerd 08-May-01): | ||
| 3158 | 1.339 (gerd 08-May-01): (defun rmail-search-message (msg regexp) | ||
| 3159 | 1.339 (gerd 08-May-01): "Return non-nil, if for message number MSG, regexp REGEXP matches." | ||
| 3160 | 1.339 (gerd 08-May-01): (goto-char (rmail-msgbeg msg)) | ||
| 3161 | 1.339 (gerd 08-May-01): (if rmail-enable-mime | ||
| 3162 | 1.339 (gerd 08-May-01): (funcall rmail-search-mime-message-function msg regexp) | ||
| 3163 | 1.339 (gerd 08-May-01): (re-search-forward regexp (rmail-msgend msg) t))) | ||
| 3164 | 1.39 (rms 09-Mar-93): | ||
| 3165 | 1.1 (roland 13-May-91): (defvar rmail-search-last-regexp nil) | ||
| 3166 | 1.19 (rms 26-Jul-92): (defun rmail-search (regexp &optional n) | ||
| 3167 | 1.164 (kwzh 21-Dec-95): "Show message containing next match for REGEXP (but not the current msg). | ||
| 3168 | 1.19 (rms 26-Jul-92): Prefix argument gives repeat count; negative argument means search | ||
| 3169 | 1.19 (rms 26-Jul-92): backwards (through earlier messages). | ||
| 3170 | 1.19 (rms 26-Jul-92): Interactively, empty argument means use same regexp used last time." | ||
| 3171 | 1.1 (roland 13-May-91): (interactive | ||
| 3172 | 1.1 (roland 13-May-91): (let* ((reversep (< (prefix-numeric-value current-prefix-arg) 0)) | ||
| 3173 | 1.1 (roland 13-May-91): (prompt | ||
| 3174 | 1.415 (rfrancoi 24-Sep-05): (concat (if reversep "Reverse " "") "Rmail search (regexp")) | ||
| 3175 | 1.1 (roland 13-May-91): regexp) | ||
| 3176 | 1.415 (rfrancoi 24-Sep-05): (setq prompt | ||
| 3177 | 1.415 (rfrancoi 24-Sep-05): (concat prompt | ||
| 3178 | 1.415 (rfrancoi 24-Sep-05): (if rmail-search-last-regexp | ||
| 3179 | 1.415 (rfrancoi 24-Sep-05): (concat ", default " | ||
| 3180 | 1.415 (rfrancoi 24-Sep-05): rmail-search-last-regexp "): ") | ||
| 3181 | 1.415 (rfrancoi 24-Sep-05): "): "))) | ||
| 3182 | 1.1 (roland 13-May-91): (setq regexp (read-string prompt)) | ||
| 3183 | 1.1 (roland 13-May-91): (cond ((not (equal regexp "")) | ||
| 3184 | 1.1 (roland 13-May-91): (setq rmail-search-last-regexp regexp)) | ||
| 3185 | 1.1 (roland 13-May-91): ((not rmail-search-last-regexp) | ||
| 3186 | 1.1 (roland 13-May-91): (error "No previous Rmail search string"))) | ||
| 3187 | 1.19 (rms 26-Jul-92): (list rmail-search-last-regexp | ||
| 3188 | 1.19 (rms 26-Jul-92): (prefix-numeric-value current-prefix-arg)))) | ||
| 3189 | 1.19 (rms 26-Jul-92): (or n (setq n 1)) | ||
| 3190 | 1.1 (roland 13-May-91): (message "%sRmail search for %s..." | ||
| 3191 | 1.20 (rms 05-Aug-92): (if (< n 0) "Reverse " "") | ||
| 3192 | 1.1 (roland 13-May-91): regexp) | ||
| 3193 | 1.339 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 3194 | 1.1 (roland 13-May-91): (rmail-maybe-set-message-counters) | ||
| 3195 | 1.1 (roland 13-May-91): (let ((omin (point-min)) | ||
| 3196 | 1.1 (roland 13-May-91): (omax (point-max)) | ||
| 3197 | 1.1 (roland 13-May-91): (opoint (point)) | ||
| 3198 | 1.1 (roland 13-May-91): win | ||
| 3199 | 1.19 (rms 26-Jul-92): (reversep (< n 0)) | ||
| 3200 | 1.1 (roland 13-May-91): (msg rmail-current-message)) | ||
| 3201 | 1.1 (roland 13-May-91): (unwind-protect | ||
| 3202 | 1.1 (roland 13-May-91): (progn | ||
| 3203 | 1.1 (roland 13-May-91): (widen) | ||
| 3204 | 1.19 (rms 26-Jul-92): (while (/= n 0) | ||
| 3205 | 1.19 (rms 26-Jul-92): ;; Check messages one by one, advancing message number up or down | ||
| 3206 | 1.19 (rms 26-Jul-92): ;; but searching forward through each message. | ||
| 3207 | 1.19 (rms 26-Jul-92): (if reversep | ||
| 3208 | 1.19 (rms 26-Jul-92): (while (and (null win) (> msg 1)) | ||
| 3209 | 1.339 (gerd 08-May-01): (setq msg (1- msg) | ||
| 3210 | 1.339 (gerd 08-May-01): win (rmail-search-message msg regexp))) | ||
| 3211 | 1.19 (rms 26-Jul-92): (while (and (null win) (< msg rmail-total-messages)) | ||
| 3212 | 1.339 (gerd 08-May-01): (setq msg (1+ msg) | ||
| 3213 | 1.339 (gerd 08-May-01): win (rmail-search-message msg regexp)))) | ||
| 3214 | 1.20 (rms 05-Aug-92): (setq n (+ n (if reversep 1 -1))))) | ||
| 3215 | 1.1 (roland 13-May-91): (if win | ||
| 3216 | 1.1 (roland 13-May-91): (progn | ||
| 3217 | 1.339 (gerd 08-May-01): (rmail-show-message msg) | ||
| 3218 | 1.339 (gerd 08-May-01): ;; Search forward (if this is a normal search) or backward | ||
| 3219 | 1.339 (gerd 08-May-01): ;; (if this is a reverse search) through this message to | ||
| 3220 | 1.339 (gerd 08-May-01): ;; position point. This search may fail because REGEXP | ||
| 3221 | 1.339 (gerd 08-May-01): ;; was found in the hidden portion of this message. In | ||
| 3222 | 1.339 (gerd 08-May-01): ;; that case, move point to the beginning of visible | ||
| 3223 | 1.339 (gerd 08-May-01): ;; portion. | ||
| 3224 | 1.1 (roland 13-May-91): (if reversep | ||
| 3225 | 1.1 (roland 13-May-91): (progn | ||
| 3226 | 1.339 (gerd 08-May-01): (goto-char (point-max)) | ||
| 3227 | 1.339 (gerd 08-May-01): (re-search-backward regexp nil 'move)) | ||
| 3228 | 1.339 (gerd 08-May-01): (goto-char (point-min)) | ||
| 3229 | 1.339 (gerd 08-May-01): (re-search-forward regexp nil t)) | ||
| 3230 | 1.1 (roland 13-May-91): (message "%sRmail search for %s...done" | ||
| 3231 | 1.1 (roland 13-May-91): (if reversep "Reverse " "") | ||
| 3232 | 1.339 (gerd 08-May-01): regexp)) | ||
| 3233 | 1.1 (roland 13-May-91): (goto-char opoint) | ||
| 3234 | 1.1 (roland 13-May-91): (narrow-to-region omin omax) | ||
| 3235 | 1.1 (roland 13-May-91): (ding) | ||
| 3236 | 1.1 (roland 13-May-91): (message "Search failed: %s" regexp))))) | ||
| 3237 | 1.19 (rms 26-Jul-92): | ||
| 3238 | 1.19 (rms 26-Jul-92): (defun rmail-search-backwards (regexp &optional n) | ||
| 3239 | 1.19 (rms 26-Jul-92): "Show message containing previous match for REGEXP. | ||
| 3240 | 1.19 (rms 26-Jul-92): Prefix argument gives repeat count; negative argument means search | ||
| 3241 | 1.19 (rms 26-Jul-92): forward (through later messages). | ||
| 3242 | 1.19 (rms 26-Jul-92): Interactively, empty argument means use same regexp used last time." | ||
| 3243 | 1.19 (rms 26-Jul-92): (interactive | ||
| 3244 | 1.20 (rms 05-Aug-92): (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0)) | ||
| 3245 | 1.19 (rms 26-Jul-92): (prompt | ||
| 3246 | 1.415 (rfrancoi 24-Sep-05): (concat (if reversep "Reverse " "") "Rmail search (regexp")) | ||
| 3247 | 1.19 (rms 26-Jul-92): regexp) | ||
| 3248 | 1.415 (rfrancoi 24-Sep-05): (setq prompt | ||
| 3249 | 1.415 (rfrancoi 24-Sep-05): (concat prompt | ||
| 3250 | 1.415 (rfrancoi 24-Sep-05): (if rmail-search-last-regexp | ||
| 3251 | 1.415 (rfrancoi 24-Sep-05): (concat ", default " | ||
| 3252 | 1.415 (rfrancoi 24-Sep-05): rmail-search-last-regexp "): ") | ||
| 3253 | 1.415 (rfrancoi 24-Sep-05): "): "))) | ||
| 3254 | 1.19 (rms 26-Jul-92): (setq regexp (read-string prompt)) | ||
| 3255 | 1.19 (rms 26-Jul-92): (cond ((not (equal regexp "")) | ||
| 3256 | 1.19 (rms 26-Jul-92): (setq rmail-search-last-regexp regexp)) | ||
| 3257 | 1.19 (rms 26-Jul-92): ((not rmail-search-last-regexp) | ||
| 3258 | 1.19 (rms 26-Jul-92): (error "No previous Rmail search string"))) | ||
| 3259 | 1.19 (rms 26-Jul-92): (list rmail-search-last-regexp | ||
| 3260 | 1.19 (rms 26-Jul-92): (prefix-numeric-value current-prefix-arg)))) | ||
| 3261 | 1.154 (kwzh 13-Jun-95): (rmail-search regexp (- (or n 1)))) | ||
| 3262 | 1.1 (roland 13-May-91): | ||
| 3263 | 1.1 (roland 13-May-91): ;; Show the first message which has the `unseen' attribute. | ||
| 3264 | 1.1 (roland 13-May-91): (defun rmail-first-unseen-message () | ||
| 3265 | 1.31 (jla 07-Oct-92): (rmail-maybe-set-message-counters) | ||
| 3266 | 1.1 (roland 13-May-91): (let ((current 1) | ||
| 3267 | 1.1 (roland 13-May-91): found) | ||
| 3268 | 1.1 (roland 13-May-91): (save-restriction | ||
| 3269 | 1.1 (roland 13-May-91): (widen) | ||
| 3270 | 1.141 (rms 20-Dec-94): (while (and (not found) (<= current rmail-total-messages)) | ||
| 3271 | 1.1 (roland 13-May-91): (if (rmail-message-labels-p current ", ?\\(unseen\\),") | ||
| 3272 | 1.4 (roland 23-Jul-91): (setq found current)) | ||
| 3273 | 1.4 (roland 23-Jul-91): (setq current (1+ current)))) | ||
| 3274 | 1.30 (jla 05-Oct-92): ;; Let the caller show the message. | ||
| 3275 | 1.30 (jla 05-Oct-92): ;; (if found | ||
| 3276 | 1.30 (jla 05-Oct-92): ;; (rmail-show-message found)) | ||
| 3277 | 1.30 (jla 05-Oct-92): found)) | ||
| 3278 | 1.144 (rms 05-Feb-95): | ||
| 3279 | 1.417 (as 08-Jan-06): (defun rmail-current-subject () | ||
| 3280 | 1.417 (as 08-Jan-06): "Return the current subject. | ||
| 3281 | 1.417 (as 08-Jan-06): The subject is stripped of leading and trailing whitespace, and | ||
| 3282 | 1.417 (as 08-Jan-06): of typical reply prefixes such as Re:." | ||
| 3283 | 1.417 (as 08-Jan-06): (let ((subject (or (mail-fetch-field "Subject") ""))) | ||
| 3284 | 1.251 (rms 08-Mar-98): (if (string-match "\\`[ \t]+" subject) | ||
| 3285 | 1.251 (rms 08-Mar-98): (setq subject (substring subject (match-end 0)))) | ||
| 3286 | 1.417 (as 08-Jan-06): (if (string-match rmail-reply-regexp subject) | ||
| 3287 | 1.191 (kwzh 21-Jul-96): (setq subject (substring subject (match-end 0)))) | ||
| 3288 | 1.251 (rms 08-Mar-98): (if (string-match "[ \t]+\\'" subject) | ||
| 3289 | 1.251 (rms 08-Mar-98): (setq subject (substring subject 0 (match-beginning 0)))) | ||
| 3290 | 1.417 (as 08-Jan-06): subject)) | ||
| 3291 | 1.417 (as 08-Jan-06): | ||
| 3292 | 1.417 (as 08-Jan-06): (defun rmail-current-subject-regexp () | ||
| 3293 | 1.417 (as 08-Jan-06): "Return a regular expression matching the current subject. | ||
| 3294 | 1.417 (as 08-Jan-06): The regular expression matches the subject header line of | ||
| 3295 | 1.417 (as 08-Jan-06): messages about the same subject. The subject itself is stripped | ||
| 3296 | 1.417 (as 08-Jan-06): of leading and trailing whitespace, of typical reply prefixes | ||
| 3297 | 1.417 (as 08-Jan-06): such as Re: and whitespace within the subject is replaced by a | ||
| 3298 | 1.417 (as 08-Jan-06): regular expression matching whitespace in general in order to | ||
| 3299 | 1.417 (as 08-Jan-06): take into account that subject header lines may include newlines | ||
| 3300 | 1.417 (as 08-Jan-06): and more whitespace. The returned regular expressions contains | ||
| 3301 | 1.417 (as 08-Jan-06): `rmail-reply-regexp' and ends with a newline." | ||
| 3302 | 1.417 (as 08-Jan-06): (let ((subject (rmail-current-subject))) | ||
| 3303 | 1.416 (eliz 10-Dec-05): ;; If Subject is long, mailers will break it into several lines at | ||
| 3304 | 1.416 (eliz 10-Dec-05): ;; arbitrary places, so replace whitespace with a regexp that will | ||
| 3305 | 1.416 (eliz 10-Dec-05): ;; match any sequence of spaces, TABs, and newlines. | ||
| 3306 | 1.416 (eliz 10-Dec-05): (setq subject (regexp-quote subject)) | ||
| 3307 | 1.416 (eliz 10-Dec-05): (setq subject | ||
| 3308 | 1.416 (eliz 10-Dec-05): (replace-regexp-in-string "[ \t\n]+" "[ \t\n]+" subject t t)) | ||
| 3309 | 1.441 (miles 21-Nov-07): ;; Some mailers insert extra spaces after "Subject:", so allow any | ||
| 3310 | 1.441 (miles 21-Nov-07): ;; amount of them. | ||
| 3311 | 1.441 (miles 21-Nov-07): (concat "^Subject:[ \t]+" | ||
| 3312 | 1.417 (as 08-Jan-06): (if (string= "\\`" (substring rmail-reply-regexp 0 2)) | ||
| 3313 | 1.417 (as 08-Jan-06): (substring rmail-reply-regexp 2) | ||
| 3314 | 1.417 (as 08-Jan-06): rmail-reply-regexp) | ||
| 3315 | 1.417 (as 08-Jan-06): subject "[ \t]*\n"))) | ||
| 3316 | 1.417 (as 08-Jan-06): | ||
| 3317 | 1.417 (as 08-Jan-06): (defun rmail-next-same-subject (n) | ||
| 3318 | 1.417 (as 08-Jan-06): "Go to the next mail message having the same subject header. | ||
| 3319 | 1.417 (as 08-Jan-06): With prefix argument N, do this N times. | ||
| 3320 | 1.417 (as 08-Jan-06): If N is negative, go backwards instead." | ||
| 3321 | 1.417 (as 08-Jan-06): (interactive "p") | ||
| 3322 | 1.417 (as 08-Jan-06): (let ((search-regexp (rmail-current-subject-regexp)) | ||
| 3323 | 1.417 (as 08-Jan-06): (forward (> n 0)) | ||
| 3324 | 1.417 (as 08-Jan-06): (i rmail-current-message) | ||
| 3325 | 1.417 (as 08-Jan-06): (case-fold-search t) | ||
| 3326 | 1.417 (as 08-Jan-06): found) | ||
| 3327 | 1.144 (rms 05-Feb-95): (save-excursion | ||
| 3328 | 1.144 (rms 05-Feb-95): (save-restriction | ||
| 3329 | 1.144 (rms 05-Feb-95): (widen) | ||
| 3330 | 1.144 (rms 05-Feb-95): (while (and (/= n 0) | ||
| 3331 | 1.144 (rms 05-Feb-95): (if forward | ||
| 3332 | 1.144 (rms 05-Feb-95): (< i rmail-total-messages) | ||
| 3333 | 1.144 (rms 05-Feb-95): (> i 1))) | ||
| 3334 | 1.144 (rms 05-Feb-95): (let (done) | ||
| 3335 | 1.144 (rms 05-Feb-95): (while (and (not done) | ||
| 3336 | 1.144 (rms 05-Feb-95): (if forward | ||
| 3337 | 1.144 (rms 05-Feb-95): (< i rmail-total-messages) | ||
| 3338 | 1.144 (rms 05-Feb-95): (> i 1))) | ||
| 3339 | 1.144 (rms 05-Feb-95): (setq i (if forward (1+ i) (1- i))) | ||
| 3340 | 1.144 (rms 05-Feb-95): (goto-char (rmail-msgbeg i)) | ||
| 3341 | 1.144 (rms 05-Feb-95): (search-forward "\n*** EOOH ***\n") | ||
| 3342 | 1.144 (rms 05-Feb-95): (let ((beg (point)) end) | ||
| 3343 | 1.144 (rms 05-Feb-95): (search-forward "\n\n") | ||
| 3344 | 1.144 (rms 05-Feb-95): (setq end (point)) | ||
| 3345 | 1.144 (rms 05-Feb-95): (goto-char beg) | ||
| 3346 | 1.144 (rms 05-Feb-95): (setq done (re-search-forward search-regexp end t)))) | ||
| 3347 | 1.144 (rms 05-Feb-95): (if done (setq found i))) | ||
| 3348 | 1.144 (rms 05-Feb-95): (setq n (if forward (1- n) (1+ n)))))) | ||
| 3349 | 1.144 (rms 05-Feb-95): (if found | ||
| 3350 | 1.144 (rms 05-Feb-95): (rmail-show-message found) | ||
| 3351 | 1.144 (rms 05-Feb-95): (error "No %s message with same subject" | ||
| 3352 | 1.144 (rms 05-Feb-95): (if forward "following" "previous"))))) | ||
| 3353 | 1.144 (rms 05-Feb-95): | ||
| 3354 | 1.144 (rms 05-Feb-95): (defun rmail-previous-same-subject (n) | ||
| 3355 | 1.144 (rms 05-Feb-95): "Go to the previous mail message having the same subject header. | ||
| 3356 | 1.144 (rms 05-Feb-95): With prefix argument N, do this N times. | ||
| 3357 | 1.144 (rms 05-Feb-95): If N is negative, go forwards instead." | ||
| 3358 | 1.144 (rms 05-Feb-95): (interactive "p") | ||
| 3359 | 1.144 (rms 05-Feb-95): (rmail-next-same-subject (- n))) | ||
| 3360 | 1.1 (roland 13-May-91): | ||
| 3361 | 1.1 (roland 13-May-91): ;;;; *** Rmail Message Deletion Commands *** | ||
| 3362 | 1.1 (roland 13-May-91): | ||
| 3363 | 1.1 (roland 13-May-91): (defun rmail-message-deleted-p (n) | ||
| 3364 | 1.1 (roland 13-May-91): (= (aref rmail-deleted-vector n) ?D)) | ||
| 3365 | 1.1 (roland 13-May-91): | ||
| 3366 | 1.1 (roland 13-May-91): (defun rmail-set-message-deleted-p (n state) | ||
| 3367 | 1.1 (roland 13-May-91): (aset rmail-deleted-vector n (if state ?D ?\ ))) | ||
| 3368 | 1.1 (roland 13-May-91): | ||
| 3369 | 1.1 (roland 13-May-91): (defun rmail-delete-message () | ||
| 3370 | 1.1 (roland 13-May-91): "Delete this message and stay on it." | ||
| 3371 | 1.1 (roland 13-May-91): (interactive) | ||
| 3372 | 1.161 (rms 10-Nov-95): (rmail-set-attribute "deleted" t) | ||
| 3373 | 1.161 (rms 10-Nov-95): (run-hooks 'rmail-delete-message-hook)) | ||
| 3374 | 1.1 (roland 13-May-91): | ||
| 3375 | 1.1 (roland 13-May-91): (defun rmail-undelete-previous-message () | ||
| 3376 | 1.1 (roland 13-May-91): "Back up to deleted message, select it, and undelete it." | ||
| 3377 | 1.1 (roland 13-May-91): (interactive) | ||
| 3378 | 1.339 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 3379 | 1.1 (roland 13-May-91): (let ((msg rmail-current-message)) | ||
| 3380 | 1.1 (roland 13-May-91): (while (and (> msg 0) | ||
| 3381 | 1.1 (roland 13-May-91): (not (rmail-message-deleted-p msg))) | ||
| 3382 | 1.1 (roland 13-May-91): (setq msg (1- msg))) | ||
| 3383 | 1.1 (roland 13-May-91): (if (= msg 0) | ||
| 3384 | 1.1 (roland 13-May-91): (error "No previous deleted message") | ||
| 3385 | 1.1 (roland 13-May-91): (if (/= msg rmail-current-message) | ||
| 3386 | 1.1 (roland 13-May-91): (rmail-show-message msg)) | ||
| 3387 | 1.39 (rms 09-Mar-93): (rmail-set-attribute "deleted" nil) | ||
| 3388 | 1.39 (rms 09-Mar-93): (if (rmail-summary-exists) | ||
| 3389 | 1.39 (rms 09-Mar-93): (save-excursion | ||
| 3390 | 1.39 (rms 09-Mar-93): (set-buffer rmail-summary-buffer) | ||
| 3391 | 1.39 (rms 09-Mar-93): (rmail-summary-mark-undeleted msg))) | ||
| 3392 | 1.39 (rms 09-Mar-93): (rmail-maybe-display-summary)))) | ||
| 3393 | 1.1 (roland 13-May-91): | ||
| 3394 | 1.1 (roland 13-May-91): (defun rmail-delete-forward (&optional backward) | ||
| 3395 | 1.1 (roland 13-May-91): "Delete this message and move to next nondeleted one. | ||
| 3396 | 1.1 (roland 13-May-91): Deleted messages stay in the file until the \\[rmail-expunge] command is given. | ||
| 3397 | 1.68 (rms 09-Oct-93): With prefix argument, delete and move backward. | ||
| 3398 | 1.68 (rms 09-Oct-93): | ||
| 3399 | 1.68 (rms 09-Oct-93): Returns t if a new message is displayed after the delete, or nil otherwise." | ||
| 3400 | 1.1 (roland 13-May-91): (interactive "P") | ||
| 3401 | 1.1 (roland 13-May-91): (rmail-set-attribute "deleted" t) | ||
| 3402 | 1.161 (rms 10-Nov-95): (run-hooks 'rmail-delete-message-hook) | ||
| 3403 | 1.39 (rms 09-Mar-93): (let ((del-msg rmail-current-message)) | ||
| 3404 | 1.39 (rms 09-Mar-93): (if (rmail-summary-exists) | ||
| 3405 | 1.133 (rms 08-Oct-94): (rmail-select-summary | ||
| 3406 | 1.133 (rms 08-Oct-94): (rmail-summary-mark-deleted del-msg))) | ||
| 3407 | 1.68 (rms 09-Oct-93): (prog1 (rmail-next-undeleted-message (if backward -1 1)) | ||
| 3408 | 1.68 (rms 09-Oct-93): (rmail-maybe-display-summary)))) | ||
| 3409 | 1.1 (roland 13-May-91): | ||
| 3410 | 1.1 (roland 13-May-91): (defun rmail-delete-backward () | ||
| 3411 | 1.1 (roland 13-May-91): "Delete this message and move to previous nondeleted one. | ||
| 3412 | 1.1 (roland 13-May-91): Deleted messages stay in the file until the \\[rmail-expunge] command is given." | ||
| 3413 | 1.1 (roland 13-May-91): (interactive) | ||
| 3414 | 1.1 (roland 13-May-91): (rmail-delete-forward t)) | ||
| 3415 | 1.1 (roland 13-May-91): | ||
| 3416 | 1.131 (rms 27-Sep-94): ;; Compute the message number a given message would have after expunging. | ||
| 3417 | 1.131 (rms 27-Sep-94): ;; The present number of the message is OLDNUM. | ||
| 3418 | 1.131 (rms 27-Sep-94): ;; DELETEDVEC should be rmail-deleted-vector. | ||
| 3419 | 1.131 (rms 27-Sep-94): ;; The value is nil for a message that would be deleted. | ||
| 3420 | 1.131 (rms 27-Sep-94): (defun rmail-msg-number-after-expunge (deletedvec oldnum) | ||
| 3421 | 1.131 (rms 27-Sep-94): (if (or (null oldnum) (= (aref deletedvec oldnum) ?D)) | ||
| 3422 | 1.131 (rms 27-Sep-94): nil | ||
| 3423 | 1.131 (rms 27-Sep-94): (let ((i 0) | ||
| 3424 | 1.131 (rms 27-Sep-94): (newnum 0)) | ||
| 3425 | 1.131 (rms 27-Sep-94): (while (< i oldnum) | ||
| 3426 | 1.131 (rms 27-Sep-94): (if (/= (aref deletedvec i) ?D) | ||
| 3427 | 1.131 (rms 27-Sep-94): (setq newnum (1+ newnum))) | ||
| 3428 | 1.131 (rms 27-Sep-94): (setq i (1+ i))) | ||
| 3429 | 1.131 (rms 27-Sep-94): newnum))) | ||
| 3430 | 1.131 (rms 27-Sep-94): | ||
| 3431 | 1.325 (gerd 04-Dec-00): (defun rmail-expunge-confirmed () | ||
| 3432 | 1.325 (gerd 04-Dec-00): "Return t if deleted message should be expunged. If necessary, ask the user. | ||
| 3433 | 1.325 (gerd 04-Dec-00): See also user-option `rmail-confirm-expunge'." | ||
| 3434 | 1.339 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 3435 | 1.325 (gerd 04-Dec-00): (or (not (stringp rmail-deleted-vector)) | ||
| 3436 | 1.325 (gerd 04-Dec-00): (not (string-match "D" rmail-deleted-vector)) | ||
| 3437 | 1.325 (gerd 04-Dec-00): (null rmail-confirm-expunge) | ||
| 3438 | 1.325 (gerd 04-Dec-00): (funcall rmail-confirm-expunge | ||
| 3439 | 1.325 (gerd 04-Dec-00): "Erase deleted messages from Rmail file? "))) | ||
| 3440 | 1.325 (gerd 04-Dec-00): | ||
| 3441 | 1.380 (uid65566 16-Jan-04): (defun rmail-only-expunge (&optional dont-show) | ||
| 3442 | 1.1 (roland 13-May-91): "Actually erase all deleted messages in the file." | ||
| 3443 | 1.1 (roland 13-May-91): (interactive) | ||
| 3444 | 1.339 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 3445 | 1.1 (roland 13-May-91): (message "Expunging deleted messages...") | ||
| 3446 | 1.1 (roland 13-May-91): ;; Discard all undo records for this buffer. | ||
| 3447 | 1.1 (roland 13-May-91): (or (eq buffer-undo-list t) | ||
| 3448 | 1.1 (roland 13-May-91): (setq buffer-undo-list nil)) | ||
| 3449 | 1.1 (roland 13-May-91): (rmail-maybe-set-message-counters) | ||
| 3450 | 1.1 (roland 13-May-91): (let* ((omax (- (buffer-size) (point-max))) | ||
| 3451 | 1.1 (roland 13-May-91): (omin (- (buffer-size) (point-min))) | ||
| 3452 | 1.1 (roland 13-May-91): (opoint (if (and (> rmail-current-message 0) | ||
| 3453 | 1.96 (kwzh 23-Apr-94): (rmail-message-deleted-p rmail-current-message)) | ||
| 3454 | 1.96 (kwzh 23-Apr-94): 0 | ||
| 3455 | 1.339 (gerd 08-May-01): (if rmail-enable-mime | ||
| 3456 | 1.339 (gerd 08-May-01): (with-current-buffer rmail-view-buffer | ||
| 3457 | 1.339 (gerd 08-May-01): (- (point)(point-min))) | ||
| 3458 | 1.339 (gerd 08-May-01): (- (point) (point-min))))) | ||
| 3459 | 1.1 (roland 13-May-91): (messages-head (cons (aref rmail-message-vector 0) nil)) | ||
| 3460 | 1.1 (roland 13-May-91): (messages-tail messages-head) | ||
| 3461 | 1.1 (roland 13-May-91): ;; Don't make any undo records for the expunging. | ||
| 3462 | 1.1 (roland 13-May-91): (buffer-undo-list t) | ||
| 3463 | 1.1 (roland 13-May-91): (win)) | ||
| 3464 | 1.1 (roland 13-May-91): (unwind-protect | ||
| 3465 | 1.1 (roland 13-May-91): (save-excursion | ||
| 3466 | 1.1 (roland 13-May-91): (widen) | ||
| 3467 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 3468 | 1.1 (roland 13-May-91): (let ((counter 0) | ||
| 3469 | 1.1 (roland 13-May-91): (number 1) | ||
| 3470 | 1.1 (roland 13-May-91): (total rmail-total-messages) | ||
| 3471 | 1.1 (roland 13-May-91): (new-message-number rmail-current-message) | ||
| 3472 | 1.1 (roland 13-May-91): (new-summary nil) | ||
| 3473 | 1.218 (rms 02-May-97): (new-msgref (list (list 0))) | ||
| 3474 | 1.131 (rms 27-Sep-94): (rmailbuf (current-buffer)) | ||
| 3475 | 1.1 (roland 13-May-91): (buffer-read-only nil) | ||
| 3476 | 1.1 (roland 13-May-91): (messages rmail-message-vector) | ||
| 3477 | 1.1 (roland 13-May-91): (deleted rmail-deleted-vector) | ||
| 3478 | 1.1 (roland 13-May-91): (summary rmail-summary-vector)) | ||
| 3479 | 1.1 (roland 13-May-91): (setq rmail-total-messages nil | ||
| 3480 | 1.1 (roland 13-May-91): rmail-current-message nil | ||
| 3481 | 1.1 (roland 13-May-91): rmail-message-vector nil | ||
| 3482 | 1.1 (roland 13-May-91): rmail-deleted-vector nil | ||
| 3483 | 1.1 (roland 13-May-91): rmail-summary-vector nil) | ||
| 3484 | 1.131 (rms 27-Sep-94): | ||
| 3485 | 1.1 (roland 13-May-91): (while (<= number total) | ||
| 3486 | 1.1 (roland 13-May-91): (if (= (aref deleted number) ?D) | ||
| 3487 | 1.1 (roland 13-May-91): (progn | ||
| 3488 | 1.1 (roland 13-May-91): (delete-region | ||
| 3489 | 1.1 (roland 13-May-91): (marker-position (aref messages number)) | ||
| 3490 | 1.1 (roland 13-May-91): (marker-position (aref messages (1+ number)))) | ||
| 3491 | 1.1 (roland 13-May-91): (move-marker (aref messages number) nil) | ||
| 3492 | 1.1 (roland 13-May-91): (if (> new-message-number counter) | ||
| 3493 | 1.1 (roland 13-May-91): (setq new-message-number (1- new-message-number)))) | ||
| 3494 | 1.1 (roland 13-May-91): (setq counter (1+ counter)) | ||
| 3495 | 1.1 (roland 13-May-91): (setq messages-tail | ||
| 3496 | 1.1 (roland 13-May-91): (setcdr messages-tail | ||
| 3497 | 1.1 (roland 13-May-91): (cons (aref messages number) nil))) | ||
| 3498 | 1.1 (roland 13-May-91): (setq new-summary | ||
| 3499 | 1.1 (roland 13-May-91): (cons (if (= counter number) (aref summary (1- number))) | ||
| 3500 | 1.218 (rms 02-May-97): new-summary)) | ||
| 3501 | 1.218 (rms 02-May-97): (setq new-msgref | ||
| 3502 | 1.218 (rms 02-May-97): (cons (aref rmail-msgref-vector number) | ||
| 3503 | 1.218 (rms 02-May-97): new-msgref)) | ||
| 3504 | 1.218 (rms 02-May-97): (setcar (car new-msgref) counter)) | ||
| 3505 | 1.1 (roland 13-May-91): (if (zerop (% (setq number (1+ number)) 20)) | ||
| 3506 | 1.1 (roland 13-May-91): (message "Expunging deleted messages...%d" number))) | ||
| 3507 | 1.1 (roland 13-May-91): (setq messages-tail | ||
| 3508 | 1.1 (roland 13-May-91): (setcdr messages-tail | ||
| 3509 | 1.1 (roland 13-May-91): (cons (aref messages number) nil))) | ||
| 3510 | 1.1 (roland 13-May-91): (setq rmail-current-message new-message-number | ||
| 3511 | 1.1 (roland 13-May-91): rmail-total-messages counter | ||
| 3512 | 1.1 (roland 13-May-91): rmail-message-vector (apply 'vector messages-head) | ||
| 3513 | 1.1 (roland 13-May-91): rmail-deleted-vector (make-string (1+ counter) ?\ ) | ||
| 3514 | 1.1 (roland 13-May-91): rmail-summary-vector (vconcat (nreverse new-summary)) | ||
| 3515 | 1.218 (rms 02-May-97): rmail-msgref-vector (apply 'vector (nreverse new-msgref)) | ||
| 3516 | 1.1 (roland 13-May-91): win t))) | ||
| 3517 | 1.1 (roland 13-May-91): (message "Expunging deleted messages...done") | ||
| 3518 | 1.1 (roland 13-May-91): (if (not win) | ||
| 3519 | 1.1 (roland 13-May-91): (narrow-to-region (- (buffer-size) omin) (- (buffer-size) omax))) | ||
| 3520 | 1.380 (uid65566 16-Jan-04): (if (not dont-show) | ||
| 3521 | 1.380 (uid65566 16-Jan-04): (rmail-show-message | ||
| 3522 | 1.406 (rms 08-Jul-05): (if (zerop rmail-current-message) 1 nil))) | ||
| 3523 | 1.406 (rms 08-Jul-05): (if rmail-enable-mime | ||
| 3524 | 1.406 (rms 08-Jul-05): (goto-char (+ (point-min) opoint)) | ||
| 3525 | 1.406 (rms 08-Jul-05): (goto-char (+ (point) opoint)))))) | ||
| 3526 | 1.39 (rms 09-Mar-93): | ||
| 3527 | 1.39 (rms 09-Mar-93): (defun rmail-expunge () | ||
| 3528 | 1.39 (rms 09-Mar-93): "Erase deleted messages from Rmail file and summary buffer." | ||
| 3529 | 1.39 (rms 09-Mar-93): (interactive) | ||
| 3530 | 1.325 (gerd 04-Dec-00): (when (rmail-expunge-confirmed) | ||
| 3531 | 1.313 (gerd 24-Mar-00): (rmail-only-expunge) | ||
| 3532 | 1.313 (gerd 24-Mar-00): (if (rmail-summary-exists) | ||
| 3533 | 1.325 (gerd 04-Dec-00): (rmail-select-summary (rmail-update-summary))))) | ||
| 3534 | 1.1 (roland 13-May-91): | ||
| 3535 | 1.1 (roland 13-May-91): ;;;; *** Rmail Mailing Commands *** | ||
| 3536 | 1.1 (roland 13-May-91): | ||
| 3537 | 1.203 (rms 07-Dec-96): (defun rmail-start-mail (&optional noerase to subject in-reply-to cc | ||
| 3538 | 1.203 (rms 07-Dec-96): replybuffer sendactions same-window others) | ||
| 3539 | 1.203 (rms 07-Dec-96): (let (yank-action) | ||
| 3540 | 1.203 (rms 07-Dec-96): (if replybuffer | ||
| 3541 | 1.203 (rms 07-Dec-96): (setq yank-action (list 'insert-buffer replybuffer))) | ||
| 3542 | 1.203 (rms 07-Dec-96): (setq others (cons (cons "cc" cc) others)) | ||
| 3543 | 1.203 (rms 07-Dec-96): (setq others (cons (cons "in-reply-to" in-reply-to) others)) | ||
| 3544 | 1.203 (rms 07-Dec-96): (if same-window | ||
| 3545 | 1.203 (rms 07-Dec-96): (compose-mail to subject others | ||
| 3546 | 1.203 (rms 07-Dec-96): noerase nil | ||
| 3547 | 1.203 (rms 07-Dec-96): yank-action sendactions) | ||
| 3548 | 1.390 (eliz 24-Apr-04): (if rmail-mail-new-frame | ||
| 3549 | 1.203 (rms 07-Dec-96): (prog1 | ||
| 3550 | 1.203 (rms 07-Dec-96): (compose-mail to subject others | ||
| 3551 | 1.203 (rms 07-Dec-96): noerase 'switch-to-buffer-other-frame | ||
| 3552 | 1.203 (rms 07-Dec-96): yank-action sendactions) | ||
| 3553 | 1.203 (rms 07-Dec-96): ;; This is not a standard frame parameter; | ||
| 3554 | 1.203 (rms 07-Dec-96): ;; nothing except sendmail.el looks at it. | ||
| 3555 | 1.203 (rms 07-Dec-96): (modify-frame-parameters (selected-frame) | ||
| 3556 | 1.203 (rms 07-Dec-96): '((mail-dedicated-frame . t)))) | ||
| 3557 | 1.203 (rms 07-Dec-96): (compose-mail to subject others | ||
| 3558 | 1.203 (rms 07-Dec-96): noerase 'switch-to-buffer-other-window | ||
| 3559 | 1.203 (rms 07-Dec-96): yank-action sendactions))))) | ||
| 3560 | 1.57 (rms 16-Jul-93): | ||
| 3561 | 1.1 (roland 13-May-91): (defun rmail-mail () | ||
| 3562 | 1.39 (rms 09-Mar-93): "Send mail in another window. | ||
| 3563 | 1.39 (rms 09-Mar-93): While composing the message, use \\[mail-yank-original] to yank the | ||
| 3564 | 1.39 (rms 09-Mar-93): original message into it." | ||
| 3565 | 1.1 (roland 13-May-91): (interactive) | ||
| 3566 | 1.212 (handa 26-Feb-97): (rmail-start-mail nil nil nil nil nil rmail-view-buffer)) | ||
| 3567 | 1.1 (roland 13-May-91): | ||
| 3568 | 1.1 (roland 13-May-91): (defun rmail-continue () | ||
| 3569 | 1.1 (roland 13-May-91): "Continue composing outgoing message previously being composed." | ||
| 3570 | 1.1 (roland 13-May-91): (interactive) | ||
| 3571 | 1.57 (rms 16-Jul-93): (rmail-start-mail t)) | ||
| 3572 | 1.1 (roland 13-May-91): | ||
| 3573 | 1.1 (roland 13-May-91): (defun rmail-reply (just-sender) | ||
| 3574 | 1.1 (roland 13-May-91): "Reply to the current message. | ||
| 3575 | 1.1 (roland 13-May-91): Normally include CC: to all other recipients of original message; | ||
| 3576 | 1.1 (roland 13-May-91): prefix argument means ignore them. While composing the reply, | ||
| 3577 | 1.1 (roland 13-May-91): use \\[mail-yank-original] to yank the original message into it." | ||
| 3578 | 1.1 (roland 13-May-91): (interactive "P") | ||
| 3579 | 1.207 (rms 31-Jan-97): (let (from reply-to cc subject date to message-id references | ||
| 3580 | 1.202 (rms 26-Oct-96): resent-to resent-cc resent-reply-to | ||
| 3581 | 1.212 (handa 26-Feb-97): (msgnum rmail-current-message)) | ||
| 3582 | 1.1 (roland 13-May-91): (save-excursion | ||
| 3583 | 1.1 (roland 13-May-91): (save-restriction | ||
| 3584 | 1.345 (gerd 06-Jul-01): (if rmail-enable-mime | ||
| 3585 | 1.345 (gerd 06-Jul-01): (narrow-to-region | ||
| 3586 | 1.345 (gerd 06-Jul-01): (goto-char (point-min)) | ||
| 3587 | 1.345 (gerd 06-Jul-01): (if (search-forward "\n\n" nil 'move) | ||
| 3588 | 1.345 (gerd 06-Jul-01): (1+ (match-beginning 0)) | ||
| 3589 | 1.345 (gerd 06-Jul-01): (point))) | ||
| 3590 | 1.339 (gerd 08-May-01): (widen) | ||
| 3591 | 1.339 (gerd 08-May-01): (goto-char (rmail-msgbeg rmail-current-message)) | ||
| 3592 | 1.339 (gerd 08-May-01): (forward-line 1) | ||
| 3593 | 1.339 (gerd 08-May-01): (if (= (following-char) ?0) | ||
| 3594 | 1.339 (gerd 08-May-01): (narrow-to-region | ||
| 3595 | 1.339 (gerd 08-May-01): (progn (forward-line 2) | ||
| 3596 | 1.339 (gerd 08-May-01): (point)) | ||
| 3597 | 1.339 (gerd 08-May-01): (progn (search-forward "\n\n" (rmail-msgend rmail-current-message) | ||
| 3598 | 1.339 (gerd 08-May-01): 'move) | ||
| 3599 | 1.339 (gerd 08-May-01): (point))) | ||
| 3600 | 1.339 (gerd 08-May-01): (narrow-to-region (point) | ||
| 3601 | 1.339 (gerd 08-May-01): (progn (search-forward "\n*** EOOH ***\n") | ||
| 3602 | 1.339 (gerd 08-May-01): (beginning-of-line) (point))))) | ||
| 3603 | 1.202 (rms 26-Oct-96): (setq from (mail-fetch-field "from") | ||
| 3604 | 1.413 (rms 15-Aug-05): reply-to (or (mail-fetch-field "mail-reply-to" nil t) | ||
| 3605 | 1.397 (rms 18-Mar-05): (mail-fetch-field "reply-to" nil t) | ||
| 3606 | 1.1 (roland 13-May-91): from) | ||
| 3607 | 1.202 (rms 26-Oct-96): subject (mail-fetch-field "subject") | ||
| 3608 | 1.202 (rms 26-Oct-96): date (mail-fetch-field "date") | ||
| 3609 | 1.202 (rms 26-Oct-96): message-id (mail-fetch-field "message-id") | ||
| 3610 | 1.207 (rms 31-Jan-97): references (mail-fetch-field "references" nil nil t) | ||
| 3611 | 1.207 (rms 31-Jan-97): resent-reply-to (mail-fetch-field "resent-reply-to" nil t) | ||
| 3612 | 1.202 (rms 26-Oct-96): resent-cc (and (not just-sender) | ||
| 3613 | 1.202 (rms 26-Oct-96): (mail-fetch-field "resent-cc" nil t)) | ||
| 3614 | 1.202 (rms 26-Oct-96): resent-to (or (mail-fetch-field "resent-to" nil t) "") | ||
| 3615 | 1.202 (rms 26-Oct-96): ;;; resent-subject (mail-fetch-field "resent-subject") | ||
| 3616 | 1.202 (rms 26-Oct-96): ;;; resent-date (mail-fetch-field "resent-date") | ||
| 3617 | 1.202 (rms 26-Oct-96): ;;; resent-message-id (mail-fetch-field "resent-message-id") | ||
| 3618 | 1.413 (rms 15-Aug-05): ) | ||
| 3619 | 1.413 (rms 15-Aug-05): (unless just-sender | ||
| 3620 | 1.413 (rms 15-Aug-05): (if (mail-fetch-field "mail-followup-to" nil t) | ||
| 3621 | 1.413 (rms 15-Aug-05): ;; If this header field is present, use it instead of the To and CC fields. | ||
| 3622 | 1.413 (rms 15-Aug-05): (setq to (mail-fetch-field "mail-followup-to" nil t)) | ||
| 3623 | 1.413 (rms 15-Aug-05): (setq cc (or (mail-fetch-field "cc" nil t) "") | ||
| 3624 | 1.413 (rms 15-Aug-05): to (or (mail-fetch-field "to" nil t) "")))) | ||
| 3625 | 1.413 (rms 15-Aug-05): | ||
| 3626 | 1.413 (rms 15-Aug-05): )) | ||
| 3627 | 1.413 (rms 15-Aug-05): | ||
| 3628 | 1.202 (rms 26-Oct-96): ;; Merge the resent-to and resent-cc into the to and cc. | ||
| 3629 | 1.202 (rms 26-Oct-96): (if (and resent-to (not (equal resent-to ""))) | ||
| 3630 | 1.202 (rms 26-Oct-96): (if (not (equal to "")) | ||
| 3631 | 1.202 (rms 26-Oct-96): (setq to (concat to ", " resent-to)) | ||
| 3632 | 1.202 (rms 26-Oct-96): (setq to resent-to))) | ||
| 3633 | 1.202 (rms 26-Oct-96): (if (and resent-cc (not (equal resent-cc ""))) | ||
| 3634 | 1.202 (rms 26-Oct-96): (if (not (equal cc "")) | ||
| 3635 | 1.202 (rms 26-Oct-96): (setq cc (concat cc ", " resent-cc)) | ||
| 3636 | 1.202 (rms 26-Oct-96): (setq cc resent-cc))) | ||
| 3637 | 1.202 (rms 26-Oct-96): ;; Add `Re: ' to subject if not there already. | ||
| 3638 | 1.39 (rms 09-Mar-93): (and (stringp subject) | ||
| 3639 | 1.143 (kwzh 03-Feb-95): (setq subject | ||
| 3640 | 1.143 (kwzh 03-Feb-95): (concat rmail-reply-prefix | ||
| 3641 | 1.211 (kwzh 23-Feb-97): (if (let ((case-fold-search t)) | ||
| 3642 | 1.211 (kwzh 23-Feb-97): (string-match rmail-reply-regexp subject)) | ||
| 3643 | 1.143 (kwzh 03-Feb-95): (substring subject (match-end 0)) | ||
| 3644 | 1.143 (kwzh 03-Feb-95): subject)))) | ||
| 3645 | 1.226 (rms 01-Jun-97): (rmail-start-mail | ||
| 3646 | 1.226 (rms 01-Jun-97): nil | ||
| 3647 | 1.226 (rms 01-Jun-97): ;; Using mail-strip-quoted-names is undesirable with newer mailers | ||
| 3648 | 1.226 (rms 01-Jun-97): ;; since they can handle the names unstripped. | ||
| 3649 | 1.226 (rms 01-Jun-97): ;; I don't know whether there are other mailers that still | ||
| 3650 | 1.226 (rms 01-Jun-97): ;; need the names to be stripped. | ||
| 3651 | 1.366 (rms 01-Jan-03): ;;; (mail-strip-quoted-names reply-to) | ||
| 3652 | 1.403 (eliz 21-May-05): ;; Remove unwanted names from reply-to, since Mail-Followup-To | ||
| 3653 | 1.403 (eliz 21-May-05): ;; header causes all the names in it to wind up in reply-to, not | ||
| 3654 | 1.403 (eliz 21-May-05): ;; in cc. But if what's left is an empty list, use the original. | ||
| 3655 | 1.403 (eliz 21-May-05): (let* ((reply-to-list (rmail-dont-reply-to reply-to))) | ||
| 3656 | 1.403 (eliz 21-May-05): (if (string= reply-to-list "") reply-to reply-to-list)) | ||
| 3657 | 1.226 (rms 01-Jun-97): subject | ||
| 3658 | 1.226 (rms 01-Jun-97): (rmail-make-in-reply-to-field from date message-id) | ||
| 3659 | 1.226 (rms 01-Jun-97): (if just-sender | ||
| 3660 | 1.226 (rms 01-Jun-97): nil | ||
| 3661 | 1.226 (rms 01-Jun-97): ;; mail-strip-quoted-names is NOT necessary for rmail-dont-reply-to | ||
| 3662 | 1.226 (rms 01-Jun-97): ;; to do its job. | ||
| 3663 | 1.226 (rms 01-Jun-97): (let* ((cc-list (rmail-dont-reply-to | ||
| 3664 | 1.226 (rms 01-Jun-97): (mail-strip-quoted-names | ||
| 3665 | 1.226 (rms 01-Jun-97): (if (null cc) to (concat to ", " cc)))))) | ||
| 3666 | 1.226 (rms 01-Jun-97): (if (string= cc-list "") nil cc-list))) | ||
| 3667 | 1.226 (rms 01-Jun-97): rmail-view-buffer | ||
| 3668 | 1.226 (rms 01-Jun-97): (list (list 'rmail-mark-message | ||
| 3669 | 1.339 (gerd 08-May-01): rmail-buffer | ||
| 3670 | 1.339 (gerd 08-May-01): (with-current-buffer rmail-buffer | ||
| 3671 | 1.339 (gerd 08-May-01): (aref rmail-msgref-vector msgnum)) | ||
| 3672 | 1.226 (rms 01-Jun-97): "answered")) | ||
| 3673 | 1.226 (rms 01-Jun-97): nil | ||
| 3674 | 1.226 (rms 01-Jun-97): (list (cons "References" (concat (mapconcat 'identity references " ") | ||
| 3675 | 1.226 (rms 01-Jun-97): " " message-id)))))) | ||
| 3676 | 1.217 (rms 26-Apr-97): | ||
| 3677 | 1.218 (rms 02-May-97): (defun rmail-mark-message (buffer msgnum-list attribute) | ||
| 3678 | 1.218 (rms 02-May-97): "Give BUFFER's message number in MSGNUM-LIST the attribute ATTRIBUTE. | ||
| 3679 | 1.218 (rms 02-May-97): This is use in the send-actions for message buffers. | ||
| 3680 | 1.218 (rms 02-May-97): MSGNUM-LIST is a list of the form (MSGNUM) | ||
| 3681 | 1.218 (rms 02-May-97): which is an element of rmail-msgref-vector." | ||
| 3682 | 1.217 (rms 26-Apr-97): (save-excursion | ||
| 3683 | 1.217 (rms 26-Apr-97): (set-buffer buffer) | ||
| 3684 | 1.218 (rms 02-May-97): (if (car msgnum-list) | ||
| 3685 | 1.218 (rms 02-May-97): (rmail-set-attribute attribute t (car msgnum-list))))) | ||
| 3686 | 1.1 (roland 13-May-91): | ||
| 3687 | 1.1 (roland 13-May-91): (defun rmail-make-in-reply-to-field (from date message-id) | ||
| 3688 | 1.1 (roland 13-May-91): (cond ((not from) | ||
| 3689 | 1.1 (roland 13-May-91): (if message-id | ||
| 3690 | 1.1 (roland 13-May-91): message-id | ||
| 3691 | 1.1 (roland 13-May-91): nil)) | ||
| 3692 | 1.1 (roland 13-May-91): (mail-use-rfc822 | ||
| 3693 | 1.1 (roland 13-May-91): (require 'rfc822) | ||
| 3694 | 1.1 (roland 13-May-91): (let ((tem (car (rfc822-addresses from)))) | ||
| 3695 | 1.1 (roland 13-May-91): (if message-id | ||
| 3696 | 1.233 (rms 12-Aug-97): (if (or (not tem) | ||
| 3697 | 1.233 (rms 12-Aug-97): (string-match | ||
| 3698 | 1.233 (rms 12-Aug-97): (regexp-quote (if (string-match "@[^@]*\\'" tem) | ||
| 3699 | 1.233 (rms 12-Aug-97): (substring tem 0 | ||
| 3700 | 1.233 (rms 12-Aug-97): (match-beginning 0)) | ||
| 3701 | 1.233 (rms 12-Aug-97): tem)) | ||
| 3702 | 1.233 (rms 12-Aug-97): message-id)) | ||
| 3703 | 1.233 (rms 12-Aug-97): ;; missing From, or Message-ID is sufficiently informative | ||
| 3704 | 1.1 (roland 13-May-91): message-id | ||
| 3705 | 1.1 (roland 13-May-91): (concat message-id " (" tem ")")) | ||
| 3706 | 1.82 (rms 29-Jan-94): ;; Copy TEM, discarding text properties. | ||
| 3707 | 1.82 (rms 29-Jan-94): (setq tem (copy-sequence tem)) | ||
| 3708 | 1.82 (rms 29-Jan-94): (set-text-properties 0 (length tem) nil tem) | ||
| 3709 | 1.82 (rms 29-Jan-94): (setq tem (copy-sequence tem)) | ||
| 3710 | 1.82 (rms 29-Jan-94): ;; Use prin1 to fake RFC822 quoting | ||
| 3711 | 1.82 (rms 29-Jan-94): (let ((field (prin1-to-string tem))) | ||
| 3712 | 1.82 (rms 29-Jan-94): (if date | ||
| 3713 | 1.82 (rms 29-Jan-94): (concat field "'s message of " date) | ||
| 3714 | 1.82 (rms 29-Jan-94): field))))) | ||
| 3715 | 1.243 (rms 19-Jan-98): ((let* ((foo "[^][\000-\037()<>@,;:\\\" ]+") | ||
| 3716 | 1.243 (rms 19-Jan-98): (bar "[^][\000-\037()<>@,;:\\\"]+")) | ||
| 3717 | 1.243 (rms 19-Jan-98): ;; These strings both match all non-ASCII characters. | ||
| 3718 | 1.1 (roland 13-May-91): (or (string-match (concat "\\`[ \t]*\\(" bar | ||
| 3719 | 1.1 (roland 13-May-91): "\\)\\(<" foo "@" foo ">\\)?[ \t]*\\'") | ||
| 3720 | 1.1 (roland 13-May-91): ;; "Unix Loser <Foo@bar.edu>" => "Unix Loser" | ||
| 3721 | 1.1 (roland 13-May-91): from) | ||
| 3722 | 1.1 (roland 13-May-91): (string-match (concat "\\`[ \t]*<" foo "@" foo ">[ \t]*(\\(" | ||
| 3723 | 1.1 (roland 13-May-91): bar "\\))[ \t]*\\'") | ||
| 3724 | 1.1 (roland 13-May-91): ;; "<Bugs@bar.edu>" (Losing Unix) => "Losing Unix" | ||
| 3725 | 1.1 (roland 13-May-91): from))) | ||
| 3726 | 1.1 (roland 13-May-91): (let ((start (match-beginning 1)) | ||
| 3727 | 1.1 (roland 13-May-91): (end (match-end 1))) | ||
| 3728 | 1.1 (roland 13-May-91): ;; Trim whitespace which above regexp match allows | ||
| 3729 | 1.1 (roland 13-May-91): (while (and (< start end) | ||
| 3730 | 1.1 (roland 13-May-91): (memq (aref from start) '(?\t ?\ ))) | ||
| 3731 | 1.1 (roland 13-May-91): (setq start (1+ start))) | ||
| 3732 | 1.1 (roland 13-May-91): (while (and (< start end) | ||
| 3733 | 1.1 (roland 13-May-91): (memq (aref from (1- end)) '(?\t ?\ ))) | ||
| 3734 | 1.1 (roland 13-May-91): (setq end (1- end))) | ||
| 3735 | 1.1 (roland 13-May-91): (let ((field (substring from start end))) | ||
| 3736 | 1.1 (roland 13-May-91): (if date (setq field (concat "message from " field " on " date))) | ||
| 3737 | 1.1 (roland 13-May-91): (if message-id | ||
| 3738 | 1.1 (roland 13-May-91): ;; "<AA259@bar.edu> (message from Unix Loser on 1-Apr-89)" | ||
| 3739 | 1.1 (roland 13-May-91): (concat message-id " (" field ")") | ||
| 3740 | 1.1 (roland 13-May-91): field)))) | ||
| 3741 | 1.1 (roland 13-May-91): (t | ||
| 3742 | 1.1 (roland 13-May-91): ;; If we can't kludge it simply, do it correctly | ||
| 3743 | 1.1 (roland 13-May-91): (let ((mail-use-rfc822 t)) | ||
| 3744 | 1.1 (roland 13-May-91): (rmail-make-in-reply-to-field from date message-id))))) | ||
| 3745 | 1.147 (rms 12-Mar-95): | ||
| 3746 | 1.42 (rms 07-May-93): (defun rmail-forward (resend) | ||
| 3747 | 1.42 (rms 07-May-93): "Forward the current message to another user. | ||
| 3748 | 1.42 (rms 07-May-93): With prefix argument, \"resend\" the message instead of forwarding it; | ||
| 3749 | 1.42 (rms 07-May-93): see the documentation of `rmail-resend'." | ||
| 3750 | 1.42 (rms 07-May-93): (interactive "P") | ||
| 3751 | 1.42 (rms 07-May-93): (if resend | ||
| 3752 | 1.42 (rms 07-May-93): (call-interactively 'rmail-resend) | ||
| 3753 | 1.339 (gerd 08-May-01): (let ((forward-buffer rmail-buffer) | ||
| 3754 | 1.131 (rms 27-Sep-94): (msgnum rmail-current-message) | ||
| 3755 | 1.42 (rms 07-May-93): (subject (concat "[" | ||
| 3756 | 1.42 (rms 07-May-93): (let ((from (or (mail-fetch-field "From") | ||
| 3757 | 1.42 (rms 07-May-93): (mail-fetch-field ">From")))) | ||
| 3758 | 1.42 (rms 07-May-93): (if from | ||
| 3759 | 1.42 (rms 07-May-93): (concat (mail-strip-quoted-names from) ": ") | ||
| 3760 | 1.42 (rms 07-May-93): "")) | ||
| 3761 | 1.42 (rms 07-May-93): (or (mail-fetch-field "Subject") "") | ||
| 3762 | 1.42 (rms 07-May-93): "]"))) | ||
| 3763 | 1.203 (rms 07-Dec-96): (if (rmail-start-mail | ||
| 3764 | 1.203 (rms 07-Dec-96): nil nil subject nil nil nil | ||
| 3765 | 1.217 (rms 26-Apr-97): (list (list 'rmail-mark-message | ||
| 3766 | 1.218 (rms 02-May-97): forward-buffer | ||
| 3767 | 1.339 (gerd 08-May-01): (with-current-buffer rmail-buffer | ||
| 3768 | 1.339 (gerd 08-May-01): (aref rmail-msgref-vector msgnum)) | ||
| 3769 | 1.217 (rms 26-Apr-97): "forwarded")) | ||
| 3770 | 1.203 (rms 07-Dec-96): ;; If only one window, use it for the mail buffer. | ||
| 3771 | 1.203 (rms 07-Dec-96): ;; Otherwise, use another window for the mail buffer | ||
| 3772 | 1.203 (rms 07-Dec-96): ;; so that the Rmail buffer remains visible | ||
| 3773 | 1.203 (rms 07-Dec-96): ;; and sending the mail will get back to it. | ||
| 3774 | 1.203 (rms 07-Dec-96): (and (not rmail-mail-new-frame) (one-window-p t))) | ||
| 3775 | 1.131 (rms 27-Sep-94): ;; The mail buffer is now current. | ||
| 3776 | 1.58 (rms 24-Jul-93): (save-excursion | ||
| 3777 | 1.65 (rms 15-Sep-93): ;; Insert after header separator--before signature if any. | ||
| 3778 | 1.264 (rms 30-Apr-98): (goto-char (mail-text-start)) | ||
| 3779 | 1.350 (zsh 25-Nov-01): (if (or rmail-enable-mime rmail-enable-mime-composing) | ||
| 3780 | 1.339 (gerd 08-May-01): (funcall rmail-insert-mime-forwarded-message-function | ||
| 3781 | 1.339 (gerd 08-May-01): forward-buffer) | ||
| 3782 | 1.339 (gerd 08-May-01): (insert "------- Start of forwarded message -------\n") | ||
| 3783 | 1.339 (gerd 08-May-01): ;; Quote lines with `- ' if they start with `-'. | ||
| 3784 | 1.339 (gerd 08-May-01): (let ((beg (point)) end) | ||
| 3785 | 1.339 (gerd 08-May-01): (setq end (point-marker)) | ||
| 3786 | 1.339 (gerd 08-May-01): (set-marker-insertion-type end t) | ||
| 3787 | 1.339 (gerd 08-May-01): (insert-buffer-substring forward-buffer) | ||
| 3788 | 1.339 (gerd 08-May-01): (goto-char beg) | ||
| 3789 | 1.339 (gerd 08-May-01): (while (re-search-forward "^-" end t) | ||
| 3790 | 1.339 (gerd 08-May-01): (beginning-of-line) | ||
| 3791 | 1.339 (gerd 08-May-01): (insert "- ") | ||
| 3792 | 1.339 (gerd 08-May-01): (forward-line 1)) | ||
| 3793 | 1.339 (gerd 08-May-01): (goto-char end) | ||
| 3794 | 1.339 (gerd 08-May-01): (skip-chars-backward "\n") | ||
| 3795 | 1.339 (gerd 08-May-01): (if (< (point) end) | ||
| 3796 | 1.339 (gerd 08-May-01): (forward-char 1)) | ||
| 3797 | 1.339 (gerd 08-May-01): (delete-region (point) end) | ||
| 3798 | 1.339 (gerd 08-May-01): (set-marker end nil)) | ||
| 3799 | 1.339 (gerd 08-May-01): (insert "------- End of forwarded message -------\n")) | ||
| 3800 | 1.131 (rms 27-Sep-94): (push-mark)))))) | ||
| 3801 | 1.147 (rms 12-Mar-95): | ||
| 3802 | 1.1 (roland 13-May-91): (defun rmail-resend (address &optional from comment mail-alias-file) | ||
| 3803 | 1.1 (roland 13-May-91): "Resend current message to ADDRESSES. | ||
| 3804 | 1.73 (rms 23-Dec-93): ADDRESSES should be a single address, a string consisting of several | ||
| 3805 | 1.1 (roland 13-May-91): addresses separated by commas, or a list of addresses. | ||
| 3806 | 1.1 (roland 13-May-91): | ||
| 3807 | 1.1 (roland 13-May-91): Optional FROM is the address to resend the message from, and | ||
| 3808 | 1.232 (rms 29-Jul-97): defaults from the value of `user-mail-address'. | ||
| 3809 | 1.232 (rms 29-Jul-97): Optional COMMENT is a string to insert as a comment in the resent message. | ||
| 3810 | 1.1 (roland 13-May-91): Optional ALIAS-FILE is alternate aliases file to be used by sendmail, | ||
| 3811 | 1.1 (roland 13-May-91): typically for purposes of moderating a list." | ||
| 3812 | 1.1 (roland 13-May-91): (interactive "sResend to: ") | ||
| 3813 | 1.46 (rms 04-Jun-93): (require 'sendmail) | ||
| 3814 | 1.46 (rms 04-Jun-93): (require 'mailalias) | ||
| 3815 | 1.342 (gerd 31-May-01): (unless (or (eq rmail-view-buffer (current-buffer)) | ||
| 3816 | 1.342 (gerd 31-May-01): (eq rmail-buffer (current-buffer))) | ||
| 3817 | 1.311 (gerd 25-Feb-00): (error "Not an Rmail buffer")) | ||
| 3818 | 1.232 (rms 29-Jul-97): (if (not from) (setq from user-mail-address)) | ||
| 3819 | 1.1 (roland 13-May-91): (let ((tembuf (generate-new-buffer " sendmail temp")) | ||
| 3820 | 1.1 (roland 13-May-91): (case-fold-search nil) | ||
| 3821 | 1.394 (rms 27-Dec-04): (mail-personal-alias-file | ||
| 3822 | 1.394 (rms 27-Dec-04): (or mail-alias-file mail-personal-alias-file)) | ||
| 3823 | 1.288 (kwzh 21-Sep-98): (mailbuf rmail-buffer)) | ||
| 3824 | 1.1 (roland 13-May-91): (unwind-protect | ||
| 3825 | 1.288 (kwzh 21-Sep-98): (with-current-buffer tembuf | ||
| 3826 | 1.1 (roland 13-May-91): ;;>> Copy message into temp buffer | ||
| 3827 | 1.342 (gerd 31-May-01): (if rmail-enable-mime | ||
| 3828 | 1.342 (gerd 31-May-01): (funcall rmail-insert-mime-resent-message-function mailbuf) | ||
| 3829 | 1.342 (gerd 31-May-01): (insert-buffer-substring mailbuf)) | ||
| 3830 | 1.1 (roland 13-May-91): (goto-char (point-min)) | ||
| 3831 | 1.167 (rms 05-Jan-96): ;; Delete any Sender field, since that's not specifiable. | ||
| 3832 | 1.73 (rms 23-Dec-93): ; Only delete Sender fields in the actual header. | ||
| 3833 | 1.73 (rms 23-Dec-93): (re-search-forward "^$" nil 'move) | ||
| 3834 | 1.73 (rms 23-Dec-93): ; Using "while" here rather than "if" because some buggy mail | ||
| 3835 | 1.73 (rms 23-Dec-93): ; software may have inserted multiple Sender fields. | ||
| 3836 | 1.73 (rms 23-Dec-93): (while (re-search-backward "^Sender:" nil t) | ||
| 3837 | 1.73 (rms 23-Dec-93): (let (beg) | ||
| 3838 | 1.73 (rms 23-Dec-93): (setq beg (point)) | ||
| 3839 | 1.73 (rms 23-Dec-93): (forward-line 1) | ||
| 3840 | 1.73 (rms 23-Dec-93): (while (looking-at "[ \t]") | ||
| 3841 | 1.73 (rms 23-Dec-93): (forward-line 1)) | ||
| 3842 | 1.73 (rms 23-Dec-93): (delete-region beg (point)))) | ||
| 3843 | 1.73 (rms 23-Dec-93): ; Go back to the beginning of the buffer so the Resent- fields | ||
| 3844 | 1.73 (rms 23-Dec-93): ; are inserted there. | ||
| 3845 | 1.73 (rms 23-Dec-93): (goto-char (point-min)) | ||
| 3846 | 1.1 (roland 13-May-91): ;;>> Insert resent-from: | ||
| 3847 | 1.1 (roland 13-May-91): (insert "Resent-From: " from "\n") | ||
| 3848 | 1.55 (rms 07-Jul-93): (insert "Resent-Date: " (mail-rfc822-date) "\n") | ||
| 3849 | 1.1 (roland 13-May-91): ;;>> Insert resent-to: and bcc if need be. | ||
| 3850 | 1.1 (roland 13-May-91): (let ((before (point))) | ||
| 3851 | 1.68 (rms 09-Oct-93): (if mail-self-blind | ||
| 3852 | 1.68 (rms 09-Oct-93): (insert "Resent-Bcc: " (user-login-name) "\n")) | ||
| 3853 | 1.1 (roland 13-May-91): (insert "Resent-To: " (if (stringp address) | ||
| 3854 | 1.1 (roland 13-May-91): address | ||
| 3855 | 1.1 (roland 13-May-91): (mapconcat 'identity address ",\n\t")) | ||
| 3856 | 1.1 (roland 13-May-91): "\n") | ||
| 3857 | 1.150 (rms 14-Apr-95): ;; Expand abbrevs in the recipients. | ||
| 3858 | 1.121 (rms 14-Aug-94): (save-excursion | ||
| 3859 | 1.150 (rms 14-Apr-95): (if (featurep 'mailabbrev) | ||
| 3860 | 1.152 (rms 24-Apr-95): (let ((end (point-marker)) | ||
| 3861 | 1.152 (rms 24-Apr-95): (local-abbrev-table mail-abbrevs) | ||
| 3862 | 1.152 (rms 24-Apr-95): (old-syntax-table (syntax-table))) | ||
| 3863 | 1.152 (rms 24-Apr-95): (if (and (not (vectorp mail-abbrevs)) | ||
| 3864 | 1.152 (rms 24-Apr-95): (file-exists-p mail-personal-alias-file)) | ||
| 3865 | 1.152 (rms 24-Apr-95): (build-mail-abbrevs)) | ||
| 3866 | 1.357 (rms 25-Mar-02): (unless mail-abbrev-syntax-table | ||
| 3867 | 1.357 (rms 25-Mar-02): (mail-abbrev-make-syntax-table)) | ||
| 3868 | 1.152 (rms 24-Apr-95): (set-syntax-table mail-abbrev-syntax-table) | ||
| 3869 | 1.152 (rms 24-Apr-95): (goto-char before) | ||
| 3870 | 1.152 (rms 24-Apr-95): (while (and (< (point) end) | ||
| 3871 | 1.152 (rms 24-Apr-95): (progn (forward-word 1) | ||
| 3872 | 1.152 (rms 24-Apr-95): (<= (point) end))) | ||
| 3873 | 1.152 (rms 24-Apr-95): (expand-abbrev)) | ||
| 3874 | 1.152 (rms 24-Apr-95): (set-syntax-table old-syntax-table)) | ||
| 3875 | 1.150 (rms 14-Apr-95): (expand-mail-aliases before (point))))) | ||
| 3876 | 1.1 (roland 13-May-91): ;;>> Set up comment, if any. | ||
| 3877 | 1.1 (roland 13-May-91): (if (and (sequencep comment) (not (zerop (length comment)))) | ||
| 3878 | 1.1 (roland 13-May-91): (let ((before (point)) | ||
| 3879 | 1.1 (roland 13-May-91): after) | ||
| 3880 | 1.1 (roland 13-May-91): (insert comment) | ||
| 3881 | 1.1 (roland 13-May-91): (or (eolp) (insert "\n")) | ||
| 3882 | 1.1 (roland 13-May-91): (setq after (point)) | ||
| 3883 | 1.1 (roland 13-May-91): (goto-char before) | ||
| 3884 | 1.1 (roland 13-May-91): (while (< (point) after) | ||
| 3885 | 1.1 (roland 13-May-91): (insert "Resent-Comment: ") | ||
| 3886 | 1.1 (roland 13-May-91): (forward-line 1)))) | ||
| 3887 | 1.1 (roland 13-May-91): ;; Don't expand aliases in the destination fields | ||
| 3888 | 1.1 (roland 13-May-91): ;; of the original message. | ||
| 3889 | 1.1 (roland 13-May-91): (let (mail-aliases) | ||
| 3890 | 1.78 (rms 06-Jan-94): (funcall send-mail-function))) | ||
| 3891 | 1.42 (rms 07-May-93): (kill-buffer tembuf)) | ||
| 3892 | 1.288 (kwzh 21-Sep-98): (with-current-buffer rmail-buffer | ||
| 3893 | 1.288 (kwzh 21-Sep-98): (rmail-set-attribute "resent" t rmail-current-message)))) | ||
| 3894 | 1.147 (rms 12-Mar-95): | ||
| 3895 | 1.29 (rms 29-Sep-92): (defvar mail-unsent-separator | ||
| 3896 | 1.32 (rms 09-Oct-92): (concat "^ *---+ +Unsent message follows +---+ *$\\|" | ||
| 3897 | 1.32 (rms 09-Oct-92): "^ *---+ +Returned message +---+ *$\\|" | ||
| 3898 | 1.269 (rms 20-May-98): "^ *---+ *Returned mail follows *---+ *$\\|" | ||
| 3899 | 1.146 (rms 24-Feb-95): "^Start of returned message$\\|" | ||
| 3900 | 1.279 (rms 25-Jun-98): "^---+ Below this line is a copy of the message.$\\|" | ||
| 3901 | 1.33 (rms 09-Oct-92): "^ *---+ +Original message +---+ *$\\|" | ||
| 3902 | 1.37 (rms 09-Jan-93): "^ *--+ +begin message +--+ *$\\|" | ||
| 3903 | 1.68 (rms 09-Oct-93): "^ *---+ +Original message follows +---+ *$\\|" | ||
| 3904 | 1.250 (kwzh 25-Feb-98): "^ *---+ +Your message follows +---+ *$\\|" | ||
| 3905 | 1.305 (rms 07-Jul-99): "^|? *---+ +Message text follows: +---+ *|?$\\|" | ||
| 3906 | 1.319 (gerd 06-Jul-00): "^ *---+ +This is a copy of \\w+ message, including all the headers.*---+ *$") | ||
| 3907 | 1.122 (rms 19-Aug-94): "A regexp that matches the separator before the text of a failed message.") | ||
| 3908 | 1.1 (roland 13-May-91): | ||
| 3909 | 1.214 (rms 20-Mar-97): (defvar mail-mime-unsent-header "^Content-Type: message/rfc822 *$" | ||
| 3910 | 1.214 (rms 20-Mar-97): "A regexp that matches the header of a MIME body part with a failed message.") | ||
| 3911 | 1.214 (rms 20-Mar-97): | ||
| 3912 | 1.1 (roland 13-May-91): (defun rmail-retry-failure () | ||
| 3913 | 1.1 (roland 13-May-91): "Edit a mail message which is based on the contents of the current message. | ||
| 3914 | 1.1 (roland 13-May-91): For a message rejected by the mail system, extract the interesting headers and | ||
| 3915 | 1.122 (rms 19-Aug-94): the body of the original message. | ||
| 3916 | 1.214 (rms 20-Mar-97): If the failed message is a MIME multipart message, it is searched for a | ||
| 3917 | 1.214 (rms 20-Mar-97): body part with a header which matches the variable `mail-mime-unsent-header'. | ||
| 3918 | 1.214 (rms 20-Mar-97): Otherwise, the variable `mail-unsent-separator' should match the string that | ||
| 3919 | 1.128 (rms 23-Sep-94): delimits the returned original message. | ||
| 3920 | 1.128 (rms 23-Sep-94): The variable `rmail-retry-ignored-headers' is a regular expression | ||
| 3921 | 1.128 (rms 23-Sep-94): specifying headers which should not be copied into the new message." | ||
| 3922 | 1.1 (roland 13-May-91): (interactive) | ||
| 3923 | 1.1 (roland 13-May-91): (require 'mail-utils) | ||
| 3924 | 1.223 (rms 15-May-97): (let ((rmail-this-buffer (current-buffer)) | ||
| 3925 | 1.164 (kwzh 21-Dec-95): (msgnum rmail-current-message) | ||
| 3926 | 1.344 (rms 29-Jun-01): bounce-start bounce-end bounce-indent resending | ||
| 3927 | 1.344 (rms 29-Jun-01): ;; Fetch any content-type header in current message | ||
| 3928 | 1.344 (rms 29-Jun-01): ;; Must search thru the whole unpruned header. | ||
| 3929 | 1.344 (rms 29-Jun-01): (content-type | ||
| 3930 | 1.344 (rms 29-Jun-01): (save-excursion | ||
| 3931 | 1.344 (rms 29-Jun-01): (save-restriction | ||
| 3932 | 1.344 (rms 29-Jun-01): (rmail-narrow-to-non-pruned-header) | ||
| 3933 | 1.344 (rms 29-Jun-01): (mail-fetch-field "Content-Type") )))) | ||
| 3934 | 1.344 (rms 29-Jun-01): (save-excursion | ||
| 3935 | 1.344 (rms 29-Jun-01): (goto-char (point-min)) | ||
| 3936 | 1.344 (rms 29-Jun-01): (let ((case-fold-search t)) | ||
| 3937 | 1.358 (pot 06-May-02): (if (and content-type | ||
| 3938 | 1.358 (pot 06-May-02): (string-match | ||
| 3939 | 1.358 (pot 06-May-02): ";[\n\t ]*boundary=\"?\\([-0-9a-z'()+_,./:=? ]+\\)\"?" | ||
| 3940 | 1.344 (rms 29-Jun-01): content-type)) | ||
| 3941 | 1.344 (rms 29-Jun-01): ;; Handle a MIME multipart bounce message. | ||
| 3942 | 1.344 (rms 29-Jun-01): (let ((codestring | ||
| 3943 | 1.344 (rms 29-Jun-01): (concat "\n--" | ||
| 3944 | 1.358 (pot 06-May-02): (substring content-type (match-beginning 1) | ||
| 3945 | 1.344 (rms 29-Jun-01): (match-end 1))))) | ||
| 3946 | 1.344 (rms 29-Jun-01): (unless (re-search-forward mail-mime-unsent-header nil t) | ||
| 3947 | 1.344 (rms 29-Jun-01): (error "Cannot find beginning of header in failed message")) | ||
| 3948 | 1.344 (rms 29-Jun-01): (unless (search-forward "\n\n" nil t) | ||
| 3949 | 1.344 (rms 29-Jun-01): (error "Cannot find start of Mime data in failed message")) | ||
| 3950 | 1.344 (rms 29-Jun-01): (setq bounce-start (point)) | ||
| 3951 | 1.344 (rms 29-Jun-01): (if (search-forward codestring nil t) | ||
| 3952 | 1.344 (rms 29-Jun-01): (setq bounce-end (match-beginning 0)) | ||
| 3953 | 1.344 (rms 29-Jun-01): (setq bounce-end (point-max)))) | ||
| 3954 | 1.344 (rms 29-Jun-01): ;; Non-MIME bounce. | ||
| 3955 | 1.344 (rms 29-Jun-01): (or (re-search-forward mail-unsent-separator nil t) | ||
| 3956 | 1.344 (rms 29-Jun-01): (error "Cannot parse this as a failure message")) | ||
| 3957 | 1.344 (rms 29-Jun-01): (skip-chars-forward "\n") | ||
| 3958 | 1.344 (rms 29-Jun-01): ;; Support a style of failure message in which the original | ||
| 3959 | 1.344 (rms 29-Jun-01): ;; message is indented, and included within lines saying | ||
| 3960 | 1.344 (rms 29-Jun-01): ;; `Start of returned message' and `End of returned message'. | ||
| 3961 | 1.344 (rms 29-Jun-01): (if (looking-at " +Received:") | ||
| 3962 | 1.344 (rms 29-Jun-01): (progn | ||
| 3963 | 1.344 (rms 29-Jun-01): (setq bounce-start (point)) | ||
| 3964 | 1.344 (rms 29-Jun-01): (skip-chars-forward " ") | ||
| 3965 | 1.344 (rms 29-Jun-01): (setq bounce-indent (- (current-column))) | ||
| 3966 | 1.344 (rms 29-Jun-01): (goto-char (point-max)) | ||
| 3967 | 1.344 (rms 29-Jun-01): (re-search-backward "^End of returned message$" nil t) | ||
| 3968 | 1.344 (rms 29-Jun-01): (setq bounce-end (point))) | ||
| 3969 | 1.344 (rms 29-Jun-01): ;; One message contained a few random lines before | ||
| 3970 | 1.344 (rms 29-Jun-01): ;; the old message header. The first line of the | ||
| 3971 | 1.344 (rms 29-Jun-01): ;; message started with two hyphens. A blank line | ||
| 3972 | 1.344 (rms 29-Jun-01): ;; followed these random lines. The same line | ||
| 3973 | 1.344 (rms 29-Jun-01): ;; beginning with two hyphens was possibly marking | ||
| 3974 | 1.344 (rms 29-Jun-01): ;; the end of the message. | ||
| 3975 | 1.344 (rms 29-Jun-01): (if (looking-at "^--") | ||
| 3976 | 1.344 (rms 29-Jun-01): (let ((boundary (buffer-substring-no-properties | ||
| 3977 | 1.344 (rms 29-Jun-01): (point) | ||
| 3978 | 1.344 (rms 29-Jun-01): (progn (end-of-line) (point))))) | ||
| 3979 | 1.344 (rms 29-Jun-01): (search-forward "\n\n") | ||
| 3980 | 1.344 (rms 29-Jun-01): (skip-chars-forward "\n") | ||
| 3981 | 1.344 (rms 29-Jun-01): (setq bounce-start (point)) | ||
| 3982 | 1.344 (rms 29-Jun-01): (goto-char (point-max)) | ||
| 3983 | 1.344 (rms 29-Jun-01): (search-backward (concat "\n\n" boundary) bounce-start t) | ||
| 3984 | 1.344 (rms 29-Jun-01): (setq bounce-end (point))) | ||
| 3985 | 1.344 (rms 29-Jun-01): (setq bounce-start (point) | ||
| 3986 | 1.344 (rms 29-Jun-01): bounce-end (point-max))) | ||
| 3987 | 1.344 (rms 29-Jun-01): (unless (search-forward "\n\n" nil t) | ||
| 3988 | 1.344 (rms 29-Jun-01): (error "Cannot find end of header in failed message")))))) | ||
| 3989 | 1.344 (rms 29-Jun-01): ;; We have found the message that bounced, within the current message. | ||
| 3990 | 1.344 (rms 29-Jun-01): ;; Now start sending new message; default header fields from original. | ||
| 3991 | 1.344 (rms 29-Jun-01): ;; Turn off the usual actions for initializing the message body | ||
| 3992 | 1.344 (rms 29-Jun-01): ;; because we want to get only the text from the failure message. | ||
| 3993 | 1.344 (rms 29-Jun-01): (let (mail-signature mail-setup-hook) | ||
| 3994 | 1.344 (rms 29-Jun-01): (if (rmail-start-mail nil nil nil nil nil rmail-this-buffer | ||
| 3995 | 1.344 (rms 29-Jun-01): (list (list 'rmail-mark-message | ||
| 3996 | 1.344 (rms 29-Jun-01): rmail-this-buffer | ||
| 3997 | 1.344 (rms 29-Jun-01): (aref rmail-msgref-vector msgnum) | ||
| 3998 | 1.344 (rms 29-Jun-01): "retried"))) | ||
| 3999 | 1.344 (rms 29-Jun-01): ;; Insert original text as initial text of new draft message. | ||
| 4000 | 1.344 (rms 29-Jun-01): ;; Bind inhibit-read-only since the header delimiter | ||
| 4001 | 1.344 (rms 29-Jun-01): ;; of the previous message was probably read-only. | ||
| 4002 | 1.344 (rms 29-Jun-01): (let ((inhibit-read-only t) | ||
| 4003 | 1.344 (rms 29-Jun-01): rmail-displayed-headers | ||
| 4004 | 1.344 (rms 29-Jun-01): rmail-ignored-headers) | ||
| 4005 | 1.344 (rms 29-Jun-01): (erase-buffer) | ||
| 4006 | 1.344 (rms 29-Jun-01): (insert-buffer-substring rmail-this-buffer | ||
| 4007 | 1.344 (rms 29-Jun-01): bounce-start bounce-end) | ||
| 4008 | 1.344 (rms 29-Jun-01): (goto-char (point-min)) | ||
| 4009 | 1.344 (rms 29-Jun-01): (if bounce-indent | ||
| 4010 | 1.344 (rms 29-Jun-01): (indent-rigidly (point-min) (point-max) bounce-indent)) | ||
| 4011 | 1.344 (rms 29-Jun-01): (rmail-clear-headers rmail-retry-ignored-headers) | ||
| 4012 | 1.344 (rms 29-Jun-01): (rmail-clear-headers "^sender:\\|^return-path:\\|^received:") | ||
| 4013 | 1.344 (rms 29-Jun-01): (mail-sendmail-delimit-header) | ||
| 4014 | 1.344 (rms 29-Jun-01): (save-restriction | ||
| 4015 | 1.344 (rms 29-Jun-01): (narrow-to-region (point-min) (mail-header-end)) | ||
| 4016 | 1.344 (rms 29-Jun-01): (setq resending (mail-fetch-field "resent-to")) | ||
| 4017 | 1.344 (rms 29-Jun-01): (if mail-self-blind | ||
| 4018 | 1.344 (rms 29-Jun-01): (if resending | ||
| 4019 | 1.344 (rms 29-Jun-01): (insert "Resent-Bcc: " (user-login-name) "\n") | ||
| 4020 | 1.344 (rms 29-Jun-01): (insert "BCC: " (user-login-name) "\n")))) | ||
| 4021 | 1.344 (rms 29-Jun-01): (goto-char (point-min)) | ||
| 4022 | 1.344 (rms 29-Jun-01): (mail-position-on-field (if resending "Resent-To" "To") t)))))) | ||
| 4023 | 1.147 (rms 12-Mar-95): | ||
| 4024 | 1.39 (rms 09-Mar-93): (defun rmail-summary-exists () | ||
| 4025 | 1.437 (miles 13-Aug-07): "Non-nil if in an RMAIL buffer and an associated summary buffer exists. | ||
| 4026 | 1.91 (rms 18-Mar-94): In fact, the non-nil value returned is the summary buffer itself." | ||
| 4027 | 1.39 (rms 09-Mar-93): (and rmail-summary-buffer (buffer-name rmail-summary-buffer) | ||
| 4028 | 1.39 (rms 09-Mar-93): rmail-summary-buffer)) | ||
| 4029 | 1.39 (rms 09-Mar-93): | ||
| 4030 | 1.39 (rms 09-Mar-93): (defun rmail-summary-displayed () | ||
| 4031 | 1.437 (miles 13-Aug-07): "t if in RMAIL buffer and an associated summary buffer is displayed." | ||
| 4032 | 1.39 (rms 09-Mar-93): (and rmail-summary-buffer (get-buffer-window rmail-summary-buffer))) | ||
| 4033 | 1.39 (rms 09-Mar-93): | ||
| 4034 | 1.219 (rms 03-May-97): (defcustom rmail-redisplay-summary nil | ||
| 4035 | 1.39 (rms 09-Mar-93): "*Non-nil means Rmail should show the summary when it changes. | ||
| 4036 | 1.219 (rms 03-May-97): This has an effect only if a summary buffer exists." | ||
| 4037 | 1.219 (rms 03-May-97): :type 'boolean | ||
| 4038 | 1.219 (rms 03-May-97): :group 'rmail-summary) | ||
| 4039 | 1.219 (rms 03-May-97): | ||
| 4040 | 1.219 (rms 03-May-97): (defcustom rmail-summary-window-size nil | ||
| 4041 | 1.219 (rms 03-May-97): "*Non-nil means specify the height for an Rmail summary window." | ||
| 4042 | 1.238 (kwzh 15-Nov-97): :type '(choice (const :tag "Disabled" nil) integer) | ||
| 4043 | 1.219 (rms 03-May-97): :group 'rmail-summary) | ||
| 4044 | 1.91 (rms 18-Mar-94): | ||
| 4045 | 1.39 (rms 09-Mar-93): ;; Put the summary buffer back on the screen, if user wants that. | ||
| 4046 | 1.39 (rms 09-Mar-93): (defun rmail-maybe-display-summary () | ||
| 4047 | 1.91 (rms 18-Mar-94): (let ((selected (selected-window)) | ||
| 4048 | 1.91 (rms 18-Mar-94): window) | ||
| 4049 | 1.91 (rms 18-Mar-94): ;; If requested, make sure the summary is displayed. | ||
| 4050 | 1.91 (rms 18-Mar-94): (and rmail-summary-buffer (buffer-name rmail-summary-buffer) | ||
| 4051 | 1.91 (rms 18-Mar-94): rmail-redisplay-summary | ||
| 4052 | 1.120 (rms 13-Aug-94): (if (get-buffer-window rmail-summary-buffer 0) | ||
| 4053 | 1.120 (rms 13-Aug-94): ;; It's already in some frame; show that one. | ||
| 4054 | 1.120 (rms 13-Aug-94): (let ((frame (window-frame | ||
| 4055 | 1.120 (rms 13-Aug-94): (get-buffer-window rmail-summary-buffer 0)))) | ||
| 4056 | 1.120 (rms 13-Aug-94): (make-frame-visible frame) | ||
| 4057 | 1.120 (rms 13-Aug-94): (raise-frame frame)) | ||
| 4058 | 1.120 (rms 13-Aug-94): (display-buffer rmail-summary-buffer))) | ||
| 4059 | 1.91 (rms 18-Mar-94): ;; If requested, set the height of the summary window. | ||
| 4060 | 1.91 (rms 18-Mar-94): (and rmail-summary-buffer (buffer-name rmail-summary-buffer) | ||
| 4061 | 1.91 (rms 18-Mar-94): rmail-summary-window-size | ||
| 4062 | 1.91 (rms 18-Mar-94): (setq window (get-buffer-window rmail-summary-buffer)) | ||
| 4063 | 1.120 (rms 13-Aug-94): ;; Don't try to change the size if just one window in frame. | ||
| 4064 | 1.120 (rms 13-Aug-94): (not (eq window (frame-root-window (window-frame window)))) | ||
| 4065 | 1.358 (pot 06-May-02): (unwind-protect | ||
| 4066 | 1.91 (rms 18-Mar-94): (progn | ||
| 4067 | 1.91 (rms 18-Mar-94): (select-window window) | ||
| 4068 | 1.180 (simon 07-Mar-96): (enlarge-window (- rmail-summary-window-size (window-height)))) | ||
| 4069 | 1.91 (rms 18-Mar-94): (select-window selected))))) | ||
| 4070 | 1.171 (simon 26-Jan-96): | ||
| 4071 | 1.171 (simon 26-Jan-96): ;;;; *** Rmail Local Fontification *** | ||
| 4072 | 1.171 (simon 26-Jan-96): | ||
| 4073 | 1.171 (simon 26-Jan-96): (defun rmail-fontify-buffer-function () | ||
| 4074 | 1.171 (simon 26-Jan-96): ;; This function's symbol is bound to font-lock-fontify-buffer-function. | ||
| 4075 | 1.172 (simon 02-Feb-96): (add-hook 'rmail-show-message-hook 'rmail-fontify-message nil t) | ||
| 4076 | 1.180 (simon 07-Mar-96): ;; If we're already showing a message, fontify it now. | ||
| 4077 | 1.180 (simon 07-Mar-96): (if rmail-current-message (rmail-fontify-message)) | ||
| 4078 | 1.180 (simon 07-Mar-96): ;; Prevent Font Lock mode from kicking in. | ||
| 4079 | 1.172 (simon 02-Feb-96): (setq font-lock-fontified t)) | ||
| 4080 | 1.171 (simon 26-Jan-96): | ||
| 4081 | 1.171 (simon 26-Jan-96): (defun rmail-unfontify-buffer-function () | ||
| 4082 | 1.171 (simon 26-Jan-96): ;; This function's symbol is bound to font-lock-fontify-unbuffer-function. | ||
| 4083 | 1.172 (simon 02-Feb-96): (let ((modified (buffer-modified-p)) | ||
| 4084 | 1.172 (simon 02-Feb-96): (buffer-undo-list t) (inhibit-read-only t) | ||
| 4085 | 1.172 (simon 02-Feb-96): before-change-functions after-change-functions | ||
| 4086 | 1.172 (simon 02-Feb-96): buffer-file-name buffer-file-truename) | ||
| 4087 | 1.172 (simon 02-Feb-96): (save-restriction | ||
| 4088 | 1.172 (simon 02-Feb-96): (widen) | ||
| 4089 | 1.172 (simon 02-Feb-96): (remove-hook 'rmail-show-message-hook 'rmail-fontify-message t) | ||
| 4090 | 1.172 (simon 02-Feb-96): (remove-text-properties (point-min) (point-max) '(rmail-fontified nil)) | ||
| 4091 | 1.181 (rms 27-Mar-96): (font-lock-default-unfontify-buffer) | ||
| 4092 | 1.181 (rms 27-Mar-96): (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil))))) | ||
| 4093 | 1.171 (simon 26-Jan-96): | ||
| 4094 | 1.171 (simon 26-Jan-96): (defun rmail-fontify-message () | ||
| 4095 | 1.171 (simon 26-Jan-96): ;; Fontify the current message if it is not already fontified. | ||
| 4096 | 1.171 (simon 26-Jan-96): (if (text-property-any (point-min) (point-max) 'rmail-fontified nil) | ||
| 4097 | 1.171 (simon 26-Jan-96): (let ((modified (buffer-modified-p)) | ||
| 4098 | 1.171 (simon 26-Jan-96): (buffer-undo-list t) (inhibit-read-only t) | ||
| 4099 | 1.171 (simon 26-Jan-96): before-change-functions after-change-functions | ||
| 4100 | 1.171 (simon 26-Jan-96): buffer-file-name buffer-file-truename) | ||
| 4101 | 1.171 (simon 26-Jan-96): (save-excursion | ||
| 4102 | 1.171 (simon 26-Jan-96): (save-match-data | ||
| 4103 | 1.171 (simon 26-Jan-96): (add-text-properties (point-min) (point-max) '(rmail-fontified t)) | ||
| 4104 | 1.181 (rms 27-Mar-96): (font-lock-fontify-region (point-min) (point-max)) | ||
| 4105 | 1.181 (rms 27-Mar-96): (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil))))))) | ||
| 4106 | 1.281 (kwzh 10-Jul-98): | ||
| 4107 | 1.281 (kwzh 10-Jul-98): ;;; Speedbar support for RMAIL files. | ||
| 4108 | 1.281 (kwzh 10-Jul-98): (eval-when-compile (require 'speedbar)) | ||
| 4109 | 1.179 (rms 04-Mar-96): | ||
| 4110 | 1.281 (kwzh 10-Jul-98): (defvar rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$" | ||
| 4111 | 1.363 (jpw 24-Aug-02): "*This regex is used to match folder names to be displayed in speedbar. | ||
| 4112 | 1.281 (kwzh 10-Jul-98): Enabling this will permit speedbar to display your folders for easy | ||
| 4113 | 1.281 (kwzh 10-Jul-98): browsing, and moving of messages.") | ||
| 4114 | 1.244 (zappo 23-Jan-98): | ||
| 4115 | 1.244 (zappo 23-Jan-98): (defvar rmail-speedbar-last-user nil | ||
| 4116 | 1.244 (zappo 23-Jan-98): "The last user to be displayed in the speedbar.") | ||
| 4117 | 1.244 (zappo 23-Jan-98): | ||
| 4118 | 1.281 (kwzh 10-Jul-98): (defvar rmail-speedbar-key-map nil | ||
| 4119 | 1.281 (kwzh 10-Jul-98): "Keymap used when in rmail display mode.") | ||
| 4120 | 1.281 (kwzh 10-Jul-98): | ||
| 4121 | 1.281 (kwzh 10-Jul-98): (defun rmail-install-speedbar-variables () | ||
| 4122 | 1.281 (kwzh 10-Jul-98): "Install those variables used by speedbar to enhance rmail." | ||
| 4123 | 1.281 (kwzh 10-Jul-98): (if rmail-speedbar-key-map | ||
| 4124 | 1.281 (kwzh 10-Jul-98): nil | ||
| 4125 | 1.281 (kwzh 10-Jul-98): (setq rmail-speedbar-key-map (speedbar-make-specialized-keymap)) | ||
| 4126 | 1.281 (kwzh 10-Jul-98): | ||
| 4127 | 1.281 (kwzh 10-Jul-98): (define-key rmail-speedbar-key-map "e" 'speedbar-edit-line) | ||
| 4128 | 1.281 (kwzh 10-Jul-98): (define-key rmail-speedbar-key-map "r" 'speedbar-edit-line) | ||
| 4129 | 1.281 (kwzh 10-Jul-98): (define-key rmail-speedbar-key-map "\C-m" 'speedbar-edit-line) | ||
| 4130 | 1.281 (kwzh 10-Jul-98): (define-key rmail-speedbar-key-map "M" | ||
| 4131 | 1.281 (kwzh 10-Jul-98): 'rmail-speedbar-move-message-to-folder-on-line))) | ||
| 4132 | 1.281 (kwzh 10-Jul-98): | ||
| 4133 | 1.244 (zappo 23-Jan-98): (defvar rmail-speedbar-menu-items | ||
| 4134 | 1.281 (kwzh 10-Jul-98): '(["Read Folder" speedbar-edit-line t] | ||
| 4135 | 1.281 (kwzh 10-Jul-98): ["Move message to folder" rmail-speedbar-move-message-to-folder-on-line | ||
| 4136 | 1.244 (zappo 23-Jan-98): (save-excursion (beginning-of-line) | ||
| 4137 | 1.244 (zappo 23-Jan-98): (looking-at "<M> "))]) | ||
| 4138 | 1.244 (zappo 23-Jan-98): "Additional menu-items to add to speedbar frame.") | ||
| 4139 | 1.244 (zappo 23-Jan-98): | ||
| 4140 | 1.281 (kwzh 10-Jul-98): ;; Make sure our special speedbar major mode is loaded | ||
| 4141 | 1.281 (kwzh 10-Jul-98): (if (featurep 'speedbar) | ||
| 4142 | 1.281 (kwzh 10-Jul-98): (rmail-install-speedbar-variables) | ||
| 4143 | 1.281 (kwzh 10-Jul-98): (add-hook 'speedbar-load-hook 'rmail-install-speedbar-variables)) | ||
| 4144 | 1.281 (kwzh 10-Jul-98): | ||
| 4145 | 1.244 (zappo 23-Jan-98): (defun rmail-speedbar-buttons (buffer) | ||
| 4146 | 1.244 (zappo 23-Jan-98): "Create buttons for BUFFER containing rmail messages. | ||
| 4147 | 1.244 (zappo 23-Jan-98): Click on the address under Reply to: to reply to this person. | ||
| 4148 | 1.244 (zappo 23-Jan-98): Under Folders: Click a name to read it, or on the <M> to move the | ||
| 4149 | 1.244 (zappo 23-Jan-98): current message into that RMAIL folder." | ||
| 4150 | 1.244 (zappo 23-Jan-98): (let ((from nil)) | ||
| 4151 | 1.244 (zappo 23-Jan-98): (save-excursion | ||
| 4152 | 1.244 (zappo 23-Jan-98): (set-buffer buffer) | ||
| 4153 | 1.244 (zappo 23-Jan-98): (goto-char (point-min)) | ||
| 4154 | 1.244 (zappo 23-Jan-98): (if (not (re-search-forward "^Reply-To: " nil t)) | ||
| 4155 | 1.244 (zappo 23-Jan-98): (if (not (re-search-forward "^From:? " nil t)) | ||
| 4156 | 1.244 (zappo 23-Jan-98): (setq from t))) | ||
| 4157 | 1.244 (zappo 23-Jan-98): (if from | ||
| 4158 | 1.244 (zappo 23-Jan-98): nil | ||
| 4159 | 1.244 (zappo 23-Jan-98): (setq from (buffer-substring (point) (save-excursion | ||
| 4160 | 1.244 (zappo 23-Jan-98): (end-of-line) | ||
| 4161 | 1.244 (zappo 23-Jan-98): (point)))))) | ||
| 4162 | 1.244 (zappo 23-Jan-98): (goto-char (point-min)) | ||
| 4163 | 1.244 (zappo 23-Jan-98): (if (and (looking-at "Reply to:") | ||
| 4164 | 1.244 (zappo 23-Jan-98): (equal from rmail-speedbar-last-user)) | ||
| 4165 | 1.244 (zappo 23-Jan-98): nil | ||
| 4166 | 1.244 (zappo 23-Jan-98): (setq rmail-speedbar-last-user from) | ||
| 4167 | 1.244 (zappo 23-Jan-98): (erase-buffer) | ||
| 4168 | 1.244 (zappo 23-Jan-98): (insert "Reply To:\n") | ||
| 4169 | 1.244 (zappo 23-Jan-98): (if (stringp from) | ||
| 4170 | 1.244 (zappo 23-Jan-98): (speedbar-insert-button from 'speedbar-directory-face 'highlight | ||
| 4171 | 1.244 (zappo 23-Jan-98): 'rmail-speedbar-button 'rmail-reply)) | ||
| 4172 | 1.244 (zappo 23-Jan-98): (insert "Folders:\n") | ||
| 4173 | 1.244 (zappo 23-Jan-98): (let* ((case-fold-search nil) | ||
| 4174 | 1.244 (zappo 23-Jan-98): (df (directory-files (save-excursion (set-buffer buffer) | ||
| 4175 | 1.244 (zappo 23-Jan-98): default-directory) | ||
| 4176 | 1.281 (kwzh 10-Jul-98): nil rmail-speedbar-match-folder-regexp))) | ||
| 4177 | 1.244 (zappo 23-Jan-98): (while df | ||
| 4178 | 1.244 (zappo 23-Jan-98): (speedbar-insert-button "<M>" 'speedbar-button-face 'highlight | ||
| 4179 | 1.244 (zappo 23-Jan-98): 'rmail-speedbar-move-message (car df)) | ||
| 4180 | 1.244 (zappo 23-Jan-98): (speedbar-insert-button (car df) 'speedbar-file-face 'highlight | ||
| 4181 | 1.244 (zappo 23-Jan-98): 'rmail-speedbar-find-file nil t) | ||
| 4182 | 1.244 (zappo 23-Jan-98): (setq df (cdr df))))))) | ||
| 4183 | 1.244 (zappo 23-Jan-98): | ||
| 4184 | 1.244 (zappo 23-Jan-98): (defun rmail-speedbar-button (text token indent) | ||
| 4185 | 1.244 (zappo 23-Jan-98): "Execute an rmail command specified by TEXT. | ||
| 4186 | 1.244 (zappo 23-Jan-98): The command used is TOKEN. INDENT is not used." | ||
| 4187 | 1.244 (zappo 23-Jan-98): (speedbar-with-attached-buffer | ||
| 4188 | 1.244 (zappo 23-Jan-98): (funcall token t))) | ||
| 4189 | 1.244 (zappo 23-Jan-98): | ||
| 4190 | 1.244 (zappo 23-Jan-98): (defun rmail-speedbar-find-file (text token indent) | ||
| 4191 | 1.244 (zappo 23-Jan-98): "Load in the rmail file TEXT. | ||
| 4192 | 1.244 (zappo 23-Jan-98): TOKEN and INDENT are not used." | ||
| 4193 | 1.244 (zappo 23-Jan-98): (speedbar-with-attached-buffer | ||
| 4194 | 1.244 (zappo 23-Jan-98): (message "Loading in RMAIL file %s..." text) | ||
| 4195 | 1.244 (zappo 23-Jan-98): (find-file text))) | ||
| 4196 | 1.244 (zappo 23-Jan-98): | ||
| 4197 | 1.281 (kwzh 10-Jul-98): (defun rmail-speedbar-move-message-to-folder-on-line () | ||
| 4198 | 1.244 (zappo 23-Jan-98): "If the current line is a folder, move current message to it." | ||
| 4199 | 1.244 (zappo 23-Jan-98): (interactive) | ||
| 4200 | 1.244 (zappo 23-Jan-98): (save-excursion | ||
| 4201 | 1.244 (zappo 23-Jan-98): (beginning-of-line) | ||
| 4202 | 1.244 (zappo 23-Jan-98): (if (re-search-forward "<M> " (save-excursion (end-of-line) (point)) t) | ||
| 4203 | 1.244 (zappo 23-Jan-98): (progn | ||
| 4204 | 1.244 (zappo 23-Jan-98): (forward-char -2) | ||
| 4205 | 1.244 (zappo 23-Jan-98): (speedbar-do-function-pointer))))) | ||
| 4206 | 1.244 (zappo 23-Jan-98): | ||
| 4207 | 1.244 (zappo 23-Jan-98): (defun rmail-speedbar-move-message (text token indent) | ||
| 4208 | 1.244 (zappo 23-Jan-98): "From button TEXT, copy current message to the rmail file specified by TOKEN. | ||
| 4209 | 1.244 (zappo 23-Jan-98): TEXT and INDENT are not used." | ||
| 4210 | 1.244 (zappo 23-Jan-98): (speedbar-with-attached-buffer | ||
| 4211 | 1.244 (zappo 23-Jan-98): (message "Moving message to %s" token) | ||
| 4212 | 1.244 (zappo 23-Jan-98): (rmail-output-to-rmail-file token))) | ||
| 4213 | 1.244 (zappo 23-Jan-98): | ||
| 4214 | 1.282 (rms 27-Jul-98): ; Functions for setting, getting and encoding the POP password. | ||
| 4215 | 1.282 (rms 27-Jul-98): ; The password is encoded to prevent it from being easily accessible | ||
| 4216 | 1.282 (rms 27-Jul-98): ; to "prying eyes." Obviously, this encoding isn't "real security," | ||
| 4217 | 1.282 (rms 27-Jul-98): ; nor is it meant to be. | ||
| 4218 | 1.282 (rms 27-Jul-98): | ||
| 4219 | 1.282 (rms 27-Jul-98): ;;;###autoload | ||
| 4220 | 1.395 (eliz 15-Jan-05): (defun rmail-set-remote-password (password) | ||
| 4221 | 1.395 (eliz 15-Jan-05): "Set PASSWORD to be used for retrieving mail from a POP or IMAP server." | ||
| 4222 | 1.282 (rms 27-Jul-98): (interactive "sPassword: ") | ||
| 4223 | 1.282 (rms 27-Jul-98): (if password | ||
| 4224 | 1.395 (eliz 15-Jan-05): (setq rmail-encoded-remote-password | ||
| 4225 | 1.282 (rms 27-Jul-98): (rmail-encode-string password (emacs-pid))) | ||
| 4226 | 1.395 (eliz 15-Jan-05): (setq rmail-remote-password nil) | ||
| 4227 | 1.395 (eliz 15-Jan-05): (setq rmail-encoded-remote-password nil))) | ||
| 4228 | 1.282 (rms 27-Jul-98): | ||
| 4229 | 1.395 (eliz 15-Jan-05): (defun rmail-get-remote-password (imap) | ||
| 4230 | 1.395 (eliz 15-Jan-05): "Get the password for retrieving mail from a POP or IMAP server. If none | ||
| 4231 | 1.282 (rms 27-Jul-98): has been set, then prompt the user for one." | ||
| 4232 | 1.395 (eliz 15-Jan-05): (when (not rmail-encoded-remote-password) | ||
| 4233 | 1.395 (eliz 15-Jan-05): (if (not rmail-remote-password) | ||
| 4234 | 1.395 (eliz 15-Jan-05): (setq rmail-remote-password | ||
| 4235 | 1.395 (eliz 15-Jan-05): (read-passwd (if imap | ||
| 4236 | 1.395 (eliz 15-Jan-05): "IMAP password: " | ||
| 4237 | 1.395 (eliz 15-Jan-05): "POP password: ")))) | ||
| 4238 | 1.395 (eliz 15-Jan-05): (rmail-set-remote-password rmail-remote-password) | ||
| 4239 | 1.395 (eliz 15-Jan-05): (setq rmail-remote-password nil)) | ||
| 4240 | 1.395 (eliz 15-Jan-05): (rmail-encode-string rmail-encoded-remote-password (emacs-pid))) | ||
| 4241 | 1.282 (rms 27-Jul-98): | ||
| 4242 | 1.282 (rms 27-Jul-98): (defun rmail-have-password () | ||
| 4243 | 1.395 (eliz 15-Jan-05): (or rmail-remote-password rmail-encoded-remote-password)) | ||
| 4244 | 1.282 (rms 27-Jul-98): | ||
| 4245 | 1.282 (rms 27-Jul-98): (defun rmail-encode-string (string mask) | ||
| 4246 | 1.282 (rms 27-Jul-98): "Encode STRING with integer MASK, by taking the exclusive OR of the | ||
| 4247 | 1.282 (rms 27-Jul-98): lowest byte in the mask with the first character of string, the | ||
| 4248 | 1.282 (rms 27-Jul-98): second-lowest-byte with the second character of the string, etc., | ||
| 4249 | 1.282 (rms 27-Jul-98): restarting at the lowest byte of the mask whenever it runs out. | ||
| 4250 | 1.282 (rms 27-Jul-98): Returns the encoded string. Calling the function again with an | ||
| 4251 | 1.282 (rms 27-Jul-98): encoded string (and the same mask) will decode the string." | ||
| 4252 | 1.293 (rms 31-Dec-98): (setq mask (abs mask)) ; doesn't work if negative | ||
| 4253 | 1.358 (pot 06-May-02): (let* ((string-vector (string-to-vector string)) (i 0) | ||
| 4254 | 1.282 (rms 27-Jul-98): (len (length string-vector)) (curmask mask) charmask) | ||
| 4255 | 1.282 (rms 27-Jul-98): (while (< i len) | ||
| 4256 | 1.282 (rms 27-Jul-98): (if (= curmask 0) | ||
| 4257 | 1.282 (rms 27-Jul-98): (setq curmask mask)) | ||
| 4258 | 1.282 (rms 27-Jul-98): (setq charmask (% curmask 256)) | ||
| 4259 | 1.282 (rms 27-Jul-98): (setq curmask (lsh curmask -8)) | ||
| 4260 | 1.282 (rms 27-Jul-98): (aset string-vector i (logxor charmask (aref string-vector i))) | ||
| 4261 | 1.282 (rms 27-Jul-98): (setq i (1+ i))) | ||
| 4262 | 1.282 (rms 27-Jul-98): (concat string-vector))) | ||
| 4263 | 1.389 (lh 21-Apr-04): | ||
| 4264 | 1.389 (lh 21-Apr-04): ;;;; Desktop support | ||
| 4265 | 1.389 (lh 21-Apr-04): | ||
| 4266 | 1.389 (lh 21-Apr-04): (defun rmail-restore-desktop-buffer (desktop-buffer-file-name | ||
| 4267 | 1.389 (lh 21-Apr-04): desktop-buffer-name | ||
| 4268 | 1.389 (lh 21-Apr-04): desktop-buffer-misc) | ||
| 4269 | 1.389 (lh 21-Apr-04): "Restore an rmail buffer specified in a desktop file." | ||
| 4270 | 1.389 (lh 21-Apr-04): (condition-case error | ||
| 4271 | 1.389 (lh 21-Apr-04): (progn | ||
| 4272 | 1.389 (lh 21-Apr-04): (rmail-input desktop-buffer-file-name) | ||
| 4273 | 1.389 (lh 21-Apr-04): (if (eq major-mode 'rmail-mode) | ||
| 4274 | 1.389 (lh 21-Apr-04): (current-buffer) | ||
| 4275 | 1.389 (lh 21-Apr-04): rmail-buffer)) | ||
| 4276 | 1.389 (lh 21-Apr-04): (file-locked | ||
| 4277 | 1.389 (lh 21-Apr-04): (kill-buffer (current-buffer)) | ||
| 4278 | 1.389 (lh 21-Apr-04): nil))) | ||
| 4279 | 1.409 (lh 10-Aug-05): | ||
| 4280 | 1.412 (schwab 14-Aug-05): (add-to-list 'desktop-buffer-mode-handlers | ||
| 4281 | 1.412 (schwab 14-Aug-05): '(rmail-mode . rmail-restore-desktop-buffer)) | ||
| 4282 | 1.244 (zappo 23-Jan-98): | ||
| 4283 | 1.9 (jimb 16-Mar-92): (provide 'rmail) | ||
| 4284 | 1.9 (jimb 16-Mar-92): | ||
| 4285 | 1.453 (monnier 10-Apr-08): ;; arch-tag: cff0a950-57fe-4f73-a86e-91ff75afd06c | ||
| 4286 | 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 deleted file mode 100644 index 6a6867e89a1..00000000000 --- a/lisp/mail/mbox-trunk-annotations/rmailedit.el.annotation +++ /dev/null | |||
| @@ -1,164 +0,0 @@ | |||
| 1 | 1.25 (pj 15-Jul-01): ;;; rmailedit.el --- "RMAIL edit mode" Edit the current message | ||
| 2 | 1.3 (eric 30-May-92): | ||
| 3 | 1.40 (gm 12-Jun-08): ;; Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004, 2005, 2006, | ||
| 4 | 1.40 (gm 12-Jun-08): ;; 2007, 2008 Free Software Foundation, Inc. | ||
| 5 | 1.6 (eric 22-Jul-92): | ||
| 6 | 1.4 (eric 16-Jul-92): ;; Maintainer: FSF | ||
| 7 | 1.5 (eric 17-Jul-92): ;; Keywords: mail | ||
| 8 | 1.1 (jla 31-Oct-89): | ||
| 9 | 1.1 (jla 31-Oct-89): ;; This file is part of GNU Emacs. | ||
| 10 | 1.1 (jla 31-Oct-89): | ||
| 11 | 1.39 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 12 | 1.1 (jla 31-Oct-89): ;; it under the terms of the GNU General Public License as published by | ||
| 13 | 1.39 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or | ||
| 14 | 1.39 (gm 06-May-08): ;; (at your option) any later version. | ||
| 15 | 1.1 (jla 31-Oct-89): | ||
| 16 | 1.1 (jla 31-Oct-89): ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 17 | 1.1 (jla 31-Oct-89): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 18 | 1.1 (jla 31-Oct-89): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 19 | 1.1 (jla 31-Oct-89): ;; GNU General Public License for more details. | ||
| 20 | 1.1 (jla 31-Oct-89): | ||
| 21 | 1.1 (jla 31-Oct-89): ;; You should have received a copy of the GNU General Public License | ||
| 22 | 1.39 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 23 | 1.25 (pj 15-Jul-01): | ||
| 24 | 1.25 (pj 15-Jul-01): ;;; Commentary: | ||
| 25 | 1.1 (jla 31-Oct-89): | ||
| 26 | 1.4 (eric 16-Jul-92): ;;; Code: | ||
| 27 | 1.1 (jla 31-Oct-89): | ||
| 28 | 1.1 (jla 31-Oct-89): (require 'rmail) | ||
| 29 | 1.1 (jla 31-Oct-89): | ||
| 30 | 1.23 (gerd 07-May-01): (defcustom rmail-edit-mode-hook nil | ||
| 31 | 1.23 (gerd 07-May-01): "List of functions to call when editing an RMAIL message." | ||
| 32 | 1.23 (gerd 07-May-01): :type 'hook | ||
| 33 | 1.24 (gerd 07-May-01): :version "21.1" | ||
| 34 | 1.23 (gerd 07-May-01): :group 'rmail-edit) | ||
| 35 | 1.23 (gerd 07-May-01): | ||
| 36 | 1.18 (kwzh 08-Apr-98): (defvar rmail-old-text) | ||
| 37 | 1.18 (kwzh 08-Apr-98): | ||
| 38 | 1.1 (jla 31-Oct-89): (defvar rmail-edit-map nil) | ||
| 39 | 1.1 (jla 31-Oct-89): (if rmail-edit-map | ||
| 40 | 1.1 (jla 31-Oct-89): nil | ||
| 41 | 1.7 (rms 20-Jul-93): ;; Make a keymap that inherits text-mode-map. | ||
| 42 | 1.18 (kwzh 08-Apr-98): (setq rmail-edit-map (make-sparse-keymap)) | ||
| 43 | 1.18 (kwzh 08-Apr-98): (set-keymap-parent rmail-edit-map text-mode-map) | ||
| 44 | 1.1 (jla 31-Oct-89): (define-key rmail-edit-map "\C-c\C-c" 'rmail-cease-edit) | ||
| 45 | 1.1 (jla 31-Oct-89): (define-key rmail-edit-map "\C-c\C-]" 'rmail-abort-edit)) | ||
| 46 | 1.1 (jla 31-Oct-89): | ||
| 47 | 1.1 (jla 31-Oct-89): ;; Rmail Edit mode is suitable only for specially formatted data. | ||
| 48 | 1.1 (jla 31-Oct-89): (put 'rmail-edit-mode 'mode-class 'special) | ||
| 49 | 1.1 (jla 31-Oct-89): | ||
| 50 | 1.36 (dann 25-Nov-07): (declare-function rmail-summary-disable "" ()) | ||
| 51 | 1.36 (dann 25-Nov-07): (declare-function rmail-summary-enable "rmailsum" ()) | ||
| 52 | 1.36 (dann 25-Nov-07): | ||
| 53 | 1.1 (jla 31-Oct-89): (defun rmail-edit-mode () | ||
| 54 | 1.1 (jla 31-Oct-89): "Major mode for editing the contents of an RMAIL message. | ||
| 55 | 1.1 (jla 31-Oct-89): The editing commands are the same as in Text mode, together with two commands | ||
| 56 | 1.1 (jla 31-Oct-89): to return to regular RMAIL: | ||
| 57 | 1.23 (gerd 07-May-01): * \\[rmail-abort-edit] cancels the changes | ||
| 58 | 1.1 (jla 31-Oct-89): you have made and returns to RMAIL | ||
| 59 | 1.23 (gerd 07-May-01): * \\[rmail-cease-edit] makes them permanent. | ||
| 60 | 1.23 (gerd 07-May-01): This functions runs the normal hook `rmail-edit-mode-hook'. | ||
| 61 | 1.1 (jla 31-Oct-89): \\{rmail-edit-map}" | ||
| 62 | 1.29 (lute 14-Jun-05): (delay-mode-hooks (text-mode)) | ||
| 63 | 1.1 (jla 31-Oct-89): (use-local-map rmail-edit-map) | ||
| 64 | 1.1 (jla 31-Oct-89): (setq major-mode 'rmail-edit-mode) | ||
| 65 | 1.1 (jla 31-Oct-89): (setq mode-name "RMAIL Edit") | ||
| 66 | 1.1 (jla 31-Oct-89): (if (boundp 'mode-line-modified) | ||
| 67 | 1.1 (jla 31-Oct-89): (setq mode-line-modified (default-value 'mode-line-modified)) | ||
| 68 | 1.1 (jla 31-Oct-89): (setq mode-line-format (default-value 'mode-line-format))) | ||
| 69 | 1.9 (kwzh 07-Apr-94): (if (rmail-summary-exists) | ||
| 70 | 1.10 (kwzh 07-Apr-94): (save-excursion | ||
| 71 | 1.10 (kwzh 07-Apr-94): (set-buffer rmail-summary-buffer) | ||
| 72 | 1.10 (kwzh 07-Apr-94): (rmail-summary-disable))) | ||
| 73 | 1.28 (lute 26-May-05): (run-mode-hooks 'rmail-edit-mode-hook)) | ||
| 74 | 1.1 (jla 31-Oct-89): | ||
| 75 | 1.20 (rms 27-May-98): (defvar rmail-old-pruned nil) | ||
| 76 | 1.20 (rms 27-May-98): (put 'rmail-old-pruned 'permanent-local t) | ||
| 77 | 1.20 (rms 27-May-98): | ||
| 78 | 1.21 (rms 13-Jul-98): (defvar rmail-edit-saved-coding-system nil) | ||
| 79 | 1.21 (rms 13-Jul-98): (put 'rmail-edit-saved-coding-system 'permanent-local t) | ||
| 80 | 1.21 (rms 13-Jul-98): | ||
| 81 | 1.17 (rms 27-Sep-96): ;;;###autoload | ||
| 82 | 1.1 (jla 31-Oct-89): (defun rmail-edit-current-message () | ||
| 83 | 1.1 (jla 31-Oct-89): "Edit the contents of this message." | ||
| 84 | 1.1 (jla 31-Oct-89): (interactive) | ||
| 85 | 1.20 (rms 27-May-98): (make-local-variable 'rmail-old-pruned) | ||
| 86 | 1.20 (rms 27-May-98): (setq rmail-old-pruned (rmail-msg-is-pruned)) | ||
| 87 | 1.21 (rms 13-Jul-98): (make-local-variable 'rmail-edit-saved-coding-system) | ||
| 88 | 1.21 (rms 13-Jul-98): (setq rmail-edit-saved-coding-system save-buffer-coding-system) | ||
| 89 | 1.20 (rms 27-May-98): (rmail-toggle-header 0) | ||
| 90 | 1.1 (jla 31-Oct-89): (rmail-edit-mode) | ||
| 91 | 1.21 (rms 13-Jul-98): ;; As the local value of save-buffer-coding-system is deleted by | ||
| 92 | 1.21 (rms 13-Jul-98): ;; rmail-edit-mode, we restore the original value. | ||
| 93 | 1.21 (rms 13-Jul-98): (make-local-variable 'save-buffer-coding-system) | ||
| 94 | 1.21 (rms 13-Jul-98): (setq save-buffer-coding-system rmail-edit-saved-coding-system) | ||
| 95 | 1.1 (jla 31-Oct-89): (make-local-variable 'rmail-old-text) | ||
| 96 | 1.1 (jla 31-Oct-89): (setq rmail-old-text (buffer-substring (point-min) (point-max))) | ||
| 97 | 1.1 (jla 31-Oct-89): (setq buffer-read-only nil) | ||
| 98 | 1.14 (kwzh 25-Apr-95): (force-mode-line-update) | ||
| 99 | 1.1 (jla 31-Oct-89): (if (and (eq (key-binding "\C-c\C-c") 'rmail-cease-edit) | ||
| 100 | 1.1 (jla 31-Oct-89): (eq (key-binding "\C-c\C-]") 'rmail-abort-edit)) | ||
| 101 | 1.1 (jla 31-Oct-89): (message "Editing: Type C-c C-c to return to Rmail, C-c C-] to abort") | ||
| 102 | 1.16 (kwzh 25-Jan-96): (message "%s" (substitute-command-keys | ||
| 103 | 1.20 (rms 27-May-98): "Editing: Type \\[rmail-cease-edit] to return to Rmail, \\[rmail-abort-edit] to abort")))) | ||
| 104 | 1.1 (jla 31-Oct-89): | ||
| 105 | 1.1 (jla 31-Oct-89): (defun rmail-cease-edit () | ||
| 106 | 1.1 (jla 31-Oct-89): "Finish editing message; switch back to Rmail proper." | ||
| 107 | 1.1 (jla 31-Oct-89): (interactive) | ||
| 108 | 1.9 (kwzh 07-Apr-94): (if (rmail-summary-exists) | ||
| 109 | 1.10 (kwzh 07-Apr-94): (save-excursion | ||
| 110 | 1.10 (kwzh 07-Apr-94): (set-buffer rmail-summary-buffer) | ||
| 111 | 1.10 (kwzh 07-Apr-94): (rmail-summary-enable))) | ||
| 112 | 1.1 (jla 31-Oct-89): ;; Make sure buffer ends with a newline. | ||
| 113 | 1.1 (jla 31-Oct-89): (save-excursion | ||
| 114 | 1.1 (jla 31-Oct-89): (goto-char (point-max)) | ||
| 115 | 1.1 (jla 31-Oct-89): (if (/= (preceding-char) ?\n) | ||
| 116 | 1.1 (jla 31-Oct-89): (insert "\n")) | ||
| 117 | 1.1 (jla 31-Oct-89): ;; Adjust the marker that points to the end of this message. | ||
| 118 | 1.1 (jla 31-Oct-89): (set-marker (aref rmail-message-vector (1+ rmail-current-message)) | ||
| 119 | 1.1 (jla 31-Oct-89): (point))) | ||
| 120 | 1.1 (jla 31-Oct-89): (let ((old rmail-old-text)) | ||
| 121 | 1.14 (kwzh 25-Apr-95): (force-mode-line-update) | ||
| 122 | 1.18 (kwzh 08-Apr-98): (kill-all-local-variables) | ||
| 123 | 1.1 (jla 31-Oct-89): (rmail-mode-1) | ||
| 124 | 1.40 (gm 12-Jun-08): (if (boundp 'tool-bar-map) | ||
| 125 | 1.40 (gm 12-Jun-08): (set (make-local-variable 'tool-bar-map) rmail-tool-bar-map)) | ||
| 126 | 1.18 (kwzh 08-Apr-98): (rmail-variables) | ||
| 127 | 1.21 (rms 13-Jul-98): ;; As the local value of save-buffer-coding-system is changed by | ||
| 128 | 1.21 (rms 13-Jul-98): ;; rmail-variables, we restore the original value. | ||
| 129 | 1.21 (rms 13-Jul-98): (setq save-buffer-coding-system rmail-edit-saved-coding-system) | ||
| 130 | 1.1 (jla 31-Oct-89): (if (and (= (length old) (- (point-max) (point-min))) | ||
| 131 | 1.1 (jla 31-Oct-89): (string= old (buffer-substring (point-min) (point-max)))) | ||
| 132 | 1.1 (jla 31-Oct-89): () | ||
| 133 | 1.1 (jla 31-Oct-89): (setq old nil) | ||
| 134 | 1.1 (jla 31-Oct-89): (rmail-set-attribute "edited" t) | ||
| 135 | 1.1 (jla 31-Oct-89): (if (boundp 'rmail-summary-vector) | ||
| 136 | 1.1 (jla 31-Oct-89): (progn | ||
| 137 | 1.1 (jla 31-Oct-89): (aset rmail-summary-vector (1- rmail-current-message) nil) | ||
| 138 | 1.1 (jla 31-Oct-89): (save-excursion | ||
| 139 | 1.1 (jla 31-Oct-89): (rmail-widen-to-current-msgbeg | ||
| 140 | 1.19 (rms 01-May-98): (function (lambda () | ||
| 141 | 1.1 (jla 31-Oct-89): (forward-line 2) | ||
| 142 | 1.1 (jla 31-Oct-89): (if (looking-at "Summary-line: ") | ||
| 143 | 1.1 (jla 31-Oct-89): (let ((buffer-read-only nil)) | ||
| 144 | 1.1 (jla 31-Oct-89): (delete-region (point) | ||
| 145 | 1.1 (jla 31-Oct-89): (progn (forward-line 1) | ||
| 146 | 1.19 (rms 01-May-98): (point)))))))))))) | ||
| 147 | 1.19 (rms 01-May-98): (save-excursion | ||
| 148 | 1.20 (rms 27-May-98): (rmail-show-message) | ||
| 149 | 1.20 (rms 27-May-98): (rmail-toggle-header (if rmail-old-pruned 1 0)))) | ||
| 150 | 1.22 (gerd 18-Nov-99): (run-hooks 'rmail-mode-hook) | ||
| 151 | 1.1 (jla 31-Oct-89): (setq buffer-read-only t)) | ||
| 152 | 1.1 (jla 31-Oct-89): | ||
| 153 | 1.1 (jla 31-Oct-89): (defun rmail-abort-edit () | ||
| 154 | 1.1 (jla 31-Oct-89): "Abort edit of current message; restore original contents." | ||
| 155 | 1.1 (jla 31-Oct-89): (interactive) | ||
| 156 | 1.1 (jla 31-Oct-89): (delete-region (point-min) (point-max)) | ||
| 157 | 1.1 (jla 31-Oct-89): (insert rmail-old-text) | ||
| 158 | 1.13 (rms 09-Aug-94): (rmail-cease-edit) | ||
| 159 | 1.13 (rms 09-Aug-94): (rmail-highlight-headers)) | ||
| 160 | 1.1 (jla 31-Oct-89): | ||
| 161 | 1.26 (rost 15-Nov-02): (provide 'rmailedit) | ||
| 162 | 1.26 (rost 15-Nov-02): | ||
| 163 | 1.38 (monnier 10-Apr-08): ;; arch-tag: 93c22709-a14a-46c1-ab91-52c3f5a0ec12 | ||
| 164 | 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 deleted file mode 100644 index 387fe97a1ad..00000000000 --- a/lisp/mail/mbox-trunk-annotations/rmailkwd.el.annotation +++ /dev/null | |||
| @@ -1,290 +0,0 @@ | |||
| 1 | 1.14 (pj 15-Jul-01): ;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs | ||
| 2 | 1.3 (eric 30-May-92): | ||
| 3 | 1.17 (ttn 06-Aug-05): ;; Copyright (C) 1985, 1988, 1994, 2001, 2002, 2003, 2004, | ||
| 4 | 1.23 (miles 08-Jan-08): ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 5 | 1.6 (eric 22-Jul-92): | ||
| 6 | 1.4 (eric 16-Jul-92): ;; Maintainer: FSF | ||
| 7 | 1.5 (eric 17-Jul-92): ;; Keywords: mail | ||
| 8 | 1.1 (jla 31-Oct-89): | ||
| 9 | 1.1 (jla 31-Oct-89): ;; This file is part of GNU Emacs. | ||
| 10 | 1.1 (jla 31-Oct-89): | ||
| 11 | 1.25 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 12 | 1.1 (jla 31-Oct-89): ;; it under the terms of the GNU General Public License as published by | ||
| 13 | 1.25 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or | ||
| 14 | 1.25 (gm 06-May-08): ;; (at your option) any later version. | ||
| 15 | 1.1 (jla 31-Oct-89): | ||
| 16 | 1.1 (jla 31-Oct-89): ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 17 | 1.1 (jla 31-Oct-89): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 18 | 1.1 (jla 31-Oct-89): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 19 | 1.1 (jla 31-Oct-89): ;; GNU General Public License for more details. | ||
| 20 | 1.1 (jla 31-Oct-89): | ||
| 21 | 1.1 (jla 31-Oct-89): ;; You should have received a copy of the GNU General Public License | ||
| 22 | 1.25 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 23 | 1.14 (pj 15-Jul-01): | ||
| 24 | 1.14 (pj 15-Jul-01): ;;; Commentary: | ||
| 25 | 1.1 (jla 31-Oct-89): | ||
| 26 | 1.4 (eric 16-Jul-92): ;;; Code: | ||
| 27 | 1.1 (jla 31-Oct-89): | ||
| 28 | 1.18 (lektu 29-Aug-05): (defvar rmail-buffer) | ||
| 29 | 1.18 (lektu 29-Aug-05): (defvar rmail-current-message) | ||
| 30 | 1.18 (lektu 29-Aug-05): (defvar rmail-last-label) | ||
| 31 | 1.18 (lektu 29-Aug-05): (defvar rmail-last-multi-labels) | ||
| 32 | 1.18 (lektu 29-Aug-05): (defvar rmail-summary-vector) | ||
| 33 | 1.18 (lektu 29-Aug-05): (defvar rmail-total-messages) | ||
| 34 | 1.18 (lektu 29-Aug-05): | ||
| 35 | 1.1 (jla 31-Oct-89): ;; Global to all RMAIL buffers. It exists primarily for the sake of | ||
| 36 | 1.1 (jla 31-Oct-89): ;; completion. It is better to use strings with the label functions | ||
| 37 | 1.1 (jla 31-Oct-89): ;; and let them worry about making the label. | ||
| 38 | 1.1 (jla 31-Oct-89): | ||
| 39 | 1.1 (jla 31-Oct-89): (defvar rmail-label-obarray (make-vector 47 0)) | ||
| 40 | 1.1 (jla 31-Oct-89): | ||
| 41 | 1.1 (jla 31-Oct-89): ;; Named list of symbols representing valid message attributes in RMAIL. | ||
| 42 | 1.1 (jla 31-Oct-89): | ||
| 43 | 1.1 (jla 31-Oct-89): (defconst rmail-attributes | ||
| 44 | 1.1 (jla 31-Oct-89): (cons 'rmail-keywords | ||
| 45 | 1.9 (kwzh 21-Apr-95): (mapcar (function (lambda (s) (intern s rmail-label-obarray))) | ||
| 46 | 1.9 (kwzh 21-Apr-95): '("deleted" "answered" "filed" "forwarded" "unseen" "edited" | ||
| 47 | 1.9 (kwzh 21-Apr-95): "resent")))) | ||
| 48 | 1.1 (jla 31-Oct-89): | ||
| 49 | 1.1 (jla 31-Oct-89): (defconst rmail-deleted-label (intern "deleted" rmail-label-obarray)) | ||
| 50 | 1.1 (jla 31-Oct-89): | ||
| 51 | 1.1 (jla 31-Oct-89): ;; Named list of symbols representing valid message keywords in RMAIL. | ||
| 52 | 1.1 (jla 31-Oct-89): | ||
| 53 | 1.11 (rms 22-Sep-96): (defvar rmail-keywords) | ||
| 54 | 1.1 (jla 31-Oct-89): | ||
| 55 | 1.12 (rms 27-Sep-96): ;;;###autoload | ||
| 56 | 1.1 (jla 31-Oct-89): (defun rmail-add-label (string) | ||
| 57 | 1.1 (jla 31-Oct-89): "Add LABEL to labels associated with current RMAIL message. | ||
| 58 | 1.1 (jla 31-Oct-89): Completion is performed over known labels when reading." | ||
| 59 | 1.1 (jla 31-Oct-89): (interactive (list (rmail-read-label "Add label"))) | ||
| 60 | 1.1 (jla 31-Oct-89): (rmail-set-label string t)) | ||
| 61 | 1.1 (jla 31-Oct-89): | ||
| 62 | 1.12 (rms 27-Sep-96): ;;;###autoload | ||
| 63 | 1.1 (jla 31-Oct-89): (defun rmail-kill-label (string) | ||
| 64 | 1.1 (jla 31-Oct-89): "Remove LABEL from labels associated with current RMAIL message. | ||
| 65 | 1.1 (jla 31-Oct-89): Completion is performed over known labels when reading." | ||
| 66 | 1.1 (jla 31-Oct-89): (interactive (list (rmail-read-label "Remove label"))) | ||
| 67 | 1.1 (jla 31-Oct-89): (rmail-set-label string nil)) | ||
| 68 | 1.1 (jla 31-Oct-89): | ||
| 69 | 1.12 (rms 27-Sep-96): ;;;###autoload | ||
| 70 | 1.1 (jla 31-Oct-89): (defun rmail-read-label (prompt) | ||
| 71 | 1.13 (gerd 08-May-01): (with-current-buffer rmail-buffer | ||
| 72 | 1.13 (gerd 08-May-01): (if (not rmail-keywords) (rmail-parse-file-keywords)) | ||
| 73 | 1.13 (gerd 08-May-01): (let ((result | ||
| 74 | 1.13 (gerd 08-May-01): (completing-read (concat prompt | ||
| 75 | 1.13 (gerd 08-May-01): (if rmail-last-label | ||
| 76 | 1.13 (gerd 08-May-01): (concat " (default " | ||
| 77 | 1.13 (gerd 08-May-01): (symbol-name rmail-last-label) | ||
| 78 | 1.13 (gerd 08-May-01): "): ") | ||
| 79 | 1.13 (gerd 08-May-01): ": ")) | ||
| 80 | 1.13 (gerd 08-May-01): rmail-label-obarray | ||
| 81 | 1.13 (gerd 08-May-01): nil | ||
| 82 | 1.13 (gerd 08-May-01): nil))) | ||
| 83 | 1.13 (gerd 08-May-01): (if (string= result "") | ||
| 84 | 1.13 (gerd 08-May-01): rmail-last-label | ||
| 85 | 1.13 (gerd 08-May-01): (setq rmail-last-label (rmail-make-label result t)))))) | ||
| 86 | 1.1 (jla 31-Oct-89): | ||
| 87 | 1.22 (dann 27-Nov-07): (declare-function rmail-maybe-set-message-counters "rmail" ()) | ||
| 88 | 1.22 (dann 27-Nov-07): (declare-function rmail-display-labels "rmail" ()) | ||
| 89 | 1.22 (dann 27-Nov-07): (declare-function rmail-msgbeg "rmail" (n)) | ||
| 90 | 1.22 (dann 27-Nov-07): (declare-function rmail-set-message-deleted-p "rmail" (n state)) | ||
| 91 | 1.22 (dann 27-Nov-07): (declare-function rmail-message-labels-p "rmail" (msg labels)) | ||
| 92 | 1.22 (dann 27-Nov-07): (declare-function rmail-show-message "rmail" (&optional n no-summary)) | ||
| 93 | 1.22 (dann 27-Nov-07): (declare-function mail-comma-list-regexp "mail-utils" (labels)) | ||
| 94 | 1.22 (dann 27-Nov-07): (declare-function mail-parse-comma-list "mail-utils.el" ()) | ||
| 95 | 1.22 (dann 27-Nov-07): | ||
| 96 | 1.1 (jla 31-Oct-89): (defun rmail-set-label (l state &optional n) | ||
| 97 | 1.13 (gerd 08-May-01): (with-current-buffer rmail-buffer | ||
| 98 | 1.13 (gerd 08-May-01): (rmail-maybe-set-message-counters) | ||
| 99 | 1.13 (gerd 08-May-01): (if (not n) (setq n rmail-current-message)) | ||
| 100 | 1.13 (gerd 08-May-01): (aset rmail-summary-vector (1- n) nil) | ||
| 101 | 1.13 (gerd 08-May-01): (let* ((attribute (rmail-attribute-p l)) | ||
| 102 | 1.13 (gerd 08-May-01): (keyword (and (not attribute) | ||
| 103 | 1.13 (gerd 08-May-01): (or (rmail-keyword-p l) | ||
| 104 | 1.13 (gerd 08-May-01): (rmail-install-keyword l)))) | ||
| 105 | 1.13 (gerd 08-May-01): (label (or attribute keyword))) | ||
| 106 | 1.13 (gerd 08-May-01): (if label | ||
| 107 | 1.13 (gerd 08-May-01): (let ((omax (- (buffer-size) (point-max))) | ||
| 108 | 1.13 (gerd 08-May-01): (omin (- (buffer-size) (point-min))) | ||
| 109 | 1.13 (gerd 08-May-01): (buffer-read-only nil) | ||
| 110 | 1.13 (gerd 08-May-01): (case-fold-search t)) | ||
| 111 | 1.13 (gerd 08-May-01): (unwind-protect | ||
| 112 | 1.13 (gerd 08-May-01): (save-excursion | ||
| 113 | 1.13 (gerd 08-May-01): (widen) | ||
| 114 | 1.13 (gerd 08-May-01): (goto-char (rmail-msgbeg n)) | ||
| 115 | 1.13 (gerd 08-May-01): (forward-line 1) | ||
| 116 | 1.13 (gerd 08-May-01): (if (not (looking-at "[01],")) | ||
| 117 | 1.13 (gerd 08-May-01): nil | ||
| 118 | 1.13 (gerd 08-May-01): (let ((start (1+ (point))) | ||
| 119 | 1.13 (gerd 08-May-01): (bound)) | ||
| 120 | 1.13 (gerd 08-May-01): (narrow-to-region (point) (progn (end-of-line) (point))) | ||
| 121 | 1.13 (gerd 08-May-01): (setq bound (point-max)) | ||
| 122 | 1.13 (gerd 08-May-01): (search-backward ",," nil t) | ||
| 123 | 1.13 (gerd 08-May-01): (if attribute | ||
| 124 | 1.13 (gerd 08-May-01): (setq bound (1+ (point))) | ||
| 125 | 1.13 (gerd 08-May-01): (setq start (1+ (point)))) | ||
| 126 | 1.13 (gerd 08-May-01): (goto-char start) | ||
| 127 | 1.13 (gerd 08-May-01): ; (while (re-search-forward "[ \t]*,[ \t]*" nil t) | ||
| 128 | 1.13 (gerd 08-May-01): ; (replace-match ",")) | ||
| 129 | 1.13 (gerd 08-May-01): ; (goto-char start) | ||
| 130 | 1.13 (gerd 08-May-01): (if (re-search-forward | ||
| 131 | 1.1 (jla 31-Oct-89): (concat ", " (rmail-quote-label-name label) ",") | ||
| 132 | 1.1 (jla 31-Oct-89): bound | ||
| 133 | 1.1 (jla 31-Oct-89): 'move) | ||
| 134 | 1.13 (gerd 08-May-01): (if (not state) (replace-match ",")) | ||
| 135 | 1.13 (gerd 08-May-01): (if state (insert " " (symbol-name label) ","))) | ||
| 136 | 1.13 (gerd 08-May-01): (if (eq label rmail-deleted-label) | ||
| 137 | 1.13 (gerd 08-May-01): (rmail-set-message-deleted-p n state))))) | ||
| 138 | 1.13 (gerd 08-May-01): (narrow-to-region (- (buffer-size) omin) (- (buffer-size) omax)) | ||
| 139 | 1.13 (gerd 08-May-01): (if (= n rmail-current-message) (rmail-display-labels)))))))) | ||
| 140 | 1.1 (jla 31-Oct-89): | ||
| 141 | 1.1 (jla 31-Oct-89): ;; Commented functions aren't used by RMAIL but might be nice for user | ||
| 142 | 1.1 (jla 31-Oct-89): ;; packages that do stuff with RMAIL. Note that rmail-message-labels-p | ||
| 143 | 1.2 (jimb 23-Feb-91): ;; is in rmail.el now. | ||
| 144 | 1.1 (jla 31-Oct-89): | ||
| 145 | 1.1 (jla 31-Oct-89): ;(defun rmail-message-label-p (label &optional n) | ||
| 146 | 1.1 (jla 31-Oct-89): ; "Returns symbol if LABEL (attribute or keyword) on NTH or current message." | ||
| 147 | 1.7 (kwzh 01-Apr-94): ; (rmail-message-labels-p (or n rmail-current-message) (regexp-quote label))) | ||
| 148 | 1.1 (jla 31-Oct-89): | ||
| 149 | 1.1 (jla 31-Oct-89): ;(defun rmail-parse-message-labels (&optional n) | ||
| 150 | 1.1 (jla 31-Oct-89): ; "Returns labels associated with NTH or current RMAIL message. | ||
| 151 | 1.7 (kwzh 01-Apr-94): ;The result is a list of two lists of strings. The first is the | ||
| 152 | 1.7 (kwzh 01-Apr-94): ;message attributes and the second is the message keywords." | ||
| 153 | 1.7 (kwzh 01-Apr-94): ; (let (atts keys) | ||
| 154 | 1.7 (kwzh 01-Apr-94): ; (save-restriction | ||
| 155 | 1.7 (kwzh 01-Apr-94): ; (widen) | ||
| 156 | 1.7 (kwzh 01-Apr-94): ; (goto-char (rmail-msgbeg (or n rmail-current-message))) | ||
| 157 | 1.7 (kwzh 01-Apr-94): ; (forward-line 1) | ||
| 158 | 1.7 (kwzh 01-Apr-94): ; (or (looking-at "[01],") (error "Malformed label line")) | ||
| 159 | 1.7 (kwzh 01-Apr-94): ; (forward-char 2) | ||
| 160 | 1.7 (kwzh 01-Apr-94): ; (while (looking-at "[ \t]*\\([^ \t\n,]+\\),") | ||
| 161 | 1.7 (kwzh 01-Apr-94): ; (setq atts (cons (buffer-substring (match-beginning 1) (match-end 1)) | ||
| 162 | 1.7 (kwzh 01-Apr-94): ; atts)) | ||
| 163 | 1.7 (kwzh 01-Apr-94): ; (goto-char (match-end 0))) | ||
| 164 | 1.7 (kwzh 01-Apr-94): ; (or (looking-at ",") (error "Malformed label line")) | ||
| 165 | 1.7 (kwzh 01-Apr-94): ; (forward-char 1) | ||
| 166 | 1.7 (kwzh 01-Apr-94): ; (while (looking-at "[ \t]*\\([^ \t\n,]+\\),") | ||
| 167 | 1.7 (kwzh 01-Apr-94): ; (setq keys (cons (buffer-substring (match-beginning 1) (match-end 1)) | ||
| 168 | 1.7 (kwzh 01-Apr-94): ; keys)) | ||
| 169 | 1.7 (kwzh 01-Apr-94): ; (goto-char (match-end 0))) | ||
| 170 | 1.7 (kwzh 01-Apr-94): ; (or (looking-at "[ \t]*$") (error "Malformed label line")) | ||
| 171 | 1.7 (kwzh 01-Apr-94): ; (list (nreverse atts) (nreverse keys))))) | ||
| 172 | 1.1 (jla 31-Oct-89): | ||
| 173 | 1.1 (jla 31-Oct-89): (defun rmail-attribute-p (s) | ||
| 174 | 1.1 (jla 31-Oct-89): (let ((symbol (rmail-make-label s))) | ||
| 175 | 1.1 (jla 31-Oct-89): (if (memq symbol (cdr rmail-attributes)) symbol))) | ||
| 176 | 1.1 (jla 31-Oct-89): | ||
| 177 | 1.1 (jla 31-Oct-89): (defun rmail-keyword-p (s) | ||
| 178 | 1.1 (jla 31-Oct-89): (let ((symbol (rmail-make-label s))) | ||
| 179 | 1.1 (jla 31-Oct-89): (if (memq symbol (cdr (rmail-keywords))) symbol))) | ||
| 180 | 1.1 (jla 31-Oct-89): | ||
| 181 | 1.1 (jla 31-Oct-89): (defun rmail-make-label (s &optional forcep) | ||
| 182 | 1.1 (jla 31-Oct-89): (cond ((symbolp s) s) | ||
| 183 | 1.1 (jla 31-Oct-89): (forcep (intern (downcase s) rmail-label-obarray)) | ||
| 184 | 1.1 (jla 31-Oct-89): (t (intern-soft (downcase s) rmail-label-obarray)))) | ||
| 185 | 1.1 (jla 31-Oct-89): | ||
| 186 | 1.1 (jla 31-Oct-89): (defun rmail-force-make-label (s) | ||
| 187 | 1.1 (jla 31-Oct-89): (intern (downcase s) rmail-label-obarray)) | ||
| 188 | 1.1 (jla 31-Oct-89): | ||
| 189 | 1.1 (jla 31-Oct-89): (defun rmail-quote-label-name (label) | ||
| 190 | 1.1 (jla 31-Oct-89): (regexp-quote (symbol-name (rmail-make-label label t)))) | ||
| 191 | 1.1 (jla 31-Oct-89): | ||
| 192 | 1.1 (jla 31-Oct-89): ;; Motion on messages with keywords. | ||
| 193 | 1.1 (jla 31-Oct-89): | ||
| 194 | 1.12 (rms 27-Sep-96): ;;;###autoload | ||
| 195 | 1.2 (jimb 23-Feb-91): (defun rmail-previous-labeled-message (n labels) | ||
| 196 | 1.2 (jimb 23-Feb-91): "Show previous message with one of the labels LABELS. | ||
| 197 | 1.2 (jimb 23-Feb-91): LABELS should be a comma-separated list of label names. | ||
| 198 | 1.2 (jimb 23-Feb-91): If LABELS is empty, the last set of labels specified is used. | ||
| 199 | 1.1 (jla 31-Oct-89): With prefix argument N moves backward N messages with these labels." | ||
| 200 | 1.1 (jla 31-Oct-89): (interactive "p\nsMove to previous msg with labels: ") | ||
| 201 | 1.2 (jimb 23-Feb-91): (rmail-next-labeled-message (- n) labels)) | ||
| 202 | 1.1 (jla 31-Oct-89): | ||
| 203 | 1.12 (rms 27-Sep-96): ;;;###autoload | ||
| 204 | 1.1 (jla 31-Oct-89): (defun rmail-next-labeled-message (n labels) | ||
| 205 | 1.2 (jimb 23-Feb-91): "Show next message with one of the labels LABELS. | ||
| 206 | 1.2 (jimb 23-Feb-91): LABELS should be a comma-separated list of label names. | ||
| 207 | 1.2 (jimb 23-Feb-91): If LABELS is empty, the last set of labels specified is used. | ||
| 208 | 1.1 (jla 31-Oct-89): With prefix argument N moves forward N messages with these labels." | ||
| 209 | 1.1 (jla 31-Oct-89): (interactive "p\nsMove to next msg with labels: ") | ||
| 210 | 1.1 (jla 31-Oct-89): (if (string= labels "") | ||
| 211 | 1.1 (jla 31-Oct-89): (setq labels rmail-last-multi-labels)) | ||
| 212 | 1.1 (jla 31-Oct-89): (or labels | ||
| 213 | 1.1 (jla 31-Oct-89): (error "No labels to find have been specified previously")) | ||
| 214 | 1.13 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 215 | 1.1 (jla 31-Oct-89): (setq rmail-last-multi-labels labels) | ||
| 216 | 1.1 (jla 31-Oct-89): (rmail-maybe-set-message-counters) | ||
| 217 | 1.1 (jla 31-Oct-89): (let ((lastwin rmail-current-message) | ||
| 218 | 1.1 (jla 31-Oct-89): (current rmail-current-message) | ||
| 219 | 1.1 (jla 31-Oct-89): (regexp (concat ", ?\\(" | ||
| 220 | 1.1 (jla 31-Oct-89): (mail-comma-list-regexp labels) | ||
| 221 | 1.1 (jla 31-Oct-89): "\\),"))) | ||
| 222 | 1.1 (jla 31-Oct-89): (save-restriction | ||
| 223 | 1.1 (jla 31-Oct-89): (widen) | ||
| 224 | 1.1 (jla 31-Oct-89): (while (and (> n 0) (< current rmail-total-messages)) | ||
| 225 | 1.1 (jla 31-Oct-89): (setq current (1+ current)) | ||
| 226 | 1.1 (jla 31-Oct-89): (if (rmail-message-labels-p current regexp) | ||
| 227 | 1.1 (jla 31-Oct-89): (setq lastwin current n (1- n)))) | ||
| 228 | 1.1 (jla 31-Oct-89): (while (and (< n 0) (> current 1)) | ||
| 229 | 1.1 (jla 31-Oct-89): (setq current (1- current)) | ||
| 230 | 1.1 (jla 31-Oct-89): (if (rmail-message-labels-p current regexp) | ||
| 231 | 1.1 (jla 31-Oct-89): (setq lastwin current n (1+ n))))) | ||
| 232 | 1.1 (jla 31-Oct-89): (rmail-show-message lastwin) | ||
| 233 | 1.1 (jla 31-Oct-89): (if (< n 0) | ||
| 234 | 1.1 (jla 31-Oct-89): (message "No previous message with labels %s" labels)) | ||
| 235 | 1.1 (jla 31-Oct-89): (if (> n 0) | ||
| 236 | 1.1 (jla 31-Oct-89): (message "No following message with labels %s" labels)))) | ||
| 237 | 1.1 (jla 31-Oct-89): | ||
| 238 | 1.1 (jla 31-Oct-89): ;;; Manipulate the file's Labels option. | ||
| 239 | 1.1 (jla 31-Oct-89): | ||
| 240 | 1.1 (jla 31-Oct-89): ;; Return a list of symbols for all | ||
| 241 | 1.1 (jla 31-Oct-89): ;; the keywords (labels) recorded in this file's Labels option. | ||
| 242 | 1.1 (jla 31-Oct-89): (defun rmail-keywords () | ||
| 243 | 1.1 (jla 31-Oct-89): (or rmail-keywords (rmail-parse-file-keywords))) | ||
| 244 | 1.1 (jla 31-Oct-89): | ||
| 245 | 1.1 (jla 31-Oct-89): ;; Set rmail-keywords to a list of symbols for all | ||
| 246 | 1.1 (jla 31-Oct-89): ;; the keywords (labels) recorded in this file's Labels option. | ||
| 247 | 1.1 (jla 31-Oct-89): (defun rmail-parse-file-keywords () | ||
| 248 | 1.1 (jla 31-Oct-89): (save-restriction | ||
| 249 | 1.1 (jla 31-Oct-89): (save-excursion | ||
| 250 | 1.1 (jla 31-Oct-89): (widen) | ||
| 251 | 1.1 (jla 31-Oct-89): (goto-char 1) | ||
| 252 | 1.1 (jla 31-Oct-89): (setq rmail-keywords | ||
| 253 | 1.1 (jla 31-Oct-89): (if (search-forward "\nLabels:" (rmail-msgbeg 1) t) | ||
| 254 | 1.1 (jla 31-Oct-89): (progn | ||
| 255 | 1.1 (jla 31-Oct-89): (narrow-to-region (point) (progn (end-of-line) (point))) | ||
| 256 | 1.1 (jla 31-Oct-89): (goto-char (point-min)) | ||
| 257 | 1.1 (jla 31-Oct-89): (cons 'rmail-keywords | ||
| 258 | 1.1 (jla 31-Oct-89): (mapcar 'rmail-force-make-label | ||
| 259 | 1.1 (jla 31-Oct-89): (mail-parse-comma-list))))))))) | ||
| 260 | 1.1 (jla 31-Oct-89): | ||
| 261 | 1.1 (jla 31-Oct-89): ;; Add WORD to the list in the file's Labels option. | ||
| 262 | 1.1 (jla 31-Oct-89): ;; Any keyword used for the first time needs this done. | ||
| 263 | 1.1 (jla 31-Oct-89): (defun rmail-install-keyword (word) | ||
| 264 | 1.1 (jla 31-Oct-89): (let ((keyword (rmail-make-label word t)) | ||
| 265 | 1.1 (jla 31-Oct-89): (keywords (rmail-keywords))) | ||
| 266 | 1.1 (jla 31-Oct-89): (if (not (or (rmail-attribute-p keyword) | ||
| 267 | 1.1 (jla 31-Oct-89): (rmail-keyword-p keyword))) | ||
| 268 | 1.1 (jla 31-Oct-89): (let ((omin (- (buffer-size) (point-min))) | ||
| 269 | 1.1 (jla 31-Oct-89): (omax (- (buffer-size) (point-max)))) | ||
| 270 | 1.1 (jla 31-Oct-89): (unwind-protect | ||
| 271 | 1.1 (jla 31-Oct-89): (save-excursion | ||
| 272 | 1.1 (jla 31-Oct-89): (widen) | ||
| 273 | 1.1 (jla 31-Oct-89): (goto-char 1) | ||
| 274 | 1.1 (jla 31-Oct-89): (let ((case-fold-search t) | ||
| 275 | 1.1 (jla 31-Oct-89): (buffer-read-only nil)) | ||
| 276 | 1.1 (jla 31-Oct-89): (or (search-forward "\nLabels:" nil t) | ||
| 277 | 1.1 (jla 31-Oct-89): (progn | ||
| 278 | 1.1 (jla 31-Oct-89): (end-of-line) | ||
| 279 | 1.1 (jla 31-Oct-89): (insert "\nLabels:"))) | ||
| 280 | 1.1 (jla 31-Oct-89): (delete-region (point) (progn (end-of-line) (point))) | ||
| 281 | 1.1 (jla 31-Oct-89): (setcdr keywords (cons keyword (cdr keywords))) | ||
| 282 | 1.1 (jla 31-Oct-89): (while (setq keywords (cdr keywords)) | ||
| 283 | 1.1 (jla 31-Oct-89): (insert (symbol-name (car keywords)) ",")) | ||
| 284 | 1.1 (jla 31-Oct-89): (delete-char -1))) | ||
| 285 | 1.1 (jla 31-Oct-89): (narrow-to-region (- (buffer-size) omin) | ||
| 286 | 1.1 (jla 31-Oct-89): (- (buffer-size) omax))))) | ||
| 287 | 1.1 (jla 31-Oct-89): keyword)) | ||
| 288 | 1.3 (eric 30-May-92): | ||
| 289 | 1.24 (monnier 10-Apr-08): ;; arch-tag: b26b3392-99ca-4e1d-933a-dab59b04e9a8 | ||
| 290 | 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 deleted file mode 100644 index 93bcb129e10..00000000000 --- a/lisp/mail/mbox-trunk-annotations/rmailmsc.el.annotation +++ /dev/null | |||
| @@ -1,67 +0,0 @@ | |||
| 1 | 1.2 (eric 30-May-92): ;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader | ||
| 2 | 1.2 (eric 30-May-92): | ||
| 3 | 1.18 (gm 09-Dec-06): ;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, | ||
| 4 | 1.22 (miles 08-Jan-08): ;; 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 5 | 1.5 (eric 22-Jul-92): | ||
| 6 | 1.3 (eric 16-Jul-92): ;; Maintainer: FSF | ||
| 7 | 1.4 (eric 17-Jul-92): ;; Keywords: mail | ||
| 8 | 1.1 (jimb 31-Oct-89): | ||
| 9 | 1.1 (jimb 31-Oct-89): ;; This file is part of GNU Emacs. | ||
| 10 | 1.1 (jimb 31-Oct-89): | ||
| 11 | 1.24 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 12 | 1.1 (jimb 31-Oct-89): ;; it under the terms of the GNU General Public License as published by | ||
| 13 | 1.24 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or | ||
| 14 | 1.24 (gm 06-May-08): ;; (at your option) any later version. | ||
| 15 | 1.1 (jimb 31-Oct-89): | ||
| 16 | 1.1 (jimb 31-Oct-89): ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 17 | 1.1 (jimb 31-Oct-89): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 18 | 1.1 (jimb 31-Oct-89): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 19 | 1.1 (jimb 31-Oct-89): ;; GNU General Public License for more details. | ||
| 20 | 1.1 (jimb 31-Oct-89): | ||
| 21 | 1.1 (jimb 31-Oct-89): ;; You should have received a copy of the GNU General Public License | ||
| 22 | 1.24 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 23 | 1.1 (jimb 31-Oct-89): | ||
| 24 | 1.12 (pj 15-Jul-01): ;;; Commentary: | ||
| 25 | 1.12 (pj 15-Jul-01): | ||
| 26 | 1.6 (eric 17-Mar-93): ;;; Code: | ||
| 27 | 1.1 (jimb 31-Oct-89): | ||
| 28 | 1.16 (lektu 29-Aug-05): (defvar rmail-current-message) | ||
| 29 | 1.16 (lektu 29-Aug-05): (defvar rmail-inbox-list) | ||
| 30 | 1.16 (lektu 29-Aug-05): | ||
| 31 | 1.21 (dann 25-Nov-07): (declare-function rmail-parse-file-inboxes "rmail" ()) | ||
| 32 | 1.21 (dann 25-Nov-07): (declare-function rmail-show-message "rmail" (&optional n no-summary)) | ||
| 33 | 1.21 (dann 25-Nov-07): | ||
| 34 | 1.10 (rms 27-Sep-96): ;;;###autoload | ||
| 35 | 1.1 (jimb 31-Oct-89): (defun set-rmail-inbox-list (file-name) | ||
| 36 | 1.1 (jimb 31-Oct-89): "Set the inbox list of the current RMAIL file to FILE-NAME. | ||
| 37 | 1.8 (rms 06-Sep-94): You can specify one file name, or several names separated by commas. | ||
| 38 | 1.8 (rms 06-Sep-94): If FILE-NAME is empty, remove any existing inbox list." | ||
| 39 | 1.1 (jimb 31-Oct-89): (interactive "sSet mailbox list to (comma-separated list of filenames): ") | ||
| 40 | 1.11 (rms 08-Aug-98): | ||
| 41 | 1.11 (rms 08-Aug-98): (unless (eq major-mode 'rmail-mode) | ||
| 42 | 1.11 (rms 08-Aug-98): (error "set-rmail-inbox-list works only for an Rmail file")) | ||
| 43 | 1.11 (rms 08-Aug-98): | ||
| 44 | 1.1 (jimb 31-Oct-89): (save-excursion | ||
| 45 | 1.1 (jimb 31-Oct-89): (let ((names (rmail-parse-file-inboxes)) | ||
| 46 | 1.1 (jimb 31-Oct-89): (standard-output nil)) | ||
| 47 | 1.1 (jimb 31-Oct-89): (if (or (not names) | ||
| 48 | 1.1 (jimb 31-Oct-89): (y-or-n-p (concat "Replace " | ||
| 49 | 1.1 (jimb 31-Oct-89): (mapconcat 'identity names ", ") | ||
| 50 | 1.1 (jimb 31-Oct-89): "? "))) | ||
| 51 | 1.1 (jimb 31-Oct-89): (let ((buffer-read-only nil)) | ||
| 52 | 1.1 (jimb 31-Oct-89): (widen) | ||
| 53 | 1.1 (jimb 31-Oct-89): (goto-char (point-min)) | ||
| 54 | 1.1 (jimb 31-Oct-89): (search-forward "\n\^_") | ||
| 55 | 1.1 (jimb 31-Oct-89): (re-search-backward "^Mail" nil t) | ||
| 56 | 1.1 (jimb 31-Oct-89): (forward-line 0) | ||
| 57 | 1.1 (jimb 31-Oct-89): (if (looking-at "Mail:") | ||
| 58 | 1.1 (jimb 31-Oct-89): (delete-region (point) | ||
| 59 | 1.1 (jimb 31-Oct-89): (progn (forward-line 1) | ||
| 60 | 1.1 (jimb 31-Oct-89): (point)))) | ||
| 61 | 1.1 (jimb 31-Oct-89): (if (not (string= file-name "")) | ||
| 62 | 1.7 (rms 18-Jun-94): (insert-before-markers "Mail: " file-name "\n")))))) | ||
| 63 | 1.1 (jimb 31-Oct-89): (setq rmail-inbox-list (rmail-parse-file-inboxes)) | ||
| 64 | 1.1 (jimb 31-Oct-89): (rmail-show-message rmail-current-message)) | ||
| 65 | 1.2 (eric 30-May-92): | ||
| 66 | 1.23 (monnier 10-Apr-08): ;; arch-tag: 74ed1d50-2c25-4cbd-b5ae-d29ed8aba6e4 | ||
| 67 | 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 deleted file mode 100644 index a7900d4c4f4..00000000000 --- a/lisp/mail/mbox-trunk-annotations/rmailout.el.annotation +++ /dev/null | |||
| @@ -1,420 +0,0 @@ | |||
| 1 | 1.65 (pj 15-Jul-01): ;;; rmailout.el --- "RMAIL" mail reader for Emacs: output message to a file | ||
| 2 | 1.4 (eric 30-May-92): | ||
| 3 | 1.69 (ttn 06-Aug-05): ;; Copyright (C) 1985, 1987, 1993, 1994, 2001, 2002, 2003, 2004, | ||
| 4 | 1.79 (miles 08-Jan-08): ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 5 | 1.9 (eric 22-Jul-92): | ||
| 6 | 1.6 (eric 15-Jul-92): ;; Maintainer: FSF | ||
| 7 | 1.8 (eric 17-Jul-92): ;; Keywords: mail | ||
| 8 | 1.1 (root 22-May-90): | ||
| 9 | 1.1 (root 22-May-90): ;; This file is part of GNU Emacs. | ||
| 10 | 1.1 (root 22-May-90): | ||
| 11 | 1.81 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 12 | 1.1 (root 22-May-90): ;; it under the terms of the GNU General Public License as published by | ||
| 13 | 1.81 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or | ||
| 14 | 1.81 (gm 06-May-08): ;; (at your option) any later version. | ||
| 15 | 1.1 (root 22-May-90): | ||
| 16 | 1.1 (root 22-May-90): ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 17 | 1.1 (root 22-May-90): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 18 | 1.1 (root 22-May-90): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 19 | 1.1 (root 22-May-90): ;; GNU General Public License for more details. | ||
| 20 | 1.1 (root 22-May-90): | ||
| 21 | 1.1 (root 22-May-90): ;; You should have received a copy of the GNU General Public License | ||
| 22 | 1.81 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 23 | 1.65 (pj 15-Jul-01): | ||
| 24 | 1.65 (pj 15-Jul-01): ;;; Commentary: | ||
| 25 | 1.1 (root 22-May-90): | ||
| 26 | 1.6 (eric 15-Jul-92): ;;; Code: | ||
| 27 | 1.1 (root 22-May-90): | ||
| 28 | 1.30 (kwzh 09-Feb-94): (require 'rmail) | ||
| 29 | 1.59 (rms 04-Jan-99): (provide 'rmailout) | ||
| 30 | 1.30 (kwzh 09-Feb-94): | ||
| 31 | 1.44 (rms 14-Sep-96): ;;;###autoload | ||
| 32 | 1.49 (rms 03-May-97): (defcustom rmail-output-file-alist nil | ||
| 33 | 1.2 (rms 24-Dec-90): "*Alist matching regexps to suggested output Rmail files. | ||
| 34 | 1.16 (rms 09-Jul-93): This is a list of elements of the form (REGEXP . NAME-EXP). | ||
| 35 | 1.21 (roland 14-Oct-93): The suggestion is taken if REGEXP matches anywhere in the message buffer. | ||
| 36 | 1.16 (rms 09-Jul-93): NAME-EXP may be a string constant giving the file name to use, | ||
| 37 | 1.16 (rms 09-Jul-93): or more generally it may be any kind of expression that returns | ||
| 38 | 1.49 (rms 03-May-97): a file name as a string." | ||
| 39 | 1.49 (rms 03-May-97): :type '(repeat (cons regexp | ||
| 40 | 1.49 (rms 03-May-97): (choice :value "" | ||
| 41 | 1.49 (rms 03-May-97): (string :tag "File Name") | ||
| 42 | 1.49 (rms 03-May-97): sexp))) | ||
| 43 | 1.49 (rms 03-May-97): :group 'rmail-output) | ||
| 44 | 1.2 (rms 24-Dec-90): | ||
| 45 | 1.59 (rms 04-Jan-99): (defun rmail-output-read-rmail-file-name () | ||
| 46 | 1.59 (rms 04-Jan-99): "Read the file name to use for `rmail-output-to-rmail-file'. | ||
| 47 | 1.59 (rms 04-Jan-99): Set `rmail-default-rmail-file' to this name as well as returning it." | ||
| 48 | 1.59 (rms 04-Jan-99): (let ((default-file | ||
| 49 | 1.59 (rms 04-Jan-99): (let (answer tail) | ||
| 50 | 1.59 (rms 04-Jan-99): (setq tail rmail-output-file-alist) | ||
| 51 | 1.59 (rms 04-Jan-99): ;; Suggest a file based on a pattern match. | ||
| 52 | 1.59 (rms 04-Jan-99): (while (and tail (not answer)) | ||
| 53 | 1.59 (rms 04-Jan-99): (save-excursion | ||
| 54 | 1.63 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 55 | 1.59 (rms 04-Jan-99): (goto-char (point-min)) | ||
| 56 | 1.59 (rms 04-Jan-99): (if (re-search-forward (car (car tail)) nil t) | ||
| 57 | 1.59 (rms 04-Jan-99): (setq answer (eval (cdr (car tail))))) | ||
| 58 | 1.59 (rms 04-Jan-99): (setq tail (cdr tail)))) | ||
| 59 | 1.59 (rms 04-Jan-99): ;; If no suggestions, use same file as last time. | ||
| 60 | 1.59 (rms 04-Jan-99): (expand-file-name (or answer rmail-default-rmail-file))))) | ||
| 61 | 1.59 (rms 04-Jan-99): (let ((read-file | ||
| 62 | 1.59 (rms 04-Jan-99): (expand-file-name | ||
| 63 | 1.59 (rms 04-Jan-99): (read-file-name | ||
| 64 | 1.70 (rfrancoi 24-Sep-05): (concat "Output message to Rmail file (default " | ||
| 65 | 1.59 (rms 04-Jan-99): (file-name-nondirectory default-file) | ||
| 66 | 1.70 (rfrancoi 24-Sep-05): "): ") | ||
| 67 | 1.59 (rms 04-Jan-99): (file-name-directory default-file) | ||
| 68 | 1.59 (rms 04-Jan-99): (abbreviate-file-name default-file)) | ||
| 69 | 1.59 (rms 04-Jan-99): (file-name-directory default-file)))) | ||
| 70 | 1.59 (rms 04-Jan-99): ;; If the user enters just a directory, | ||
| 71 | 1.59 (rms 04-Jan-99): ;; use the name within that directory chosen by the default. | ||
| 72 | 1.59 (rms 04-Jan-99): (setq rmail-default-rmail-file | ||
| 73 | 1.59 (rms 04-Jan-99): (if (file-directory-p read-file) | ||
| 74 | 1.59 (rms 04-Jan-99): (expand-file-name (file-name-nondirectory default-file) | ||
| 75 | 1.59 (rms 04-Jan-99): read-file) | ||
| 76 | 1.59 (rms 04-Jan-99): read-file))))) | ||
| 77 | 1.59 (rms 04-Jan-99): | ||
| 78 | 1.59 (rms 04-Jan-99): (defun rmail-output-read-file-name () | ||
| 79 | 1.59 (rms 04-Jan-99): "Read the file name to use for `rmail-output'. | ||
| 80 | 1.59 (rms 04-Jan-99): Set `rmail-default-file' to this name as well as returning it." | ||
| 81 | 1.59 (rms 04-Jan-99): (let ((default-file | ||
| 82 | 1.59 (rms 04-Jan-99): (let (answer tail) | ||
| 83 | 1.59 (rms 04-Jan-99): (setq tail rmail-output-file-alist) | ||
| 84 | 1.59 (rms 04-Jan-99): ;; Suggest a file based on a pattern match. | ||
| 85 | 1.59 (rms 04-Jan-99): (while (and tail (not answer)) | ||
| 86 | 1.59 (rms 04-Jan-99): (save-excursion | ||
| 87 | 1.59 (rms 04-Jan-99): (goto-char (point-min)) | ||
| 88 | 1.59 (rms 04-Jan-99): (if (re-search-forward (car (car tail)) nil t) | ||
| 89 | 1.59 (rms 04-Jan-99): (setq answer (eval (cdr (car tail))))) | ||
| 90 | 1.59 (rms 04-Jan-99): (setq tail (cdr tail)))) | ||
| 91 | 1.59 (rms 04-Jan-99): ;; If no suggestion, use same file as last time. | ||
| 92 | 1.59 (rms 04-Jan-99): (or answer rmail-default-file)))) | ||
| 93 | 1.59 (rms 04-Jan-99): (let ((read-file | ||
| 94 | 1.59 (rms 04-Jan-99): (expand-file-name | ||
| 95 | 1.59 (rms 04-Jan-99): (read-file-name | ||
| 96 | 1.70 (rfrancoi 24-Sep-05): (concat "Output message to Unix mail file (default " | ||
| 97 | 1.59 (rms 04-Jan-99): (file-name-nondirectory default-file) | ||
| 98 | 1.70 (rfrancoi 24-Sep-05): "): ") | ||
| 99 | 1.59 (rms 04-Jan-99): (file-name-directory default-file) | ||
| 100 | 1.59 (rms 04-Jan-99): (abbreviate-file-name default-file)) | ||
| 101 | 1.59 (rms 04-Jan-99): (file-name-directory default-file)))) | ||
| 102 | 1.59 (rms 04-Jan-99): (setq rmail-default-file | ||
| 103 | 1.59 (rms 04-Jan-99): (if (file-directory-p read-file) | ||
| 104 | 1.59 (rms 04-Jan-99): (expand-file-name (file-name-nondirectory default-file) | ||
| 105 | 1.59 (rms 04-Jan-99): read-file) | ||
| 106 | 1.59 (rms 04-Jan-99): (expand-file-name | ||
| 107 | 1.59 (rms 04-Jan-99): (or read-file (file-name-nondirectory default-file)) | ||
| 108 | 1.59 (rms 04-Jan-99): (file-name-directory default-file))))))) | ||
| 109 | 1.59 (rms 04-Jan-99): | ||
| 110 | 1.77 (dann 25-Nov-07): (declare-function rmail-update-summary "rmailsum" (&rest ignore)) | ||
| 111 | 1.77 (dann 25-Nov-07): | ||
| 112 | 1.55 (rms 16-Aug-98): ;;; There are functions elsewhere in Emacs that use this function; | ||
| 113 | 1.55 (rms 16-Aug-98): ;;; look at them before you change the calling method. | ||
| 114 | 1.45 (rms 27-Sep-96): ;;;###autoload | ||
| 115 | 1.61 (fx 24-May-00): (defun rmail-output-to-rmail-file (file-name &optional count stay) | ||
| 116 | 1.1 (root 22-May-90): "Append the current message to an Rmail file named FILE-NAME. | ||
| 117 | 1.1 (root 22-May-90): If the file does not exist, ask if it should be created. | ||
| 118 | 1.1 (root 22-May-90): If file is being visited, the message is appended to the Emacs | ||
| 119 | 1.1 (root 22-May-90): buffer visiting that file. | ||
| 120 | 1.50 (rms 20-Sep-97): If the file exists and is not an Rmail file, the message is | ||
| 121 | 1.50 (rms 20-Sep-97): appended in inbox format, the same way `rmail-output' does it. | ||
| 122 | 1.16 (rms 09-Jul-93): | ||
| 123 | 1.37 (rms 05-May-94): The default file name comes from `rmail-default-rmail-file', | ||
| 124 | 1.28 (rms 15-Jan-94): which is updated to the name you use in this command. | ||
| 125 | 1.28 (rms 15-Jan-94): | ||
| 126 | 1.71 (eliz 04-Nov-05): A prefix argument COUNT says to output that many consecutive messages, | ||
| 127 | 1.61 (fx 24-May-00): starting with the current one. Deleted messages are skipped and don't count. | ||
| 128 | 1.61 (fx 24-May-00): | ||
| 129 | 1.71 (eliz 04-Nov-05): If the optional argument STAY is non-nil, then leave the last filed | ||
| 130 | 1.71 (eliz 04-Nov-05): message up instead of moving forward to the next non-deleted message." | ||
| 131 | 1.13 (rms 11-Jun-93): (interactive | ||
| 132 | 1.59 (rms 04-Jan-99): (list (rmail-output-read-rmail-file-name) | ||
| 133 | 1.59 (rms 04-Jan-99): (prefix-numeric-value current-prefix-arg))) | ||
| 134 | 1.11 (jimb 14-Feb-93): (or count (setq count 1)) | ||
| 135 | 1.3 (jimb 01-Mar-91): (setq file-name | ||
| 136 | 1.3 (jimb 01-Mar-91): (expand-file-name file-name | ||
| 137 | 1.27 (rms 15-Jan-94): (file-name-directory rmail-default-rmail-file))) | ||
| 138 | 1.42 (rms 21-Sep-95): (if (and (file-readable-p file-name) (not (mail-file-babyl-p file-name))) | ||
| 139 | 1.16 (rms 09-Jul-93): (rmail-output file-name count) | ||
| 140 | 1.16 (rms 09-Jul-93): (rmail-maybe-set-message-counters) | ||
| 141 | 1.16 (rms 09-Jul-93): (setq file-name (abbreviate-file-name file-name)) | ||
| 142 | 1.47 (rms 30-Mar-97): (or (find-buffer-visiting file-name) | ||
| 143 | 1.16 (rms 09-Jul-93): (file-exists-p file-name) | ||
| 144 | 1.16 (rms 09-Jul-93): (if (yes-or-no-p | ||
| 145 | 1.16 (rms 09-Jul-93): (concat "\"" file-name "\" does not exist, create it? ")) | ||
| 146 | 1.16 (rms 09-Jul-93): (let ((file-buffer (create-file-buffer file-name))) | ||
| 147 | 1.1 (root 22-May-90): (save-excursion | ||
| 148 | 1.16 (rms 09-Jul-93): (set-buffer file-buffer) | ||
| 149 | 1.16 (rms 09-Jul-93): (rmail-insert-rmail-file-header) | ||
| 150 | 1.62 (eliz 11-Mar-01): (let ((require-final-newline nil) | ||
| 151 | 1.62 (eliz 11-Mar-01): (coding-system-for-write | ||
| 152 | 1.62 (eliz 11-Mar-01): (or rmail-file-coding-system | ||
| 153 | 1.62 (eliz 11-Mar-01): 'emacs-mule-unix))) | ||
| 154 | 1.16 (rms 09-Jul-93): (write-region (point-min) (point-max) file-name t 1))) | ||
| 155 | 1.16 (rms 09-Jul-93): (kill-buffer file-buffer)) | ||
| 156 | 1.16 (rms 09-Jul-93): (error "Output file does not exist"))) | ||
| 157 | 1.16 (rms 09-Jul-93): (while (> count 0) | ||
| 158 | 1.16 (rms 09-Jul-93): (let (redelete) | ||
| 159 | 1.16 (rms 09-Jul-93): (unwind-protect | ||
| 160 | 1.16 (rms 09-Jul-93): (progn | ||
| 161 | 1.63 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 162 | 1.24 (rms 23-Dec-93): ;; Temporarily turn off Deleted attribute. | ||
| 163 | 1.24 (rms 23-Dec-93): ;; Do this outside the save-restriction, since it would | ||
| 164 | 1.24 (rms 23-Dec-93): ;; shift the place in the buffer where the visible text starts. | ||
| 165 | 1.24 (rms 23-Dec-93): (if (rmail-message-deleted-p rmail-current-message) | ||
| 166 | 1.24 (rms 23-Dec-93): (progn (setq redelete t) | ||
| 167 | 1.24 (rms 23-Dec-93): (rmail-set-attribute "deleted" nil))) | ||
| 168 | 1.16 (rms 09-Jul-93): (save-restriction | ||
| 169 | 1.16 (rms 09-Jul-93): (widen) | ||
| 170 | 1.16 (rms 09-Jul-93): ;; Decide whether to append to a file or to an Emacs buffer. | ||
| 171 | 1.16 (rms 09-Jul-93): (save-excursion | ||
| 172 | 1.47 (rms 30-Mar-97): (let ((buf (find-buffer-visiting file-name)) | ||
| 173 | 1.16 (rms 09-Jul-93): (cur (current-buffer)) | ||
| 174 | 1.16 (rms 09-Jul-93): (beg (1+ (rmail-msgbeg rmail-current-message))) | ||
| 175 | 1.52 (rms 27-May-98): (end (1+ (rmail-msgend rmail-current-message))) | ||
| 176 | 1.52 (rms 27-May-98): (coding-system-for-write | ||
| 177 | 1.52 (rms 27-May-98): (or rmail-file-coding-system | ||
| 178 | 1.52 (rms 27-May-98): 'emacs-mule-unix))) | ||
| 179 | 1.16 (rms 09-Jul-93): (if (not buf) | ||
| 180 | 1.40 (rms 17-Nov-94): ;; Output to a file. | ||
| 181 | 1.40 (rms 17-Nov-94): (if rmail-fields-not-to-output | ||
| 182 | 1.40 (rms 17-Nov-94): ;; Delete some fields while we output. | ||
| 183 | 1.40 (rms 17-Nov-94): (let ((obuf (current-buffer))) | ||
| 184 | 1.40 (rms 17-Nov-94): (set-buffer (get-buffer-create " rmail-out-temp")) | ||
| 185 | 1.40 (rms 17-Nov-94): (insert-buffer-substring obuf beg end) | ||
| 186 | 1.40 (rms 17-Nov-94): (rmail-delete-unwanted-fields) | ||
| 187 | 1.40 (rms 17-Nov-94): (append-to-file (point-min) (point-max) file-name) | ||
| 188 | 1.40 (rms 17-Nov-94): (set-buffer obuf) | ||
| 189 | 1.40 (rms 17-Nov-94): (kill-buffer (get-buffer " rmail-out-temp"))) | ||
| 190 | 1.40 (rms 17-Nov-94): (append-to-file beg end file-name)) | ||
| 191 | 1.16 (rms 09-Jul-93): (if (eq buf (current-buffer)) | ||
| 192 | 1.16 (rms 09-Jul-93): (error "Can't output message to same file it's already in")) | ||
| 193 | 1.16 (rms 09-Jul-93): ;; File has been visited, in buffer BUF. | ||
| 194 | 1.16 (rms 09-Jul-93): (set-buffer buf) | ||
| 195 | 1.16 (rms 09-Jul-93): (let ((buffer-read-only nil) | ||
| 196 | 1.16 (rms 09-Jul-93): (msg (and (boundp 'rmail-current-message) | ||
| 197 | 1.16 (rms 09-Jul-93): rmail-current-message))) | ||
| 198 | 1.16 (rms 09-Jul-93): ;; If MSG is non-nil, buffer is in RMAIL mode. | ||
| 199 | 1.16 (rms 09-Jul-93): (if msg | ||
| 200 | 1.16 (rms 09-Jul-93): (progn | ||
| 201 | 1.25 (rms 24-Dec-93): ;; Turn on auto save mode, if it's off in this | ||
| 202 | 1.25 (rms 24-Dec-93): ;; buffer but enabled by default. | ||
| 203 | 1.25 (rms 24-Dec-93): (and (not buffer-auto-save-file-name) | ||
| 204 | 1.25 (rms 24-Dec-93): auto-save-default | ||
| 205 | 1.25 (rms 24-Dec-93): (auto-save-mode t)) | ||
| 206 | 1.16 (rms 09-Jul-93): (rmail-maybe-set-message-counters) | ||
| 207 | 1.16 (rms 09-Jul-93): (widen) | ||
| 208 | 1.16 (rms 09-Jul-93): (narrow-to-region (point-max) (point-max)) | ||
| 209 | 1.16 (rms 09-Jul-93): (insert-buffer-substring cur beg end) | ||
| 210 | 1.16 (rms 09-Jul-93): (goto-char (point-min)) | ||
| 211 | 1.16 (rms 09-Jul-93): (widen) | ||
| 212 | 1.16 (rms 09-Jul-93): (search-backward "\n\^_") | ||
| 213 | 1.16 (rms 09-Jul-93): (narrow-to-region (point) (point-max)) | ||
| 214 | 1.40 (rms 17-Nov-94): (rmail-delete-unwanted-fields) | ||
| 215 | 1.16 (rms 09-Jul-93): (rmail-count-new-messages t) | ||
| 216 | 1.24 (rms 23-Dec-93): (if (rmail-summary-exists) | ||
| 217 | 1.24 (rms 23-Dec-93): (rmail-select-summary | ||
| 218 | 1.24 (rms 23-Dec-93): (rmail-update-summary))) | ||
| 219 | 1.16 (rms 09-Jul-93): (rmail-show-message msg)) | ||
| 220 | 1.52 (rms 27-May-98): ;; Output file not in rmail mode => just insert at the end. | ||
| 221 | 1.52 (rms 27-May-98): (narrow-to-region (point-min) (1+ (buffer-size))) | ||
| 222 | 1.52 (rms 27-May-98): (goto-char (point-max)) | ||
| 223 | 1.52 (rms 27-May-98): (insert-buffer-substring cur beg end) | ||
| 224 | 1.52 (rms 27-May-98): (rmail-delete-unwanted-fields))))))) | ||
| 225 | 1.16 (rms 09-Jul-93): (rmail-set-attribute "filed" t)) | ||
| 226 | 1.16 (rms 09-Jul-93): (if redelete (rmail-set-attribute "deleted" t)))) | ||
| 227 | 1.16 (rms 09-Jul-93): (setq count (1- count)) | ||
| 228 | 1.16 (rms 09-Jul-93): (if rmail-delete-after-output | ||
| 229 | 1.66 (pot 04-Feb-03): (unless | ||
| 230 | 1.61 (fx 24-May-00): (if (and (= count 0) stay) | ||
| 231 | 1.61 (fx 24-May-00): (rmail-delete-message) | ||
| 232 | 1.61 (fx 24-May-00): (rmail-delete-forward)) | ||
| 233 | 1.61 (fx 24-May-00): (setq count 0)) | ||
| 234 | 1.16 (rms 09-Jul-93): (if (> count 0) | ||
| 235 | 1.66 (pot 04-Feb-03): (unless | ||
| 236 | 1.61 (fx 24-May-00): (if (not stay) (rmail-next-undeleted-message 1)) | ||
| 237 | 1.61 (fx 24-May-00): (setq count 0))))))) | ||
| 238 | 1.16 (rms 09-Jul-93): | ||
| 239 | 1.45 (rms 27-Sep-96): ;;;###autoload | ||
| 240 | 1.49 (rms 03-May-97): (defcustom rmail-fields-not-to-output nil | ||
| 241 | 1.49 (rms 03-May-97): "*Regexp describing fields to exclude when outputting a message to a file." | ||
| 242 | 1.49 (rms 03-May-97): :type '(choice (const :tag "None" nil) | ||
| 243 | 1.49 (rms 03-May-97): regexp) | ||
| 244 | 1.49 (rms 03-May-97): :group 'rmail-output) | ||
| 245 | 1.40 (rms 17-Nov-94): | ||
| 246 | 1.40 (rms 17-Nov-94): ;; Delete from the buffer header fields we don't want output. | ||
| 247 | 1.40 (rms 17-Nov-94): ;; NOT-RMAIL if t means this buffer does not have the full header | ||
| 248 | 1.40 (rms 17-Nov-94): ;; and *** EOOH *** that a message in an Rmail file has. | ||
| 249 | 1.40 (rms 17-Nov-94): (defun rmail-delete-unwanted-fields (&optional not-rmail) | ||
| 250 | 1.66 (pot 04-Feb-03): (if rmail-fields-not-to-output | ||
| 251 | 1.40 (rms 17-Nov-94): (save-excursion | ||
| 252 | 1.40 (rms 17-Nov-94): (goto-char (point-min)) | ||
| 253 | 1.40 (rms 17-Nov-94): ;; Find the end of the header. | ||
| 254 | 1.40 (rms 17-Nov-94): (if (and (or not-rmail (search-forward "\n*** EOOH ***\n" nil t)) | ||
| 255 | 1.40 (rms 17-Nov-94): (search-forward "\n\n" nil t)) | ||
| 256 | 1.40 (rms 17-Nov-94): (let ((end (point-marker))) | ||
| 257 | 1.40 (rms 17-Nov-94): (goto-char (point-min)) | ||
| 258 | 1.40 (rms 17-Nov-94): (while (re-search-forward rmail-fields-not-to-output end t) | ||
| 259 | 1.40 (rms 17-Nov-94): (beginning-of-line) | ||
| 260 | 1.40 (rms 17-Nov-94): (delete-region (point) | ||
| 261 | 1.40 (rms 17-Nov-94): (progn (forward-line 1) (point))))))))) | ||
| 262 | 1.40 (rms 17-Nov-94): | ||
| 263 | 1.55 (rms 16-Aug-98): ;;; There are functions elsewhere in Emacs that use this function; | ||
| 264 | 1.55 (rms 16-Aug-98): ;;; look at them before you change the calling method. | ||
| 265 | 1.45 (rms 27-Sep-96): ;;;###autoload | ||
| 266 | 1.22 (rms 15-Nov-93): (defun rmail-output (file-name &optional count noattribute from-gnus) | ||
| 267 | 1.32 (rms 03-Apr-94): "Append this message to system-inbox-format mail file named FILE-NAME. | ||
| 268 | 1.71 (eliz 04-Nov-05): A prefix argument COUNT says to output that many consecutive messages, | ||
| 269 | 1.11 (jimb 14-Feb-93): starting with the current one. Deleted messages are skipped and don't count. | ||
| 270 | 1.71 (eliz 04-Nov-05): When called from lisp code, COUNT may be omitted and defaults to 1. | ||
| 271 | 1.19 (rms 25-Jul-93): | ||
| 272 | 1.20 (rms 09-Oct-93): If the pruned message header is shown on the current message, then | ||
| 273 | 1.20 (rms 09-Oct-93): messages will be appended with pruned headers; otherwise, messages | ||
| 274 | 1.20 (rms 09-Oct-93): will be appended with their original headers. | ||
| 275 | 1.28 (rms 15-Jan-94): | ||
| 276 | 1.38 (rms 19-May-94): The default file name comes from `rmail-default-file', | ||
| 277 | 1.28 (rms 15-Jan-94): which is updated to the name you use in this command. | ||
| 278 | 1.20 (rms 09-Oct-93): | ||
| 279 | 1.19 (rms 25-Jul-93): The optional third argument NOATTRIBUTE, if non-nil, says not | ||
| 280 | 1.22 (rms 15-Nov-93): to set the `filed' attribute, and not to display a message. | ||
| 281 | 1.22 (rms 15-Nov-93): | ||
| 282 | 1.22 (rms 15-Nov-93): The optional fourth argument FROM-GNUS is set when called from GNUS." | ||
| 283 | 1.1 (root 22-May-90): (interactive | ||
| 284 | 1.59 (rms 04-Jan-99): (list (rmail-output-read-file-name) | ||
| 285 | 1.59 (rms 04-Jan-99): (prefix-numeric-value current-prefix-arg))) | ||
| 286 | 1.11 (jimb 14-Feb-93): (or count (setq count 1)) | ||
| 287 | 1.3 (jimb 01-Mar-91): (setq file-name | ||
| 288 | 1.3 (jimb 01-Mar-91): (expand-file-name file-name | ||
| 289 | 1.27 (rms 15-Jan-94): (and rmail-default-file | ||
| 290 | 1.27 (rms 15-Jan-94): (file-name-directory rmail-default-file)))) | ||
| 291 | 1.42 (rms 21-Sep-95): (if (and (file-readable-p file-name) (mail-file-babyl-p file-name)) | ||
| 292 | 1.16 (rms 09-Jul-93): (rmail-output-to-rmail-file file-name count) | ||
| 293 | 1.63 (gerd 08-May-01): (set-buffer rmail-buffer) | ||
| 294 | 1.20 (rms 09-Oct-93): (let ((orig-count count) | ||
| 295 | 1.20 (rms 09-Oct-93): (rmailbuf (current-buffer)) | ||
| 296 | 1.20 (rms 09-Oct-93): (case-fold-search t) | ||
| 297 | 1.20 (rms 09-Oct-93): (tembuf (get-buffer-create " rmail-output")) | ||
| 298 | 1.20 (rms 09-Oct-93): (original-headers-p | ||
| 299 | 1.22 (rms 15-Nov-93): (and (not from-gnus) | ||
| 300 | 1.66 (pot 04-Feb-03): (save-excursion | ||
| 301 | 1.22 (rms 15-Nov-93): (save-restriction | ||
| 302 | 1.22 (rms 15-Nov-93): (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max)) | ||
| 303 | 1.22 (rms 15-Nov-93): (goto-char (point-min)) | ||
| 304 | 1.22 (rms 15-Nov-93): (forward-line 1) | ||
| 305 | 1.22 (rms 15-Nov-93): (= (following-char) ?0))))) | ||
| 306 | 1.20 (rms 09-Oct-93): header-beginning | ||
| 307 | 1.66 (pot 04-Feb-03): mail-from mime-version content-type) | ||
| 308 | 1.20 (rms 09-Oct-93): (while (> count 0) | ||
| 309 | 1.55 (rms 16-Aug-98): ;; Preserve the Mail-From and MIME-Version fields | ||
| 310 | 1.55 (rms 16-Aug-98): ;; even if they have been pruned. | ||
| 311 | 1.22 (rms 15-Nov-93): (or from-gnus | ||
| 312 | 1.55 (rms 16-Aug-98): (save-excursion | ||
| 313 | 1.55 (rms 16-Aug-98): (save-restriction | ||
| 314 | 1.55 (rms 16-Aug-98): (widen) | ||
| 315 | 1.55 (rms 16-Aug-98): (goto-char (rmail-msgbeg rmail-current-message)) | ||
| 316 | 1.55 (rms 16-Aug-98): (setq header-beginning (point)) | ||
| 317 | 1.55 (rms 16-Aug-98): (search-forward "\n*** EOOH ***\n") | ||
| 318 | 1.55 (rms 16-Aug-98): (narrow-to-region header-beginning (point)) | ||
| 319 | 1.66 (pot 04-Feb-03): (setq mail-from (mail-fetch-field "Mail-From")) | ||
| 320 | 1.66 (pot 04-Feb-03): (unless rmail-enable-mime | ||
| 321 | 1.66 (pot 04-Feb-03): (setq mime-version (mail-fetch-field "MIME-Version") | ||
| 322 | 1.66 (pot 04-Feb-03): content-type (mail-fetch-field "Content-type")))))) | ||
| 323 | 1.16 (rms 09-Jul-93): (save-excursion | ||
| 324 | 1.16 (rms 09-Jul-93): (set-buffer tembuf) | ||
| 325 | 1.16 (rms 09-Jul-93): (erase-buffer) | ||
| 326 | 1.16 (rms 09-Jul-93): (insert-buffer-substring rmailbuf) | ||
| 327 | 1.64 (gerd 06-Jul-01): (when rmail-enable-mime | ||
| 328 | 1.64 (gerd 06-Jul-01): (if original-headers-p | ||
| 329 | 1.64 (gerd 06-Jul-01): (delete-region (goto-char (point-min)) | ||
| 330 | 1.64 (gerd 06-Jul-01): (if (search-forward "\n*** EOOH ***\n") | ||
| 331 | 1.64 (gerd 06-Jul-01): (match-end 0))) | ||
| 332 | 1.64 (gerd 06-Jul-01): (goto-char (point-min)) | ||
| 333 | 1.64 (gerd 06-Jul-01): (forward-line 2) | ||
| 334 | 1.64 (gerd 06-Jul-01): (delete-region (point-min)(point)) | ||
| 335 | 1.64 (gerd 06-Jul-01): (search-forward "\n*** EOOH ***\n") | ||
| 336 | 1.64 (gerd 06-Jul-01): (delete-region (match-beginning 0) | ||
| 337 | 1.64 (gerd 06-Jul-01): (if (search-forward "\n\n") | ||
| 338 | 1.64 (gerd 06-Jul-01): (1- (match-end 0))))) | ||
| 339 | 1.64 (gerd 06-Jul-01): (setq buffer-file-coding-system (or rmail-file-coding-system | ||
| 340 | 1.64 (gerd 06-Jul-01): 'raw-text))) | ||
| 341 | 1.40 (rms 17-Nov-94): (rmail-delete-unwanted-fields t) | ||
| 342 | 1.56 (rms 21-Oct-98): (or (bolp) (insert "\n")) | ||
| 343 | 1.16 (rms 09-Jul-93): (goto-char (point-min)) | ||
| 344 | 1.20 (rms 09-Oct-93): (if mail-from | ||
| 345 | 1.20 (rms 09-Oct-93): (insert mail-from "\n") | ||
| 346 | 1.20 (rms 09-Oct-93): (insert "From " | ||
| 347 | 1.20 (rms 09-Oct-93): (mail-strip-quoted-names (or (mail-fetch-field "from") | ||
| 348 | 1.20 (rms 09-Oct-93): (mail-fetch-field "really-from") | ||
| 349 | 1.20 (rms 09-Oct-93): (mail-fetch-field "sender") | ||
| 350 | 1.20 (rms 09-Oct-93): "unknown")) | ||
| 351 | 1.20 (rms 09-Oct-93): " " (current-time-string) "\n")) | ||
| 352 | 1.72 (eliz 21-Jan-06): (when mime-version | ||
| 353 | 1.72 (eliz 21-Jan-06): (insert "MIME-Version: " mime-version) | ||
| 354 | 1.72 (eliz 21-Jan-06): ;; Some malformed MIME messages set content-type to nil. | ||
| 355 | 1.72 (eliz 21-Jan-06): (when content-type | ||
| 356 | 1.72 (eliz 21-Jan-06): (insert "\nContent-type: " content-type "\n"))) | ||
| 357 | 1.16 (rms 09-Jul-93): ;; ``Quote'' "\nFrom " as "\n>From " | ||
| 358 | 1.16 (rms 09-Jul-93): ;; (note that this isn't really quoting, as there is no requirement | ||
| 359 | 1.16 (rms 09-Jul-93): ;; that "\n[>]+From " be quoted in the same transparent way.) | ||
| 360 | 1.41 (kwzh 02-Dec-94): (let ((case-fold-search nil)) | ||
| 361 | 1.41 (kwzh 02-Dec-94): (while (search-forward "\nFrom " nil t) | ||
| 362 | 1.41 (kwzh 02-Dec-94): (forward-char -5) | ||
| 363 | 1.41 (kwzh 02-Dec-94): (insert ?>))) | ||
| 364 | 1.19 (rms 25-Jul-93): (write-region (point-min) (point-max) file-name t | ||
| 365 | 1.19 (rms 25-Jul-93): (if noattribute 'nomsg))) | ||
| 366 | 1.20 (rms 09-Oct-93): (or noattribute | ||
| 367 | 1.20 (rms 09-Oct-93): (if (equal major-mode 'rmail-mode) | ||
| 368 | 1.20 (rms 09-Oct-93): (rmail-set-attribute "filed" t))) | ||
| 369 | 1.20 (rms 09-Oct-93): (setq count (1- count)) | ||
| 370 | 1.22 (rms 15-Nov-93): (or from-gnus | ||
| 371 | 1.22 (rms 15-Nov-93): (let ((next-message-p | ||
| 372 | 1.22 (rms 15-Nov-93): (if rmail-delete-after-output | ||
| 373 | 1.22 (rms 15-Nov-93): (rmail-delete-forward) | ||
| 374 | 1.22 (rms 15-Nov-93): (if (> count 0) | ||
| 375 | 1.22 (rms 15-Nov-93): (rmail-next-undeleted-message 1)))) | ||
| 376 | 1.22 (rms 15-Nov-93): (num-appended (- orig-count count))) | ||
| 377 | 1.22 (rms 15-Nov-93): (if (and next-message-p original-headers-p) | ||
| 378 | 1.22 (rms 15-Nov-93): (rmail-toggle-header)) | ||
| 379 | 1.22 (rms 15-Nov-93): (if (and (> count 0) (not next-message-p)) | ||
| 380 | 1.66 (pot 04-Feb-03): (progn | ||
| 381 | 1.78 (deego 06-Dec-07): (error "%s" | ||
| 382 | 1.22 (rms 15-Nov-93): (save-excursion | ||
| 383 | 1.22 (rms 15-Nov-93): (set-buffer rmailbuf) | ||
| 384 | 1.22 (rms 15-Nov-93): (format "Only %d message%s appended" num-appended | ||
| 385 | 1.22 (rms 15-Nov-93): (if (= num-appended 1) "" "s")))) | ||
| 386 | 1.22 (rms 15-Nov-93): (setq count 0)))))) | ||
| 387 | 1.20 (rms 09-Oct-93): (kill-buffer tembuf)))) | ||
| 388 | 1.4 (eric 30-May-92): | ||
| 389 | 1.46 (rms 30-Mar-97): ;;;###autoload | ||
| 390 | 1.48 (rms 05-Apr-97): (defun rmail-output-body-to-file (file-name) | ||
| 391 | 1.46 (rms 30-Mar-97): "Write this message body to the file FILE-NAME. | ||
| 392 | 1.46 (rms 30-Mar-97): FILE-NAME defaults, interactively, from the Subject field of the message." | ||
| 393 | 1.46 (rms 30-Mar-97): (interactive | ||
| 394 | 1.46 (rms 30-Mar-97): (let ((default-file | ||
| 395 | 1.51 (rms 23-May-98): (or (mail-fetch-field "Subject") | ||
| 396 | 1.51 (rms 23-May-98): rmail-default-body-file))) | ||
| 397 | 1.51 (rms 23-May-98): (list (setq rmail-default-body-file | ||
| 398 | 1.51 (rms 23-May-98): (read-file-name | ||
| 399 | 1.51 (rms 23-May-98): "Output message body to file: " | ||
| 400 | 1.51 (rms 23-May-98): (and default-file (file-name-directory default-file)) | ||
| 401 | 1.51 (rms 23-May-98): default-file | ||
| 402 | 1.51 (rms 23-May-98): nil default-file))))) | ||
| 403 | 1.51 (rms 23-May-98): (setq file-name | ||
| 404 | 1.51 (rms 23-May-98): (expand-file-name file-name | ||
| 405 | 1.51 (rms 23-May-98): (and rmail-default-body-file | ||
| 406 | 1.51 (rms 23-May-98): (file-name-directory rmail-default-body-file)))) | ||
| 407 | 1.46 (rms 30-Mar-97): (save-excursion | ||
| 408 | 1.46 (rms 30-Mar-97): (goto-char (point-min)) | ||
| 409 | 1.46 (rms 30-Mar-97): (search-forward "\n\n") | ||
| 410 | 1.48 (rms 05-Apr-97): (and (file-exists-p file-name) | ||
| 411 | 1.74 (lektu 13-Nov-06): (not (y-or-n-p (format "File %s exists; overwrite? " file-name))) | ||
| 412 | 1.48 (rms 05-Apr-97): (error "Operation aborted")) | ||
| 413 | 1.46 (rms 30-Mar-97): (write-region (point) (point-max) file-name) | ||
| 414 | 1.46 (rms 30-Mar-97): (if (equal major-mode 'rmail-mode) | ||
| 415 | 1.46 (rms 30-Mar-97): (rmail-set-attribute "stored" t))) | ||
| 416 | 1.46 (rms 30-Mar-97): (if rmail-delete-after-output | ||
| 417 | 1.46 (rms 30-Mar-97): (rmail-delete-forward))) | ||
| 418 | 1.46 (rms 30-Mar-97): | ||
| 419 | 1.80 (monnier 10-Apr-08): ;; arch-tag: 447117c6-1a9a-4b88-aa43-3101b043e3a4 | ||
| 420 | 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 deleted file mode 100644 index 96601607f03..00000000000 --- a/lisp/mail/mbox-trunk-annotations/rmailsort.el.annotation +++ /dev/null | |||
| @@ -1,250 +0,0 @@ | |||
| 1 | 1.28 (pj 15-Jul-01): ;;; rmailsort.el --- Rmail: sort messages | ||
| 2 | 1.7 (eric 30-May-92): | ||
| 3 | 1.32 (ttn 06-Aug-05): ;; Copyright (C) 1990, 1993, 1994, 2001, 2002, 2003, 2004, | ||
| 4 | 1.37 (miles 08-Jan-08): ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | ||
| 5 | 1.11 (eric 22-Jul-92): | ||
| 6 | 1.14 (rms 26-May-93): ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> | ||
| 7 | 1.26 (rms 10-Feb-97): ;; Maintainer: FSF | ||
| 8 | 1.10 (eric 17-Jul-92): ;; Keywords: mail | ||
| 9 | 1.9 (eric 16-Jul-92): | ||
| 10 | 1.8 (rms 14-Jul-92): ;; This file is part of GNU Emacs. | ||
| 11 | 1.1 (rms 10-Sep-90): | ||
| 12 | 1.39 (gm 06-May-08): ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 13 | 1.8 (rms 14-Jul-92): ;; it under the terms of the GNU General Public License as published by | ||
| 14 | 1.39 (gm 06-May-08): ;; the Free Software Foundation, either version 3 of the License, or | ||
| 15 | 1.39 (gm 06-May-08): ;; (at your option) any later version. | ||
| 16 | 1.1 (rms 10-Sep-90): | ||
| 17 | 1.1 (rms 10-Sep-90): ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 18 | 1.8 (rms 14-Jul-92): ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | 1.8 (rms 14-Jul-92): ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | 1.8 (rms 14-Jul-92): ;; GNU General Public License for more details. | ||
| 21 | 1.8 (rms 14-Jul-92): | ||
| 22 | 1.8 (rms 14-Jul-92): ;; You should have received a copy of the GNU General Public License | ||
| 23 | 1.39 (gm 06-May-08): ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 24 | 1.28 (pj 15-Jul-01): | ||
| 25 | 1.28 (pj 15-Jul-01): ;;; Commentary: | ||
| 26 | 1.1 (rms 10-Sep-90): | ||
| 27 | 1.9 (eric 16-Jul-92): ;;; Code: | ||
| 28 | 1.1 (rms 10-Sep-90): | ||
| 29 | 1.1 (rms 10-Sep-90): (require 'sort) | ||
| 30 | 1.24 (kwzh 20-Jan-96): | ||
| 31 | 1.24 (kwzh 20-Jan-96): ;; For rmail-select-summary | ||
| 32 | 1.24 (kwzh 20-Jan-96): (require 'rmail) | ||
| 33 | 1.1 (rms 10-Sep-90): | ||
| 34 | 1.14 (rms 26-May-93): (autoload 'timezone-make-date-sortable "timezone") | ||
| 35 | 1.14 (rms 26-May-93): | ||
| 36 | 1.14 (rms 26-May-93): ;; Sorting messages in Rmail buffer | ||
| 37 | 1.14 (rms 26-May-93): | ||
| 38 | 1.25 (rms 27-Sep-96): ;;;###autoload | ||
| 39 | 1.1 (rms 10-Sep-90): (defun rmail-sort-by-date (reverse) | ||
| 40 | 1.1 (rms 10-Sep-90): "Sort messages of current Rmail file by date. | ||
| 41 | 1.1 (rms 10-Sep-90): If prefix argument REVERSE is non-nil, sort them in reverse order." | ||
| 42 | 1.1 (rms 10-Sep-90): (interactive "P") | ||
| 43 | 1.1 (rms 10-Sep-90): (rmail-sort-messages reverse | ||
| 44 | 1.1 (rms 10-Sep-90): (function | ||
| 45 | 1.1 (rms 10-Sep-90): (lambda (msg) | ||
| 46 | 1.14 (rms 26-May-93): (rmail-make-date-sortable | ||
| 47 | 1.1 (rms 10-Sep-90): (rmail-fetch-field msg "Date")))))) | ||
| 48 | 1.1 (rms 10-Sep-90): | ||
| 49 | 1.25 (rms 27-Sep-96): ;;;###autoload | ||
| 50 | 1.1 (rms 10-Sep-90): (defun rmail-sort-by-subject (reverse) | ||
| 51 | 1.1 (rms 10-Sep-90): "Sort messages of current Rmail file by subject. | ||
| 52 | 1.1 (rms 10-Sep-90): If prefix argument REVERSE is non-nil, sort them in reverse order." | ||
| 53 | 1.1 (rms 10-Sep-90): (interactive "P") | ||
| 54 | 1.1 (rms 10-Sep-90): (rmail-sort-messages reverse | ||
| 55 | 1.1 (rms 10-Sep-90): (function | ||
| 56 | 1.1 (rms 10-Sep-90): (lambda (msg) | ||
| 57 | 1.1 (rms 10-Sep-90): (let ((key (or (rmail-fetch-field msg "Subject") "")) | ||
| 58 | 1.1 (rms 10-Sep-90): (case-fold-search t)) | ||
| 59 | 1.1 (rms 10-Sep-90): ;; Remove `Re:' | ||
| 60 | 1.18 (kwzh 23-Mar-94): (if (string-match "^\\(re:[ \t]*\\)*" key) | ||
| 61 | 1.18 (kwzh 23-Mar-94): (substring key (match-end 0)) | ||
| 62 | 1.18 (kwzh 23-Mar-94): key)))))) | ||
| 63 | 1.1 (rms 10-Sep-90): | ||
| 64 | 1.25 (rms 27-Sep-96): ;;;###autoload | ||
| 65 | 1.1 (rms 10-Sep-90): (defun rmail-sort-by-author (reverse) | ||
| 66 | 1.1 (rms 10-Sep-90): "Sort messages of current Rmail file by author. | ||
| 67 | 1.1 (rms 10-Sep-90): If prefix argument REVERSE is non-nil, sort them in reverse order." | ||
| 68 | 1.1 (rms 10-Sep-90): (interactive "P") | ||
| 69 | 1.1 (rms 10-Sep-90): (rmail-sort-messages reverse | ||
| 70 | 1.1 (rms 10-Sep-90): (function | ||
| 71 | 1.1 (rms 10-Sep-90): (lambda (msg) | ||
| 72 | 1.14 (rms 26-May-93): (downcase ;Canonical name | ||
| 73 | 1.14 (rms 26-May-93): (mail-strip-quoted-names | ||
| 74 | 1.14 (rms 26-May-93): (or (rmail-fetch-field msg "From") | ||
| 75 | 1.14 (rms 26-May-93): (rmail-fetch-field msg "Sender") ""))))))) | ||
| 76 | 1.1 (rms 10-Sep-90): | ||
| 77 | 1.25 (rms 27-Sep-96): ;;;###autoload | ||
| 78 | 1.1 (rms 10-Sep-90): (defun rmail-sort-by-recipient (reverse) | ||
| 79 | 1.1 (rms 10-Sep-90): "Sort messages of current Rmail file by recipient. | ||
| 80 | 1.1 (rms 10-Sep-90): If prefix argument REVERSE is non-nil, sort them in reverse order." | ||
| 81 | 1.1 (rms 10-Sep-90): (interactive "P") | ||
| 82 | 1.1 (rms 10-Sep-90): (rmail-sort-messages reverse | ||
| 83 | 1.1 (rms 10-Sep-90): (function | ||
| 84 | 1.1 (rms 10-Sep-90): (lambda (msg) | ||
| 85 | 1.14 (rms 26-May-93): (downcase ;Canonical name | ||
| 86 | 1.14 (rms 26-May-93): (mail-strip-quoted-names | ||
| 87 | 1.14 (rms 26-May-93): (or (rmail-fetch-field msg "To") | ||
| 88 | 1.14 (rms 26-May-93): (rmail-fetch-field msg "Apparently-To") "") | ||
| 89 | 1.14 (rms 26-May-93): )))))) | ||
| 90 | 1.1 (rms 10-Sep-90): | ||
| 91 | 1.25 (rms 27-Sep-96): ;;;###autoload | ||
| 92 | 1.3 (rms 03-Dec-90): (defun rmail-sort-by-correspondent (reverse) | ||
| 93 | 1.3 (rms 03-Dec-90): "Sort messages of current Rmail file by other correspondent. | ||
| 94 | 1.3 (rms 03-Dec-90): If prefix argument REVERSE is non-nil, sort them in reverse order." | ||
| 95 | 1.3 (rms 03-Dec-90): (interactive "P") | ||
| 96 | 1.3 (rms 03-Dec-90): (rmail-sort-messages reverse | ||
| 97 | 1.3 (rms 03-Dec-90): (function | ||
| 98 | 1.3 (rms 03-Dec-90): (lambda (msg) | ||
| 99 | 1.3 (rms 03-Dec-90): (rmail-select-correspondent | ||
| 100 | 1.3 (rms 03-Dec-90): msg | ||
| 101 | 1.3 (rms 03-Dec-90): '("From" "Sender" "To" "Apparently-To")))))) | ||
| 102 | 1.3 (rms 03-Dec-90): | ||
| 103 | 1.3 (rms 03-Dec-90): (defun rmail-select-correspondent (msg fields) | ||
| 104 | 1.3 (rms 03-Dec-90): (let ((ans "")) | ||
| 105 | 1.14 (rms 26-May-93): (while (and fields (string= ans "")) | ||
| 106 | 1.14 (rms 26-May-93): (setq ans | ||
| 107 | 1.14 (rms 26-May-93): (rmail-dont-reply-to | ||
| 108 | 1.14 (rms 26-May-93): (mail-strip-quoted-names | ||
| 109 | 1.14 (rms 26-May-93): (or (rmail-fetch-field msg (car fields)) "")))) | ||
| 110 | 1.14 (rms 26-May-93): (setq fields (cdr fields))) | ||
| 111 | 1.14 (rms 26-May-93): ans)) | ||
| 112 | 1.4 (rms 27-Dec-90): | ||
| 113 | 1.25 (rms 27-Sep-96): ;;;###autoload | ||
| 114 | 1.14 (rms 26-May-93): (defun rmail-sort-by-lines (reverse) | ||
| 115 | 1.15 (rms 22-Jun-93): "Sort messages of current Rmail file by number of lines. | ||
| 116 | 1.4 (rms 27-Dec-90): If prefix argument REVERSE is non-nil, sort them in reverse order." | ||
| 117 | 1.4 (rms 27-Dec-90): (interactive "P") | ||
| 118 | 1.4 (rms 27-Dec-90): (rmail-sort-messages reverse | ||
| 119 | 1.4 (rms 27-Dec-90): (function | ||
| 120 | 1.4 (rms 27-Dec-90): (lambda (msg) | ||
| 121 | 1.17 (kwzh 12-Mar-94): (count-lines (rmail-msgbeg msg) | ||
| 122 | 1.17 (kwzh 12-Mar-94): (rmail-msgend msg)))))) | ||
| 123 | 1.21 (kwzh 07-Apr-94): | ||
| 124 | 1.25 (rms 27-Sep-96): ;;;###autoload | ||
| 125 | 1.27 (gerd 07-May-01): (defun rmail-sort-by-labels (reverse labels) | ||
| 126 | 1.21 (kwzh 07-Apr-94): "Sort messages of current Rmail file by labels. | ||
| 127 | 1.21 (kwzh 07-Apr-94): If prefix argument REVERSE is non-nil, sort them in reverse order. | ||
| 128 | 1.21 (kwzh 07-Apr-94): KEYWORDS is a comma-separated list of labels." | ||
| 129 | 1.21 (kwzh 07-Apr-94): (interactive "P\nsSort by labels: ") | ||
| 130 | 1.21 (kwzh 07-Apr-94): (or (string-match "[^ \t]" labels) | ||
| 131 | 1.21 (kwzh 07-Apr-94): (error "No labels specified")) | ||
| 132 | 1.21 (kwzh 07-Apr-94): (setq labels (concat (substring labels (match-beginning 0)) ",")) | ||
| 133 | 1.21 (kwzh 07-Apr-94): (let (labelvec) | ||
| 134 | 1.21 (kwzh 07-Apr-94): (while (string-match "[ \t]*,[ \t]*" labels) | ||
| 135 | 1.29 (lektu 04-Feb-03): (setq labelvec (cons | ||
| 136 | 1.21 (kwzh 07-Apr-94): (concat ", ?\\(" | ||
| 137 | 1.21 (kwzh 07-Apr-94): (substring labels 0 (match-beginning 0)) | ||
| 138 | 1.21 (kwzh 07-Apr-94): "\\),") | ||
| 139 | 1.21 (kwzh 07-Apr-94): labelvec)) | ||
| 140 | 1.21 (kwzh 07-Apr-94): (setq labels (substring labels (match-end 0)))) | ||
| 141 | 1.21 (kwzh 07-Apr-94): (setq labelvec (apply 'vector (nreverse labelvec))) | ||
| 142 | 1.21 (kwzh 07-Apr-94): (rmail-sort-messages reverse | ||
| 143 | 1.21 (kwzh 07-Apr-94): (function | ||
| 144 | 1.21 (kwzh 07-Apr-94): (lambda (msg) | ||
| 145 | 1.21 (kwzh 07-Apr-94): (let ((n 0)) | ||
| 146 | 1.21 (kwzh 07-Apr-94): (while (and (< n (length labelvec)) | ||
| 147 | 1.21 (kwzh 07-Apr-94): (not (rmail-message-labels-p | ||
| 148 | 1.21 (kwzh 07-Apr-94): msg (aref labelvec n)))) | ||
| 149 | 1.21 (kwzh 07-Apr-94): (setq n (1+ n))) | ||
| 150 | 1.21 (kwzh 07-Apr-94): n)))))) | ||
| 151 | 1.14 (rms 26-May-93): | ||
| 152 | 1.14 (rms 26-May-93): ;; Basic functions | ||
| 153 | 1.36 (dann 25-Nov-07): (declare-function rmail-update-summary "rmailsum" (&rest ignore)) | ||
| 154 | 1.1 (rms 10-Sep-90): | ||
| 155 | 1.14 (rms 26-May-93): (defun rmail-sort-messages (reverse keyfun) | ||
| 156 | 1.1 (rms 10-Sep-90): "Sort messages of current Rmail file. | ||
| 157 | 1.14 (rms 26-May-93): If 1st argument REVERSE is non-nil, sort them in reverse order. | ||
| 158 | 1.14 (rms 26-May-93): 2nd argument KEYFUN is called with a message number, and should return a key." | ||
| 159 | 1.26 (rms 10-Feb-97): (save-current-buffer | ||
| 160 | 1.16 (rms 24-Nov-93): ;; If we are in a summary buffer, operate on the Rmail buffer. | ||
| 161 | 1.16 (rms 24-Nov-93): (if (eq major-mode 'rmail-summary-mode) | ||
| 162 | 1.16 (rms 24-Nov-93): (set-buffer rmail-buffer)) | ||
| 163 | 1.16 (rms 24-Nov-93): (let ((buffer-read-only nil) | ||
| 164 | 1.26 (rms 10-Feb-97): (point-offset (- (point) (point-min))) | ||
| 165 | 1.16 (rms 24-Nov-93): (predicate nil) ;< or string-lessp | ||
| 166 | 1.16 (rms 24-Nov-93): (sort-lists nil)) | ||
| 167 | 1.16 (rms 24-Nov-93): (message "Finding sort keys...") | ||
| 168 | 1.16 (rms 24-Nov-93): (widen) | ||
| 169 | 1.16 (rms 24-Nov-93): (let ((msgnum 1)) | ||
| 170 | 1.16 (rms 24-Nov-93): (while (>= rmail-total-messages msgnum) | ||
| 171 | 1.16 (rms 24-Nov-93): (setq sort-lists | ||
| 172 | 1.16 (rms 24-Nov-93): (cons (list (funcall keyfun msgnum) ;Make sorting key | ||
| 173 | 1.16 (rms 24-Nov-93): (eq rmail-current-message msgnum) ;True if current | ||
| 174 | 1.16 (rms 24-Nov-93): (aref rmail-message-vector msgnum) | ||
| 175 | 1.16 (rms 24-Nov-93): (aref rmail-message-vector (1+ msgnum))) | ||
| 176 | 1.16 (rms 24-Nov-93): sort-lists)) | ||
| 177 | 1.16 (rms 24-Nov-93): (if (zerop (% msgnum 10)) | ||
| 178 | 1.16 (rms 24-Nov-93): (message "Finding sort keys...%d" msgnum)) | ||
| 179 | 1.16 (rms 24-Nov-93): (setq msgnum (1+ msgnum)))) | ||
| 180 | 1.16 (rms 24-Nov-93): (or reverse (setq sort-lists (nreverse sort-lists))) | ||
| 181 | 1.16 (rms 24-Nov-93): ;; Decide predicate: < or string-lessp | ||
| 182 | 1.16 (rms 24-Nov-93): (if (numberp (car (car sort-lists))) ;Is a key numeric? | ||
| 183 | 1.16 (rms 24-Nov-93): (setq predicate (function <)) | ||
| 184 | 1.16 (rms 24-Nov-93): (setq predicate (function string-lessp))) | ||
| 185 | 1.16 (rms 24-Nov-93): (setq sort-lists | ||
| 186 | 1.16 (rms 24-Nov-93): (sort sort-lists | ||
| 187 | 1.16 (rms 24-Nov-93): (function | ||
| 188 | 1.16 (rms 24-Nov-93): (lambda (a b) | ||
| 189 | 1.16 (rms 24-Nov-93): (funcall predicate (car a) (car b)))))) | ||
| 190 | 1.16 (rms 24-Nov-93): (if reverse (setq sort-lists (nreverse sort-lists))) | ||
| 191 | 1.16 (rms 24-Nov-93): ;; Now we enter critical region. So, keyboard quit is disabled. | ||
| 192 | 1.16 (rms 24-Nov-93): (message "Reordering messages...") | ||
| 193 | 1.16 (rms 24-Nov-93): (let ((inhibit-quit t) ;Inhibit quit | ||
| 194 | 1.16 (rms 24-Nov-93): (current-message nil) | ||
| 195 | 1.16 (rms 24-Nov-93): (msgnum 1) | ||
| 196 | 1.16 (rms 24-Nov-93): (msginfo nil)) | ||
| 197 | 1.16 (rms 24-Nov-93): ;; There's little hope that we can easily undo after that. | ||
| 198 | 1.20 (kwzh 30-Mar-94): (buffer-disable-undo (current-buffer)) | ||
| 199 | 1.16 (rms 24-Nov-93): (goto-char (rmail-msgbeg 1)) | ||
| 200 | 1.16 (rms 24-Nov-93): ;; To force update of all markers. | ||
| 201 | 1.16 (rms 24-Nov-93): (insert-before-markers ?Z) | ||
| 202 | 1.16 (rms 24-Nov-93): (backward-char 1) | ||
| 203 | 1.16 (rms 24-Nov-93): ;; Now reorder messages. | ||
| 204 | 1.16 (rms 24-Nov-93): (while sort-lists | ||
| 205 | 1.16 (rms 24-Nov-93): (setq msginfo (car sort-lists)) | ||
| 206 | 1.16 (rms 24-Nov-93): ;; Swap two messages. | ||
| 207 | 1.16 (rms 24-Nov-93): (insert-buffer-substring | ||
| 208 | 1.16 (rms 24-Nov-93): (current-buffer) (nth 2 msginfo) (nth 3 msginfo)) | ||
| 209 | 1.16 (rms 24-Nov-93): (delete-region (nth 2 msginfo) (nth 3 msginfo)) | ||
| 210 | 1.16 (rms 24-Nov-93): ;; Is current message? | ||
| 211 | 1.16 (rms 24-Nov-93): (if (nth 1 msginfo) | ||
| 212 | 1.16 (rms 24-Nov-93): (setq current-message msgnum)) | ||
| 213 | 1.16 (rms 24-Nov-93): (setq sort-lists (cdr sort-lists)) | ||
| 214 | 1.16 (rms 24-Nov-93): (if (zerop (% msgnum 10)) | ||
| 215 | 1.16 (rms 24-Nov-93): (message "Reordering messages...%d" msgnum)) | ||
| 216 | 1.16 (rms 24-Nov-93): (setq msgnum (1+ msgnum))) | ||
| 217 | 1.16 (rms 24-Nov-93): ;; Delete the garbage inserted before. | ||
| 218 | 1.16 (rms 24-Nov-93): (delete-char 1) | ||
| 219 | 1.16 (rms 24-Nov-93): (setq quit-flag nil) | ||
| 220 | 1.16 (rms 24-Nov-93): (buffer-enable-undo) | ||
| 221 | 1.16 (rms 24-Nov-93): (rmail-set-message-counters) | ||
| 222 | 1.19 (kwzh 30-Mar-94): (rmail-show-message current-message) | ||
| 223 | 1.26 (rms 10-Feb-97): (goto-char (+ point-offset (point-min))) | ||
| 224 | 1.19 (kwzh 30-Mar-94): (if (rmail-summary-exists) | ||
| 225 | 1.19 (kwzh 30-Mar-94): (rmail-select-summary | ||
| 226 | 1.19 (kwzh 30-Mar-94): (rmail-update-summary))))))) | ||
| 227 | 1.14 (rms 26-May-93): | ||
| 228 | 1.1 (rms 10-Sep-90): (defun rmail-fetch-field (msg field) | ||
| 229 | 1.14 (rms 26-May-93): "Return the value of the header FIELD of MSG. | ||
| 230 | 1.1 (rms 10-Sep-90): Arguments are MSG and FIELD." | ||
| 231 | 1.14 (rms 26-May-93): (save-restriction | ||
| 232 | 1.14 (rms 26-May-93): (widen) | ||
| 233 | 1.14 (rms 26-May-93): (let ((next (rmail-msgend msg))) | ||
| 234 | 1.1 (rms 10-Sep-90): (goto-char (rmail-msgbeg msg)) | ||
| 235 | 1.1 (rms 10-Sep-90): (narrow-to-region (if (search-forward "\n*** EOOH ***\n" next t) | ||
| 236 | 1.1 (rms 10-Sep-90): (point) | ||
| 237 | 1.1 (rms 10-Sep-90): (forward-line 1) | ||
| 238 | 1.1 (rms 10-Sep-90): (point)) | ||
| 239 | 1.1 (rms 10-Sep-90): (progn (search-forward "\n\n" nil t) (point))) | ||
| 240 | 1.1 (rms 10-Sep-90): (mail-fetch-field field)))) | ||
| 241 | 1.1 (rms 10-Sep-90): | ||
| 242 | 1.14 (rms 26-May-93): (defun rmail-make-date-sortable (date) | ||
| 243 | 1.14 (rms 26-May-93): "Make DATE sortable using the function string-lessp." | ||
| 244 | 1.14 (rms 26-May-93): ;; Assume the default time zone is GMT. | ||
| 245 | 1.14 (rms 26-May-93): (timezone-make-date-sortable date "GMT" "GMT")) | ||
| 246 | 1.6 (jimb 16-Mar-92): | ||
| 247 | 1.6 (jimb 16-Mar-92): (provide 'rmailsort) | ||
| 248 | 1.7 (eric 30-May-92): | ||
| 249 | 1.38 (monnier 10-Apr-08): ;; arch-tag: 0d90896b-0c35-46ac-b240-38be5ada2360 | ||
| 250 | 1.7 (eric 30-May-92): ;;; rmailsort.el ends here | ||