summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/blessmail.el2
-rw-r--r--lisp/mail/emacsbug.el17
-rw-r--r--lisp/mail/footnote.el3
-rw-r--r--lisp/mail/mail-extr.el4
-rw-r--r--lisp/mail/mail-hist.el2
-rw-r--r--lisp/mail/mail-utils.el3
-rw-r--r--lisp/mail/mailabbrev.el4
-rw-r--r--lisp/mail/mailalias.el9
-rw-r--r--lisp/mail/mailheader.el2
-rw-r--r--lisp/mail/metamail.el6
-rw-r--r--lisp/mail/mspools.el10
-rw-r--r--lisp/mail/reporter.el5
-rw-r--r--lisp/mail/rfc2368.el3
-rw-r--r--lisp/mail/rfc822.el3
-rw-r--r--lisp/mail/rmail-spam-filter.el30
-rw-r--r--lisp/mail/rmail.el127
-rw-r--r--lisp/mail/rmailedit.el3
-rw-r--r--lisp/mail/rmailkwd.el10
-rw-r--r--lisp/mail/rmailmsc.el5
-rw-r--r--lisp/mail/rmailout.el3
-rw-r--r--lisp/mail/rmailsort.el3
-rw-r--r--lisp/mail/rmailsum.el27
-rw-r--r--lisp/mail/sendmail.el8
-rw-r--r--lisp/mail/smtpmail.el22
-rw-r--r--lisp/mail/supercite.el18
-rw-r--r--lisp/mail/uce.el15
-rw-r--r--lisp/mail/undigest.el4
-rw-r--r--lisp/mail/unrmail.el2
-rw-r--r--lisp/mail/vms-pmail.el2
29 files changed, 242 insertions, 110 deletions
diff --git a/lisp/mail/blessmail.el b/lisp/mail/blessmail.el
index c8bb2e729d2..01c52f82046 100644
--- a/lisp/mail/blessmail.el
+++ b/lisp/mail/blessmail.el
@@ -1,6 +1,6 @@
;;; blessmail.el --- decide whether movemail needs special privileges -*- no-byte-compile: t -*-
-;; Copyright (C) 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index bc6060f40c4..bb88c447320 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -1,7 +1,7 @@
;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
-;; Copyright (C) 1985, 1994, 1997, 1998, 2000, 2001, 2002
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1994, 1997, 1998, 2000, 2001, 2002, 2003,
+;; 2004, 2005 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: FSF
@@ -125,9 +125,18 @@ usually do not have translators to read other languages for them.\n\n")
(insert "\n\n")
(setq user-point (point))
- (insert "\n\n\n")
+ (insert "\n\n")
+
+ (insert "If emacs crashed, and you have the emacs process in the gdb debugger,\n"
+ "please include the output from the following gdb commands:\n"
+ " `bt full' and `xbacktrace'.\n")
+
+ (let ((debug-file (expand-file-name "DEBUG" data-directory)))
+ (if (file-readable-p debug-file)
+ (insert "If you would like to further debug the crash, please read the file\n"
+ debug-file " for instructions.\n")))
- (insert "In " (emacs-version) "\n")
+ (insert "\n\nIn " (emacs-version) "\n")
(if (fboundp 'x-server-vendor)
(condition-case nil
(insert "X server distributor `" (x-server-vendor) "', version "
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el
index e4c0cd10c13..58b6be4f5fc 100644
--- a/lisp/mail/footnote.el
+++ b/lisp/mail/footnote.el
@@ -1,6 +1,7 @@
;;; footnote.el --- footnote support for message mode -*- coding: iso-latin-1;-*-
-;; Copyright (C) 1997, 2000 by Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2000, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Steven L Baur <steve@xemacs.org>
;; Keywords: mail, news
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el
index 15b8dd466ad..da5ec4bfda1 100644
--- a/lisp/mail/mail-extr.el
+++ b/lisp/mail/mail-extr.el
@@ -1,7 +1,7 @@
;;; mail-extr.el --- extract full name and address from RFC 822 mail header -*- coding: utf-8 -*-
-;; Copyright (C) 1991, 1992, 1993, 1994, 1997, 2001
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1992, 1993, 1994, 1997, 2001, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Joe Wells <jbw@cs.bu.edu>
;; Maintainer: FSF
diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el
index 0540c484a89..3010e85d31b 100644
--- a/lisp/mail/mail-hist.el
+++ b/lisp/mail/mail-hist.el
@@ -1,6 +1,6 @@
;;; mail-hist.el --- headers and message body history for outgoing mail
-;; Copyright (C) 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Karl Fogel <kfogel@red-bean.com>
;; Created: March, 1994
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el
index 3b68506b48a..e76da171fbc 100644
--- a/lisp/mail/mail-utils.el
+++ b/lisp/mail/mail-utils.el
@@ -1,6 +1,7 @@
;;; mail-utils.el --- utility functions used both by rmail and rnews
-;; Copyright (C) 1985, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail, news
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index 941dff7ca10..270d2cd6385 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -1,7 +1,7 @@
;;; mailabbrev.el --- abbrev-expansion of mail aliases
-;; Copyright (C) 1985, 86, 87, 92, 93, 96, 1997, 2000, 2002, 2003
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1996, 1997, 2000, 2002,
+;; 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>, now <jwz@jwz.org>
;; Maintainer: FSF
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index 55c284dda7d..48f3494a0e6 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -1,6 +1,7 @@
;;; mailalias.el --- expand and complete mailing address aliases
-;; Copyright (C) 1985, 1987, 1995, 1996, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1995, 1996, 1997, 2002, 2003,
+;; 2004, 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
@@ -261,6 +262,12 @@ By default, this is the file specified by `mail-personal-alias-file'."
((file-exists-p (setq file (concat "~/" file)))
(insert-file-contents file))
(t (setq file nil)))
+ (goto-char (point-min))
+ ;; Delete comments from the contents.
+ (while (search-forward "# " nil t)
+ (let ((p (- (point) 2)))
+ (end-of-line)
+ (delete-region p (point))))
;; Don't lose if no final newline.
(goto-char (point-max))
(or (eq (preceding-char) ?\n) (newline))
diff --git a/lisp/mail/mailheader.el b/lisp/mail/mailheader.el
index e7c4320cc48..1e9a24da341 100644
--- a/lisp/mail/mailheader.el
+++ b/lisp/mail/mailheader.el
@@ -1,6 +1,6 @@
;;; mailheader.el --- mail header parsing, merging, formatting
-;; Copyright (C) 1996 by Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2002, 2003, 2004, 2005 by Free Software Foundation, Inc.
;; Author: Erik Naggum <erik@naggum.no>
;; Keywords: tools, mail, news
diff --git a/lisp/mail/metamail.el b/lisp/mail/metamail.el
index 0c5189e53e0..6d13bda9823 100644
--- a/lisp/mail/metamail.el
+++ b/lisp/mail/metamail.el
@@ -1,6 +1,7 @@
;;; metamail.el --- Metamail interface for GNU Emacs
-;; Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1996, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp>
;; Keywords: mail, news, mime, multimedia
@@ -35,6 +36,9 @@
;;; Code:
+(defvar rmail-current-message)
+(defvar rmail-message-vector)
+
(defgroup metamail nil
"Metamail interface for Emacs."
:group 'mail
diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el
index d1a3072eee8..7a01a5e5361 100644
--- a/lisp/mail/mspools.el
+++ b/lisp/mail/mspools.el
@@ -1,6 +1,6 @@
;;; mspools.el --- show mail spools waiting to be read
-;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Stephen Eglen <stephen@gnu.org>
;; Maintainer: Stephen Eglen <stephen@gnu.org>
@@ -110,6 +110,14 @@
;;; Code:
+(defvar rmail-inbox-list)
+(defvar vm-crash-box)
+(defvar vm-folder-directory)
+(defvar vm-init-file)
+(defvar vm-init-file-loaded)
+(defvar vm-primary-inbox)
+(defvar vm-spool-files)
+
;;; User Variables
(defgroup mspools nil
diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el
index 673cb14e255..058d0a83f23 100644
--- a/lisp/mail/reporter.el
+++ b/lisp/mail/reporter.el
@@ -1,6 +1,7 @@
;;; reporter.el --- customizable bug reporting of lisp programs
-;; Copyright (C) 1993,1994,1995,1996,1997,1998 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: 1993-1998 Barry A. Warsaw
;; Maintainer: FSF
@@ -263,7 +264,7 @@ dumped."
varlist)
(lisp-indent-line)
(insert ")\n"))
- (insert-buffer elbuf))
+ (insert-buffer-substring elbuf))
(error
(insert "State could not be dumped due to the following error:\n\n"
(format "%s" fault)
diff --git a/lisp/mail/rfc2368.el b/lisp/mail/rfc2368.el
index d6864b664ed..a21deb394cf 100644
--- a/lisp/mail/rfc2368.el
+++ b/lisp/mail/rfc2368.el
@@ -3,7 +3,8 @@
;; Author: Sen Nagata <sen@eccosys.com>
;; Keywords: mail
-;; Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2000, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/mail/rfc822.el b/lisp/mail/rfc822.el
index 4c7cfeeaa69..9e57226d7c2 100644
--- a/lisp/mail/rfc822.el
+++ b/lisp/mail/rfc822.el
@@ -1,6 +1,7 @@
;;; rfc822.el --- hairy rfc822 parser for mail and news and suchlike
-;; Copyright (C) 1986, 87, 1990 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1987, 1990, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Richard Mlynarik <mly@eddie.mit.edu>
;; Maintainer: FSF
diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el
index 9cd2123e3c3..7be5146f722 100644
--- a/lisp/mail/rmail-spam-filter.el
+++ b/lisp/mail/rmail-spam-filter.el
@@ -1,7 +1,6 @@
;;; rmail-spam-filter.el --- spam filter for rmail, the emacs mail reader.
-;; Copyright (C) 2002
-;; Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Keywords: email, spam, filter, rmail
;; Author: Eli Tziperman <eli AT deas.harvard.edu>
@@ -87,6 +86,9 @@
(require 'rmailsum)
(if (not (fboundp 'rmail-make-summary-line)) (load-library "rmailsum")))
+(defvar bbdb/mail_auto_create_p)
+(defvar rmail-summary-mode-map)
+
;; For find-if and other cool common lisp functions we may want to use.
(eval-when-compile
(require 'cl))
@@ -183,7 +185,7 @@ may be either 'this is spam' or 'another spam', use the regexp: 'this
is spam\\|another spam' (without the single quotes). To specify that
if the contents contain both this and that the message is spam,
specify 'this\\&that' in the appropriate spam definition field."
- :type '(repeat
+ :type '(repeat
(list :format "%v"
(cons :format "%v" :value (from . "")
(const :format "" from)
@@ -202,7 +204,7 @@ specify 'this\\&that' in the appropriate spam definition field."
(string :tag "Contents" ""))
(cons :format "%v" :value (action . output-and-delete)
(const :format "" action)
- (choice :tag "Action selection"
+ (choice :tag "Action selection"
(const :tag "output to spam folder and delete" output-and-delete)
(const :tag "delete spam" delete-spam)
))
@@ -218,7 +220,7 @@ for interaction with `rsf-bbdb-auto-delete-spam-entries'")
(defun check-field (field-symbol message-data definition result)
"Check if field-symbol is in `rsf-definitions-alist'.
Capture maybe-spam and this-is-a-spam-email in a cons in result,
-where maybe-spam is in first and this-is-a-spam-email is in rest.
+where maybe-spam is in first and this-is-a-spam-email is in rest.
The values are returned by destructively changing result.
If FIELD-SYMBOL field does not exist AND is not specified,
this may still be spam due to another element...
@@ -259,7 +261,7 @@ it from rmail file. Called for each new message retrieved by
(save-current-msg)
(rsf-saved-bbdb/mail_auto_create_p nil)
)
-
+
;; make sure bbdb does not create entries for messages while spam
;; filter is scanning the rmail file:
(setq rsf-saved-bbdb/mail_auto_create_p 'bbdb/mail_auto_create_p)
@@ -291,7 +293,7 @@ it from rmail file. Called for each new message retrieved by
;;; do we want to ignore case in spam definitions:
(setq case-fold-search rsf-ignore-case)
-
+
;; Check for blind CC condition. Set vars such that while
;; loop will be bypassed and spam condition will trigger
(if (and rsf-no-blind-cc
@@ -339,7 +341,7 @@ it from rmail file. Called for each new message retrieved by
;; start scanning incoming message:
;;---------------------------------
-
+
;; Maybe the different fields should also be done in a
;; loop to make the whole thing more flexible
;; if sender field is not specified in message being
@@ -352,16 +354,16 @@ it from rmail file. Called for each new message retrieved by
;; next, if spam was not ruled out already, check subject:
(check-field 'subject message-subject definition maybe-spam)
;; next, if spam was not ruled out already, check content-type:
- (check-field 'content-type message-content-type
+ (check-field 'content-type message-content-type
definition maybe-spam)
;; next, if spam was not ruled out already, check
;; contents: if contents field is not specified, this may
;; still be spam due to another element...
- (check-field 'contents
+ (check-field 'contents
(buffer-substring
(rmail-msgbeg msg) (rmail-msgend msg))
definition maybe-spam)
-
+
;; if the search in rsf-definitions-alist found
;; that this email is spam, output the email to the spam
;; rmail file, mark the email for deletion, leave the
@@ -378,7 +380,7 @@ it from rmail file. Called for each new message retrieved by
(setq num-element (+ num-element 1)))
)
)
-
+
;; (BK) re-set originally used variables
(setq this-is-a-spam-email (rest maybe-spam)
maybe-spam (first maybe-spam))
@@ -610,9 +612,9 @@ automatically, no user input is required."
(while definitions
(setq current (car definitions))
(setq definitions (cdr definitions))
- (setq result
+ (setq result
(append result
- (list
+ (list
(list (assoc 'from current)
(assoc 'to current)
(assoc 'subject current)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 4b10c937492..b84ea1f34d1 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1,7 +1,7 @@
;;; rmail.el --- main code of "RMAIL" mail reader for Emacs
-;; Copyright (C) 1985,86,87,88,93,94,95,96,97,98,2000,01,2004,2005
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998,
+;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
@@ -42,6 +42,16 @@
(require 'mail-utils)
(eval-when-compile (require 'mule-util)) ; for detect-coding-with-priority
+(defvar deleted-head)
+(defvar font-lock-fontified)
+(defvar mail-abbrev-syntax-table)
+(defvar mail-abbrevs)
+(defvar messages-head)
+(defvar rmail-use-spam-filter)
+(defvar rsf-beep)
+(defvar rsf-sleep-after-message)
+(defvar total-messages)
+
; These variables now declared in paths.el.
;(defvar rmail-spool-directory "/usr/spool/mail/"
; "This is the name of the directory used by the system mailer for\n\
@@ -108,7 +118,7 @@ Please use `rmail-remote-password' instead."
:group 'rmail-obsolete)
(defcustom rmail-pop-password-required nil
- "*Non-nil if a password is required when reading mail from a POP server.
+ "*Non-nil if a password is required when reading mail from a POP server.
Please use rmail-remote-password-required instead."
:type 'boolean
:group 'rmail-obsolete)
@@ -251,21 +261,33 @@ It is useful to set this variable in the site customization file.")
"\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:"
"\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:"
"\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:\\|^face:"
- "\\|^x-mailer:\\|^delivered-to:\\|^lines:\\|^mime-version:"
+ "\\|^x-mailer:\\|^delivered-to:\\|^lines:"
"\\|^content-transfer-encoding:\\|^x-coding-system:"
"\\|^return-path:\\|^errors-to:\\|^return-receipt-to:"
- "\\|^x-sign:\\|^x-beenthere:\\|^x-mailman-version:\\|^x-mailman-copy:"
"\\|^precedence:\\|^list-help:\\|^list-post:\\|^list-subscribe:"
"\\|^list-id:\\|^list-unsubscribe:\\|^list-archive:"
- "\\|^content-type:\\|^content-length:"
- "\\|^x-attribution:\\|^x-disclaimer:\\|^x-trace:"
- "\\|^x-complaints-to:\\|^nntp-posting-date:\\|^user-agent"
- "\\|^importance:\\|^envelope-to:\\|^delivery-date"
- "\\|^x.*-priority:\\|^x-mimeole:\\|^x-archive:"
- "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization\\|^resent-openpgp"
- "\\|^openpgp:\\|^x-request-pgp:\\|^x-original.*:"
- "\\|^x-virus-scanned:\\|^x-spam-[^s].*:")
+ "\\|^content-length:\\|^nntp-posting-date:\\|^user-agent"
+ "\\|^importance:\\|^envelope-to:\\|^delivery-date\\|^openpgp:"
+ "\\|^mbox-line:\\|^cancel-lock:"
+ "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:"
+
+ "\\|^x-.*:")
"*Regexp to match header fields that Rmail should normally hide.
+\(See also `rmail-nonignored-headers', which overrides this regexp.)
+This variable is used for reformatting the message header,
+which normally happens once for each message,
+when you view the message for the first time in Rmail.
+To make a change in this variable take effect
+for a message that you have already viewed,
+go to that message and type \\[rmail-toggle-header] twice."
+ :type 'regexp
+ :group 'rmail-headers)
+
+(defcustom rmail-nonignored-headers "^x-spam-status:"
+ "*Regexp to match X header fields that Rmail should show.
+This regexp overrides `rmail-ignored-headers'; if both this regexp
+and that one match a certain header field, Rmail shows the field.
+
This variable is used for reformatting the message header,
which normally happens once for each message,
when you view the message for the first time in Rmail.
@@ -952,6 +974,7 @@ Note: it means the file has no messages in it.\n\^_")))
(define-key rmail-mode-map "w" 'rmail-output-body-to-file)
(define-key rmail-mode-map "x" 'rmail-expunge)
(define-key rmail-mode-map "." 'rmail-beginning-of-message)
+ (define-key rmail-mode-map "/" 'rmail-end-of-message)
(define-key rmail-mode-map "<" 'rmail-first-message)
(define-key rmail-mode-map ">" 'rmail-last-message)
(define-key rmail-mode-map " " 'scroll-up)
@@ -1096,7 +1119,8 @@ Note: it means the file has no messages in it.\n\^_")))
All normal editing commands are turned off.
Instead, these commands are available:
-\\[rmail-beginning-of-message] Move point to front of this message (same as \\[beginning-of-buffer]).
+\\[rmail-beginning-of-message] Move point to front of this message.
+\\[rmail-end-of-message] Move point to bottom of this message.
\\[scroll-up] Scroll to next screen of this message.
\\[scroll-down] Scroll to previous screen of this message.
\\[rmail-next-undeleted-message] Move to Next non-deleted message.
@@ -1634,7 +1658,7 @@ is non-nil if the user has supplied the password interactively.
(pass (match-string 5 file))
(host (substring file (or (match-end 2)
(+ 3 (match-end 1))))))
-
+
(if (not pass)
(when rmail-remote-password-required
(setq got-password (not (rmail-have-password)))
@@ -1652,19 +1676,19 @@ is non-nil if the user has supplied the password interactively.
(or (string-equal proto "pop") (string-equal proto "imap"))
supplied-password
got-password))))
-
+
((string-match "^po:\\([^:]+\\)\\(:\\(.*\\)\\)?" file)
(let (got-password supplied-password
(proto "pop")
(user (match-string 1 file))
(host (match-string 3 file)))
-
+
(when rmail-remote-password-required
(setq got-password (not (rmail-have-password)))
(setq supplied-password (rmail-get-remote-password nil)))
(list file "pop" supplied-password got-password)))
-
+
(t
(list file nil nil nil))))
@@ -2181,7 +2205,8 @@ If the optional argument IGNORED-HEADERS is non-nil,
delete all header fields whose names match that regexp.
Otherwise, if `rmail-displayed-headers' is non-nil,
delete all header fields *except* those whose names match that regexp.
-Otherwise, delete all header fields whose names match `rmail-ignored-headers'."
+Otherwise, delete all header fields whose names match `rmail-ignored-headers'
+unless they also match `rmail-nonignored-headers'."
(when (search-forward "\n\n" nil t)
(forward-char -1)
(let ((case-fold-search t)
@@ -2205,15 +2230,17 @@ Otherwise, delete all header fields whose names match `rmail-ignored-headers'."
(or ignored-headers (setq ignored-headers rmail-ignored-headers))
(save-restriction
(narrow-to-region (point-min) (point))
+ (goto-char (point-min))
(while (and ignored-headers
- (progn
- (goto-char (point-min))
- (re-search-forward ignored-headers nil t)))
+ (re-search-forward ignored-headers nil t))
(beginning-of-line)
- (delete-region (point)
- (if (re-search-forward "\n[^ \t]" nil t)
- (1- (point))
- (point-max)))))))))
+ (if (looking-at rmail-nonignored-headers)
+ (forward-line 1)
+ (delete-region (point)
+ (save-excursion
+ (if (re-search-forward "\n[^ \t]" nil t)
+ (1- (point))
+ (point-max)))))))))))
(defun rmail-msg-is-pruned ()
(rmail-maybe-set-message-counters)
@@ -2604,7 +2631,19 @@ change the invisible header text."
(defun rmail-beginning-of-message ()
"Show current message starting from the beginning."
(interactive)
- (rmail-show-message rmail-current-message))
+ (let ((rmail-show-message-hook
+ (list (function (lambda ()
+ (goto-char (point-min)))))))
+ (rmail-show-message rmail-current-message)))
+
+(defun rmail-end-of-message ()
+ "Show bottom of current message."
+ (interactive)
+ (let ((rmail-show-message-hook
+ (list (function (lambda ()
+ (goto-char (point-max))
+ (recenter (1- (window-height))))))))
+ (rmail-show-message rmail-current-message)))
(defun rmail-unknown-mail-followup-to ()
"Handle a \"Mail-Followup-To\" header field with an unknown mailing list.
@@ -2614,7 +2653,7 @@ Ask the user whether to add that list name to `mail-mailing-lists'."
(let ((mail-followup-to (mail-fetch-field "mail-followup-to" nil t)))
(when mail-followup-to
(let ((addresses
- (split-string
+ (split-string
(mail-strip-quoted-names mail-followup-to)
",[[:space:]]+" t)))
(dolist (addr addresses)
@@ -3316,10 +3355,10 @@ See also user-option `rmail-confirm-expunge'."
(narrow-to-region (- (buffer-size) omin) (- (buffer-size) omax)))
(if (not dont-show)
(rmail-show-message
- (if (zerop rmail-current-message) 1 nil)
- (if rmail-enable-mime
- (goto-char (+ (point-min) opoint))
- (goto-char (+ (point) opoint))))))))
+ (if (zerop rmail-current-message) 1 nil)))
+ (if rmail-enable-mime
+ (goto-char (+ (point-min) opoint))
+ (goto-char (+ (point) opoint))))))
(defun rmail-expunge ()
"Erase deleted messages from Rmail file and summary buffer."
@@ -3398,18 +3437,11 @@ use \\[mail-yank-original] to yank the original message into it."
(progn (search-forward "\n*** EOOH ***\n")
(beginning-of-line) (point)))))
(setq from (mail-fetch-field "from")
- reply-to (or (if just-sender
- (mail-fetch-field "mail-reply-to" nil t)
- (mail-fetch-field "mail-followup-to" nil t))
+ reply-to (or (mail-fetch-field "mail-reply-to" nil t)
(mail-fetch-field "reply-to" nil t)
from)
- cc (and (not just-sender)
- ;; mail-followup-to, if given, overrides cc.
- (not (mail-fetch-field "mail-followup-to" nil t))
- (mail-fetch-field "cc" nil t))
subject (mail-fetch-field "subject")
date (mail-fetch-field "date")
- to (or (mail-fetch-field "to" nil t) "")
message-id (mail-fetch-field "message-id")
references (mail-fetch-field "references" nil nil t)
resent-reply-to (mail-fetch-field "resent-reply-to" nil t)
@@ -3419,7 +3451,16 @@ use \\[mail-yank-original] to yank the original message into it."
;;; resent-subject (mail-fetch-field "resent-subject")
;;; resent-date (mail-fetch-field "resent-date")
;;; resent-message-id (mail-fetch-field "resent-message-id")
- )))
+ )
+ (unless just-sender
+ (if (mail-fetch-field "mail-followup-to" nil t)
+ ;; If this header field is present, use it instead of the To and CC fields.
+ (setq to (mail-fetch-field "mail-followup-to" nil t))
+ (setq cc (or (mail-fetch-field "cc" nil t) "")
+ to (or (mail-fetch-field "to" nil t) ""))))
+
+ ))
+
;; Merge the resent-to and resent-cc into the to and cc.
(if (and resent-to (not (equal resent-to "")))
(if (not (equal to ""))
@@ -4058,7 +4099,6 @@ encoded string (and the same mask) will decode the string."
;;;; Desktop support
-;;;###autoload
(defun rmail-restore-desktop-buffer (desktop-buffer-file-name
desktop-buffer-name
desktop-buffer-misc)
@@ -4073,6 +4113,9 @@ encoded string (and the same mask) will decode the string."
(kill-buffer (current-buffer))
nil)))
+(add-to-list 'desktop-buffer-mode-handlers
+ '(rmail-mode . rmail-restore-desktop-buffer))
+
(provide 'rmail)
;;; arch-tag: cff0a950-57fe-4f73-a86e-91ff75afd06c
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el
index 40dba181d5c..75de9810a37 100644
--- a/lisp/mail/rmailedit.el
+++ b/lisp/mail/rmailedit.el
@@ -1,6 +1,7 @@
;;; rmailedit.el --- "RMAIL edit mode" Edit the current message
-;; Copyright (C) 1985, 1994, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1994, 2001, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
diff --git a/lisp/mail/rmailkwd.el b/lisp/mail/rmailkwd.el
index fc57b2a4d5e..843c6fc80a3 100644
--- a/lisp/mail/rmailkwd.el
+++ b/lisp/mail/rmailkwd.el
@@ -1,6 +1,7 @@
;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs
-;; Copyright (C) 1985, 1988, 1994, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1988, 1994, 2001, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
@@ -26,6 +27,13 @@
;;; Code:
+(defvar rmail-buffer)
+(defvar rmail-current-message)
+(defvar rmail-last-label)
+(defvar rmail-last-multi-labels)
+(defvar rmail-summary-vector)
+(defvar rmail-total-messages)
+
;; Global to all RMAIL buffers. It exists primarily for the sake of
;; completion. It is better to use strings with the label functions
;; and let them worry about making the label.
diff --git a/lisp/mail/rmailmsc.el b/lisp/mail/rmailmsc.el
index 50626d714ce..26d61b56837 100644
--- a/lisp/mail/rmailmsc.el
+++ b/lisp/mail/rmailmsc.el
@@ -1,6 +1,6 @@
;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader
-;; Copyright (C) 1985 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
@@ -26,6 +26,9 @@
;;; Code:
+(defvar rmail-current-message)
+(defvar rmail-inbox-list)
+
;;;###autoload
(defun set-rmail-inbox-list (file-name)
"Set the inbox list of the current RMAIL file to FILE-NAME.
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index d3baf08c261..a3b46ddaedf 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -1,6 +1,7 @@
;;; rmailout.el --- "RMAIL" mail reader for Emacs: output message to a file
-;; Copyright (C) 1985, 1987, 1993, 1994, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1993, 1994, 2001, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el
index 32188657c44..8bb8ab69278 100644
--- a/lisp/mail/rmailsort.el
+++ b/lisp/mail/rmailsort.el
@@ -1,6 +1,7 @@
;;; rmailsort.el --- Rmail: sort messages
-;; Copyright (C) 1990, 1993, 1994, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1993, 1994, 2001, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp>
;; Maintainer: FSF
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index e3cb4ce1eb8..ad2c275a679 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -1,7 +1,7 @@
;;; rmailsum.el --- make summary buffers for the mail reader
-;; Copyright (C) 1985, 1993, 1994, 1995, 1996, 2000, 2001
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1993, 1994, 1995, 1996, 2000, 2001, 2002, 2003,
+;; 2004, 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
@@ -31,6 +31,8 @@
;;; Code:
+(defvar msgnum)
+
;; For rmail-select-summary
(require 'rmail)
@@ -898,6 +900,7 @@ Search, the `unseen' attribute is restored.")
(define-key rmail-summary-mode-map "x" 'rmail-summary-expunge)
(define-key rmail-summary-mode-map "w" 'rmail-summary-output-body)
(define-key rmail-summary-mode-map "." 'rmail-summary-beginning-of-message)
+ (define-key rmail-summary-mode-map "/" 'rmail-summary-end-of-message)
(define-key rmail-summary-mode-map "<" 'rmail-summary-first-message)
(define-key rmail-summary-mode-map ">" 'rmail-summary-last-message)
(define-key rmail-summary-mode-map " " 'rmail-summary-scroll-msg-up)
@@ -1185,6 +1188,16 @@ move to the previous message."
(defun rmail-summary-beginning-of-message ()
"Show current message from the beginning."
(interactive)
+ (rmail-summary-show-message 'BEG))
+
+(defun rmail-summary-end-of-message ()
+ "Show bottom of current message."
+ (interactive)
+ (rmail-summary-show-message 'END))
+
+(defun rmail-summary-show-message (where)
+ "Show current mail message.
+Position it according to WHERE which can be BEG or END"
(if (and (one-window-p) (not pop-up-frames))
;; If there is just one window, put the summary on the top.
(let ((buffer rmail-view-buffer))
@@ -1196,8 +1209,14 @@ move to the previous message."
(or (eq buffer (window-buffer (next-window (frame-first-window))))
(delete-other-windows)))
(pop-to-buffer rmail-view-buffer))
- (with-no-warnings
- (beginning-of-buffer))
+ (cond
+ ((eq where 'BEG)
+ (goto-char (point-min))
+ (search-forward "\n\n"))
+ ((eq where 'END)
+ (goto-char (point-max))
+ (recenter (1- (window-height))))
+ )
(pop-to-buffer rmail-summary-buffer))
(defun rmail-summary-bury ()
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 337301ebcfa..f2dec757520 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1,7 +1,7 @@
;;; sendmail.el --- mail sending commands for Emacs. -*- byte-compile-dynamic: t -*-
-;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 98, 2000, 2001, 2002, 03, 2004
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1998, 2000,
+;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
@@ -1432,7 +1432,9 @@ and don't delete any header fields."
;; delete that window to save screen space.
;; t means don't alter other frames.
(delete-windows-on original t)
- (insert-buffer original)
+ (with-no-warnings
+ ;; We really want this to set mark.
+ (insert-buffer original))
(set-text-properties (point) (mark t) nil))
(if (consp arg)
nil
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 0c076011044..55a4d060fad 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -1,6 +1,6 @@
;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail
-;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004
+;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp>
@@ -207,7 +207,7 @@ This is relative to `smtpmail-queue-dir'.")
(defvar smtpmail-queue-index (concat smtpmail-queue-dir
smtpmail-queue-index-file))
-(defconst smtpmail-auth-supported '(cram-md5 login)
+(defconst smtpmail-auth-supported '(cram-md5 plain login)
"List of supported SMTP AUTH mechanisms.")
;;;
@@ -559,8 +559,24 @@ This is relative to `smtpmail-queue-dir'.")
(not (integerp (car ret)))
(>= (car ret) 400))
(throw 'done nil)))
+ ((eq mech 'plain)
+ (smtpmail-send-command process "AUTH PLAIN")
+ (if (or (null (car (setq ret (smtpmail-read-response process))))
+ (not (integerp (car ret)))
+ (not (equal (car ret) 334)))
+ (throw 'done nil))
+ (smtpmail-send-command process (base64-encode-string
+ (concat "\0"
+ (smtpmail-cred-user cred)
+ "\0"
+ (smtpmail-cred-passwd cred))))
+ (if (or (null (car (setq ret (smtpmail-read-response process))))
+ (not (integerp (car ret)))
+ (not (equal (car ret) 235)))
+ (throw 'done nil)))
+
(t
- (error "Mechanism %s not implemented" mech)))
+ (error "Mechanism %s not implemented" mech)))
;; Remember the password.
(when (and (not (stringp smtpmail-auth-credentials))
(null (smtpmail-cred-passwd cred)))
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index 5f219510b21..a180c6c67ce 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -1,6 +1,7 @@
;;; supercite.el --- minor mode for citing mail and news replies
-;; Copyright (C) 1993, 1997, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1997, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: 1993 Barry A. Warsaw <bwarsaw@python.org>
;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
@@ -642,8 +643,8 @@ the list should be unique."
(prog1 quit-flag (setq quit-flag nil)))
(progn
(message "%s%s" p (single-key-description event))
- (and (fboundp 'deallocate-event)
- (deallocate-event event))
+ (if (fboundp 'deallocate-event)
+ (deallocate-event event))
(setq quit-flag nil)
(signal 'quit '())))
(let ((char
@@ -658,8 +659,8 @@ the list should be unique."
((setq elt (rassq char alist))
(message "%s%s" p (car elt))
(setq p (cdr elt)))
- ((and (fboundp 'button-release-event-p)
- (button-release-event-p event)) ; ignore them
+ ((if (fboundp 'button-release-event-p)
+ (button-release-event-p event)) ; ignore them
nil)
(t
(message "%s%s" p (single-key-description event))
@@ -669,8 +670,8 @@ the list should be unique."
(discard-input)
(if (eq p prompt)
(setq p (concat "Try again. " prompt)))))))
- (and (fboundp 'deallocate-event)
- (deallocate-event event))
+ (if (fboundp 'deallocate-event)
+ (deallocate-event event))
p))
(defun sc-scan-info-alist (alist)
@@ -1516,7 +1517,8 @@ non-nil."
(progn (forward-line -1)
(or (= (point) (mail-header-end))
(and (eq major-mode 'mh-letter-mode)
- (mh-in-header-p)))))
+ (with-no-warnings
+ (mh-in-header-p))))))
(progn (forward-line)
(let ((kill-lines-magic t))
(kill-line))))))
diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el
index 14e613ac280..07c09765971 100644
--- a/lisp/mail/uce.el
+++ b/lisp/mail/uce.el
@@ -1,6 +1,7 @@
;;; uce.el --- facilitate reply to unsolicited commercial email
-;; Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1998, 2000, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Author: stanislav shalunov <shalunov@mccme.ru>
;; Created: 10 Dec 1996
@@ -114,6 +115,10 @@
;;; Code:
+(defvar gnus-original-article-buffer)
+(defvar mail-reply-buffer)
+(defvar rmail-current-message)
+
(require 'sendmail)
;; Those sections of code which are dependent upon
;; RMAIL are only evaluated if we have received a message with RMAIL...
@@ -283,7 +288,7 @@ address, and postmaster of the mail relay used."
(re-search-forward "^Lines:")
(beginning-of-line))
((eq uce-mail-reader 'rmail)
- (beginning-of-buffer)
+ (goto-char (point-min))
(search-forward "*** EOOH ***\n")
(beginning-of-line)
(forward-line -1)))
@@ -364,11 +369,7 @@ address, and postmaster of the mail relay used."
(if (file-exists-p "~/.signature")
(progn
(insert "\n\n-- \n")
- (insert-file "~/.signature")
- ;; Function insert-file leaves point where it was,
- ;; while we want to place signature in the ``middle''
- ;; of the message.
- (exchange-point-and-mark))))
+ (forward-char (cadr (insert-file-contents "~/.signature"))))))
(uce-signature
(insert "\n\n-- \n" uce-signature)))
;; And text of the original message.
diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el
index b19c9a140dc..5588ecf9108 100644
--- a/lisp/mail/undigest.el
+++ b/lisp/mail/undigest.el
@@ -1,7 +1,7 @@
;;; undigest.el --- digest-cracking support for the RMAIL mail reader
-;; Copyright (C) 1985, 1986, 1994, 1996, 2002
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1994, 1996, 2002, 2003, 2004,
+;; 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el
index bcac0cee0d9..76764d21ed7 100644
--- a/lisp/mail/unrmail.el
+++ b/lisp/mail/unrmail.el
@@ -1,6 +1,6 @@
;;; unrmail.el --- convert Rmail files to mailbox files
-;;; Copyright (C) 1992, 2002 Free Software Foundation, Inc.
+;;; Copyright (C) 1992, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
diff --git a/lisp/mail/vms-pmail.el b/lisp/mail/vms-pmail.el
index 881c4d95a61..b53b32be71a 100644
--- a/lisp/mail/vms-pmail.el
+++ b/lisp/mail/vms-pmail.el
@@ -1,6 +1,6 @@
;;; vms-pmail.el --- use Emacs as the editor within VMS mail
-;; Copyright (C) 1992 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Roland B Roberts <roberts@panix.com>
;; Maintainer: FSF