"\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:"
"\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:"
"\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:"
- "\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:"
+ "\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:\\|^face:"
"\\|^x-mailer:\\|^delivered-to:\\|^lines:\\|^mime-version:"
"\\|^content-transfer-encoding:\\|^x-coding-system:"
"\\|^return-path:\\|^errors-to:\\|^return-receipt-to:"
"\\|^list-id:\\|^list-unsubscribe:\\|^list-archive:"
"\\|^content-type:\\|^content-length:"
"\\|^x-attribution:\\|^x-disclaimer:\\|^x-trace:"
- "\\|^x-complaints-to:\\|^nntp-posting-date:\\|^user-agent:")
+ "\\|^x-complaints-to:\\|^nntp-posting-date:\\|^user-agent"
+ "\\|^importance:\\|^envelope-to:\\|^delivery-date"
+ "\\|^x.*-priority:\\|^x-mimeole:")
"*Regexp to match header fields that Rmail should normally hide.
This variable is used for reformatting the message header,
which normally happens once for each message,
;;;###autoload
(defcustom rmail-primary-inbox-list nil "\
*List of files which are inboxes for user's primary mail file `~/RMAIL'.
-`nil' means the default, which is (\"/usr/spool/mail/$USER\")
+nil means the default, which is (\"/usr/spool/mail/$USER\")
\(the name varies depending on the operating system,
and the value of the environment variable MAIL overrides it)."
;; Don't use backquote here, because we don't want to need it
(defcustom rmail-show-message-hook nil
"List of functions to call when Rmail displays a message."
:type 'hook
- :options '(goto-addr)
+ :options '(goto-address)
:group 'rmail)
;;;###autoload
;; files).
(defvar rmail-mmdf-delim1 "^\001\001\001\001\n"
- "Regexp marking the start of an mmdf message")
+ "Regexp marking the start of an mmdf message.")
(defvar rmail-mmdf-delim2 "^\001\001\001\001\n"
- "Regexp marking the end of an mmdf message")
+ "Regexp marking the end of an mmdf message.")
(defcustom rmail-message-filter nil
"If non-nil, a filter function for new messages in RMAIL.
:group 'rmail
:version "21.1"
:type '(repeat (sexp :tag "Directive")))
-
+
(defvar rmail-reply-prefix "Re: "
"String to prepend to Subject line when replying to a message.")
;;;###autoload
(defvar rmail-insert-mime-forwarded-message-function nil
"Function to insert a message in MIME format so it can be forwarded.
-This function is called if `rmail-enable-mime' or
+This function is called if `rmail-enable-mime' or
`rmail-enable-mime-composing' is non-nil.
It is called with one argument FORWARD-BUFFER, which is a
buffer containing the message to forward. The current buffer
(defvar rmail-search-mime-header-function nil
"Function to check if a regexp matches a header of MIME message.
This function is called if `rmail-enable-mime' is non-nil.
-It is called with four arguments MSG, REGEXP, and LIMIT, where
+It is called with three arguments MSG, REGEXP, and LIMIT, where
MSG is the message number,
REGEXP is the regular expression,
LIMIT is the position specifying the end of header.")
nil)
(defvar rmail-font-lock-keywords
+ ;; These are all matched case-insensitively.
(eval-when-compile
(let* ((cite-chars "[>|}]")
- (cite-prefix "A-Za-z")
+ (cite-prefix "a-z")
(cite-suffix (concat cite-prefix "0-9_.@-`'\"")))
- (list '("^\\(From\\|Sender\\):" . font-lock-function-name-face)
+ (list '("^\\(From\\|Sender\\|Resent-From\\):"
+ . font-lock-function-name-face)
'("^Reply-To:.*$" . font-lock-function-name-face)
'("^Subject:" . font-lock-comment-face)
'("^\\(To\\|Apparently-To\\|Cc\\|Newsgroups\\):"
(beginning-of-line) (end-of-line)
(2 font-lock-constant-face nil t)
(4 font-lock-comment-face nil t)))
- '("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\|Date\\):.*$"
+ '("^\\(X-[a-z0-9-]+\\|In-reply-to\\|Date\\):.*\\(\n[ \t]+.*\\)*$"
. font-lock-string-face))))
"Additional expressions to highlight in Rmail mode.")
;; need code conversion while the buffer is unibyte
;; (i.e. enable-multibyte-characters is nil).
(rmail-enable-multibyte
- (if existed
+ (if existed
(with-current-buffer existed enable-multibyte-characters)
(default-value 'enable-multibyte-characters)))
;; Since the file may contain messages of different encodings
(eq major-mode 'rmail-mode))
(progn (rmail-forget-messages)
(rmail-set-message-counters))))
- (switch-to-buffer
+ (switch-to-buffer
(let ((enable-local-variables nil))
(find-file-noselect file-name))))
(if (eq major-mode 'rmail-edit-mode)
Note: If you are seeing it in rmail,
Note: it means the file has no messages in it.\n\^_")))
-;; Decode Babyl formated part at the head of current buffer by
+;; Decode Babyl formatted part at the head of current buffer by
;; rmail-file-coding-system, or if it is nil, do auto conversion.
(defun rmail-decode-babyl-format ()
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults
'(rmail-font-lock-keywords
- t nil nil nil
+ t t nil nil
(font-lock-maximum-size . nil)
(font-lock-fontify-buffer-function . rmail-fontify-buffer-function)
(font-lock-unfontify-buffer-function . rmail-unfontify-buffer-function)
(if (consp item)
(progn
(setq command
- (rmail-list-to-menu (car item) (cdr item)
- action
+ (rmail-list-to-menu (car item) (cdr item)
+ action
(if full-name
(concat full-name "/"
(car item))
(setq name (car item)))
(progn
(setq name item)
- (setq command
+ (setq command
(list 'lambda () '(interactive)
(list action
- (expand-file-name
+ (expand-file-name
(if full-name
(concat full-name "/" item)
item)
(cons name command)))))
(reverse l))
menu))
-
+
;; This command is always "disabled" when it appears in a menu.
(put 'rmail-disable-menu 'menu-enable ''nil)
(if files
(progn
(define-key rmail-mode-map [menu-bar classify input-menu]
- (cons "Input Rmail File"
- (rmail-list-to-menu "Input Rmail File"
+ (cons "Input Rmail File"
+ (rmail-list-to-menu "Input Rmail File"
files
'rmail-input)))
(define-key rmail-mode-map [menu-bar classify output-menu]
- (cons "Output Rmail File"
- (rmail-list-to-menu "Output Rmail File"
+ (cons "Output Rmail File"
+ (rmail-list-to-menu "Output Rmail File"
files
'rmail-output-to-rmail-file))))
(if rmail-pop-password-required
(progn (setq got-password (not (rmail-have-password)))
(setq password (rmail-get-pop-password))))
- (if (eq system-type 'windows-nt)
+ (if (memq system-type '(windows-nt cygwin))
;; cannot have "po:" in file name
(setq tofile
(expand-file-name
(save-excursion
(setq errors (generate-new-buffer " *rmail loss*"))
(buffer-disable-undo errors)
- (let ((args
- (append
+ (let ((args
+ (append
(list (or rmail-movemail-program
(expand-file-name "movemail"
exec-directory))
nil errors nil)
- (if rmail-preserve-inbox
+ (if rmail-preserve-inbox
(list "-p")
nil)
rmail-movemail-flags
(goto-char (+ header-end size))
(message "Ignoring invalid Content-Length field")
(sit-for 1 0 t)))
- (if (re-search-forward
- (concat "^[\^_]?\\("
- rmail-unix-mail-delimiter
- "\\|"
- rmail-mmdf-delim1 "\\|"
- "^BABYL OPTIONS:\\|"
- "\^L\n[01],\\)") nil t)
+ (if (let ((case-fold-search nil))
+ (re-search-forward
+ (concat "^[\^_]?\\("
+ rmail-unix-mail-delimiter
+ "\\|"
+ rmail-mmdf-delim1 "\\|"
+ "^BABYL OPTIONS:\\|"
+ "\^L\n[01],\\)") nil t))
(goto-char (match-beginning 1))
(goto-char (point-max)))
(setq count (1+ count))
""
(concat
"Date: \\2, \\4 \\3 \\9 \\5 "
-
+
;; The timezone could be matched by group 7 or group 10.
;; If neither of them matched, assume EST, since only
;; Easterners would be so sloppy.
(aset rmail-msgref-vector i (list i))
(setq i (1+ i))))
(message "Counting messages...done")))))
-
+
(defun rmail-set-message-counters-counter (&optional stop)
(let ((start (point))
next)
(goto-char (point-min))
(if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t)
(let ((coding-system (intern (match-string 1))))
- (check-coding-system coding-system)
- (setq buffer-file-coding-system coding-system))
+ (condition-case nil
+ (progn
+ (check-coding-system coding-system)
+ (setq buffer-file-coding-system coding-system))
+ (error
+ (setq buffer-file-coding-system nil))))
(setq buffer-file-coding-system nil)))))
;; Clear the "unseen" attribute when we show a message.
(rmail-set-attribute "unseen" nil)
"Show previous message whether deleted or not.
With prefix arg N, moves backward N messages, or forward if N is negative."
(interactive "p")
- (rmail-next-message (- n)))
+ (rmail-next-message (- n)))
(defun rmail-next-undeleted-message (n)
"Show following non-deleted message.
(forward-line 1))
(setq beg (point))
(narrow-to-region (point) end))
- (progn
+ (progn
(rfc822-goto-eoh)
(setq end (point)))
(setq beg (point))
;; since they can handle the names unstripped.
;; I don't know whether there are other mailers that still
;; need the names to be stripped.
- (mail-strip-quoted-names reply-to)
+;;; (mail-strip-quoted-names reply-to)
+ reply-to
subject
(rmail-make-in-reply-to-field from date message-id)
(if just-sender
(save-excursion
(goto-char (point-min))
(let ((case-fold-search t))
- (if (and content-type
- (string-match
- ";[\n\t ]*boundary=\"?\\([-0-9a-z'()+_,./:=? ]+\\)\"?"
+ (if (and content-type
+ (string-match
+ ";[\n\t ]*boundary=\"?\\([-0-9a-z'()+_,./:=? ]+\\)\"?"
content-type))
;; Handle a MIME multipart bounce message.
(let ((codestring
(concat "\n--"
- (substring content-type (match-beginning 1)
+ (substring content-type (match-beginning 1)
(match-end 1)))))
(unless (re-search-forward mail-mime-unsent-header nil t)
(error "Cannot find beginning of header in failed message"))
(setq window (get-buffer-window rmail-summary-buffer))
;; Don't try to change the size if just one window in frame.
(not (eq window (frame-root-window (window-frame window))))
- (unwind-protect
+ (unwind-protect
(progn
(select-window window)
(enlarge-window (- rmail-summary-window-size (window-height))))
(eval-when-compile (require 'speedbar))
(defvar rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$"
- "*This regex us used to match folder names to be displayed in speedbar.
+ "*This regex is used to match folder names to be displayed in speedbar.
Enabling this will permit speedbar to display your folders for easy
browsing, and moving of messages.")
"Set PASSWORD to be used for retrieving mail from a POP server."
(interactive "sPassword: ")
(if password
- (setq rmail-encoded-pop-password
+ (setq rmail-encoded-pop-password
(rmail-encode-string password (emacs-pid)))
(setq rmail-pop-password nil)
(setq rmail-encoded-pop-password nil)))
Returns the encoded string. Calling the function again with an
encoded string (and the same mask) will decode the string."
(setq mask (abs mask)) ; doesn't work if negative
- (let* ((string-vector (string-to-vector string)) (i 0)
+ (let* ((string-vector (string-to-vector string)) (i 0)
(len (length string-vector)) (curmask mask) charmask)
(while (< i len)
(if (= curmask 0)