• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/mail/

Lines Matching +defs:message +defs:mode

31 ;;   New features include attribute and keyword support, message
52 (defvar rsf-sleep-after-message)
95 "Output message to a file."
244 *A regexp specifying addresses to prune from a reply message.
263 "\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:"
278 This variable is used for reformatting the message header,
279 which normally happens once for each message,
280 when you view the message for the first time in Rmail.
282 for a message that you have already viewed,
283 go to that message and type \\[rmail-toggle-header] twice."
292 This variable is used for reformatting the message header,
293 which normally happens once for each message,
294 when you view the message for the first time in Rmail.
296 for a message that you have already viewed,
297 go to that message and type \\[rmail-toggle-header] twice."
311 *Headers that should be stripped when retrying a failed message."
338 *Non-nil means automatically delete a message that is copied to a file."
387 (defvar rmail-mode-hook nil
395 (defcustom rmail-show-message-hook nil
396 "List of functions to call when Rmail displays a message."
406 (defvar rmail-delete-message-hook nil
407 "List of functions to call when Rmail deletes a message.
408 When the hooks are called, the message has been marked deleted but is
409 still the current message in the Rmail buffer.")
416 "Regexp marking the start of an mmdf message.")
418 "Regexp marking the end of an mmdf message.")
420 (defcustom rmail-message-filter nil
422 Called with region narrowed to the message, including headers,
428 "List of directives specifying where to put a message.
434 message. If any of the field regexp's are nil, then it is ignored.
439 FIELD is the plain text name of a field in the message, such as
454 "String to prepend to Subject line when replying to a message.")
483 (defvar rmail-current-message nil)
484 (put 'rmail-current-message 'permanent-local t)
489 (defvar rmail-message-vector nil)
490 (put 'rmail-message-vector 'permanent-local t)
498 by substituting the new message number into the existing list.")
512 "Buffer which holds RMAIL message for MIME displaying.")
553 If the value is t, RMAIL automatically shows MIME decoded message.
554 If the value is neither t nor nil, RMAIL does not show MIME decoded message
566 "*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to forward.")
570 "Function to show MIME decoded message of RMAIL file.
575 (defvar rmail-insert-mime-forwarded-message-function nil
576 "Function to insert a message in MIME format so it can be forwarded.
580 buffer containing the message to forward. The current buffer
584 (defvar rmail-insert-mime-resent-message-function nil
585 "Function to insert a message in MIME format so it can be resent.
588 buffer containing the message to forward. The current buffer
592 (defvar rmail-search-mime-message-function nil
593 "Function to check if a regexp matches a MIME message.
596 MSG is the message number, REGEXP is the regular expression.")
600 "Function to check if a regexp matches a header of MIME message.
603 MSG is the message number,
618 "*Non-nil means a message is decoded by MIME's charset specification.
619 If this variable is nil, or the message has not MIME specification,
620 the message is decoded as normal way.
631 "Regexp to match MIME-charset specification in a header of message.
670 ;; The time the message was sent.
716 "Additional expressions to highlight in Rmail mode.")
774 Type \\[describe-mode] once editing that file, for a list of RMAIL commands.
805 ;; and the file was reverted, recompute the message-data.
807 ;; but that should not be needed now that rmail-mode
815 (eq major-mode 'rmail-mode))
817 (rmail-set-message-counters))))
821 (if (eq major-mode 'rmail-edit-mode)
822 (error "Exit Rmail Edit mode before getting new mail"))
824 ;; Buffer not new and not empty; ensure in proper mode, but that's all.
825 (or (eq major-mode 'rmail-mode)
826 (progn (rmail-mode-2)
829 (rmail-mode-2)
839 (rmail-maybe-set-message-counters)
843 (rmail-show-message (rmail-first-unseen-message)))
848 (run-hooks 'rmail-mode-hook))))))
874 ;; convert it to one, by adding a header and converting each message.
899 (message "Converting to Babyl format...")
907 (message "Converting to Babyl format...done"))
961 (defvar rmail-mode-map nil)
962 (if rmail-mode-map
964 (setq rmail-mode-map (make-keymap))
965 (suppress-keymap rmail-mode-map)
966 (define-key rmail-mode-map "a" 'rmail-add-label)
967 (define-key rmail-mode-map "b" 'rmail-bury)
968 (define-key rmail-mode-map "c" 'rmail-continue)
969 (define-key rmail-mode-map "d" 'rmail-delete-forward)
970 (define-key rmail-mode-map "\C-d" 'rmail-delete-backward)
971 (define-key rmail-mode-map "e" 'rmail-edit-current-message)
972 (define-key rmail-mode-map "f" 'rmail-forward)
973 (define-key rmail-mode-map "g" 'rmail-get-new-mail)
974 (define-key rmail-mode-map "h" 'rmail-summary)
975 (define-key rmail-mode-map "i" 'rmail-input)
976 (define-key rmail-mode-map "j" 'rmail-show-message)
977 (define-key rmail-mode-map "k" 'rmail-kill-label)
978 (define-key rmail-mode-map "l" 'rmail-summary-by-labels)
979 (define-key rmail-mode-map "\e\C-h" 'rmail-summary)
980 (define-key rmail-mode-map "\e\C-l" 'rmail-summary-by-labels)
981 (define-key rmail-mode-map "\e\C-r" 'rmail-summary-by-recipients)
982 (define-key rmail-mode-map "\e\C-s" 'rmail-summary-by-regexp)
983 (define-key rmail-mode-map "\e\C-t" 'rmail-summary-by-topic)
984 (define-key rmail-mode-map "m" 'rmail-mail)
985 (define-key rmail-mode-map "\em" 'rmail-retry-failure)
986 (define-key rmail-mode-map "n" 'rmail-next-undeleted-message)
987 (define-key rmail-mode-map "\en" 'rmail-next-message)
988 (define-key rmail-mode-map "\e\C-n" 'rmail-next-labeled-message)
989 (define-key rmail-mode-map "o" 'rmail-output-to-rmail-file)
990 (define-key rmail-mode-map "\C-o" 'rmail-output)
991 (define-key rmail-mode-map "p" 'rmail-previous-undeleted-message)
992 (define-key rmail-mode-map "\ep" 'rmail-previous-message)
993 (define-key rmail-mode-map "\e\C-p" 'rmail-previous-labeled-message)
994 (define-key rmail-mode-map "q" 'rmail-quit)
995 (define-key rmail-mode-map "r" 'rmail-reply)
997 ;; (define-key rmail-mode-map "\er" 'rmail-search-backwards)
998 (define-key rmail-mode-map "s" 'rmail-expunge-and-save)
999 (define-key rmail-mode-map "\es" 'rmail-search)
1000 (define-key rmail-mode-map "t" 'rmail-toggle-header)
1001 (define-key rmail-mode-map "u" 'rmail-undelete-previous-message)
1002 (define-key rmail-mode-map "w" 'rmail-output-body-to-file)
1003 (define-key rmail-mode-map "x" 'rmail-expunge)
1004 (define-key rmail-mode-map "." 'rmail-beginning-of-message)
1005 (define-key rmail-mode-map "/" 'rmail-end-of-message)
1006 (define-key rmail-mode-map "<" 'rmail-first-message)
1007 (define-key rmail-mode-map ">" 'rmail-last-message)
1008 (define-key rmail-mode-map " " 'scroll-up)
1009 (define-key rmail-mode-map "\177" 'scroll-down)
1010 (define-key rmail-mode-map "?" 'describe-mode)
1011 (define-key rmail-mode-map "\C-c\C-s\C-d" 'rmail-sort-by-date)
1012 (define-key rmail-mode-map "\C-c\C-s\C-s" 'rmail-sort-by-subject)
1013 (define-key rmail-mode-map "\C-c\C-s\C-a" 'rmail-sort-by-author)
1014 (define-key rmail-mode-map "\C-c\C-s\C-r" 'rmail-sort-by-recipient)
1015 (define-key rmail-mode-map "\C-c\C-s\C-c" 'rmail-sort-by-correspondent)
1016 (define-key rmail-mode-map "\C-c\C-s\C-l" 'rmail-sort-by-lines)
1017 (define-key rmail-mode-map "\C-c\C-s\C-k" 'rmail-sort-by-labels)
1018 (define-key rmail-mode-map "\C-c\C-n" 'rmail-next-same-subject)
1019 (define-key rmail-mode-map "\C-c\C-p" 'rmail-previous-same-subject)
1023 (define-key rmail-mode-map [menu-bar] (make-sparse-keymap))
1025 (define-key rmail-mode-map [menu-bar classify]
1028 (define-key rmail-mode-map [menu-bar classify input-menu]
1031 (define-key rmail-mode-map [menu-bar classify output-menu]
1034 (define-key rmail-mode-map [menu-bar classify output-body]
1037 (define-key rmail-mode-map [menu-bar classify output-inbox]
1040 (define-key rmail-mode-map [menu-bar classify output]
1043 (define-key rmail-mode-map [menu-bar classify kill-label]
1046 (define-key rmail-mode-map [menu-bar classify add-label]
1049 (define-key rmail-mode-map [menu-bar summary]
1052 (define-key rmail-mode-map [menu-bar summary senders]
1055 (define-key rmail-mode-map [menu-bar summary labels]
1058 (define-key rmail-mode-map [menu-bar summary recipients]
1061 (define-key rmail-mode-map [menu-bar summary topic]
1064 (define-key rmail-mode-map [menu-bar summary regexp]
1067 (define-key rmail-mode-map [menu-bar summary all]
1070 (define-key rmail-mode-map [menu-bar mail]
1073 (define-key rmail-mode-map [menu-bar mail rmail-get-new-mail]
1076 (define-key rmail-mode-map [menu-bar mail lambda]
1079 (define-key rmail-mode-map [menu-bar mail continue]
1082 (define-key rmail-mode-map [menu-bar mail resend]
1085 (define-key rmail-mode-map [menu-bar mail forward]
1088 (define-key rmail-mode-map [menu-bar mail retry]
1091 (define-key rmail-mode-map [menu-bar mail reply]
1094 (define-key rmail-mode-map [menu-bar mail mail]
1097 (define-key rmail-mode-map [menu-bar delete]
1100 (define-key rmail-mode-map [menu-bar delete expunge/save]
1103 (define-key rmail-mode-map [menu-bar delete expunge]
1106 (define-key rmail-mode-map [menu-bar delete undelete]
1107 '("Undelete" . rmail-undelete-previous-message))
1109 (define-key rmail-mode-map [menu-bar delete delete]
1112 (define-key rmail-mode-map [menu-bar move]
1115 (define-key rmail-mode-map [menu-bar move search-back]
1118 (define-key rmail-mode-map [menu-bar move search]
1121 (define-key rmail-mode-map [menu-bar move previous]
1122 '("Previous Nondeleted" . rmail-previous-undeleted-message))
1124 (define-key rmail-mode-map [menu-bar move next]
1125 '("Next Nondeleted" . rmail-next-undeleted-message))
1127 (define-key rmail-mode-map [menu-bar move last]
1128 '("Last" . rmail-last-message))
1130 (define-key rmail-mode-map [menu-bar move first]
1131 '("First" . rmail-first-message))
1133 (define-key rmail-mode-map [menu-bar move previous]
1134 '("Previous" . rmail-previous-message))
1136 (define-key rmail-mode-map [menu-bar move next]
1137 '("Next" . rmail-next-message))
1144 map rmail-mode-map)
1145 (tool-bar-local-item-from-menu 'rmail-next-undeleted-message "right-arrow"
1146 map rmail-mode-map)
1147 (tool-bar-local-item-from-menu 'rmail-previous-undeleted-message "left-arrow"
1148 map rmail-mode-map)
1150 map rmail-mode-map)
1152 map rmail-mode-map)
1154 map rmail-mode-map)
1156 map rmail-mode-map)
1158 map rmail-mode-map)
1160 map rmail-mode-map)
1162 map rmail-mode-map)
1164 map rmail-mode-map)
1166 map rmail-mode-map)
1172 ;; Rmail mode is suitable only for specially formatted data.
1173 (put 'rmail-mode 'mode-class 'special)
1175 (defun rmail-mode-kill-summary ()
1179 (defun rmail-mode ()
1180 "Rmail Mode is used by \\<rmail-mode-map>\\[rmail] for editing Rmail files.
1184 \\[rmail-beginning-of-message] Move point to front of this message.
1185 \\[rmail-end-of-message] Move point to bottom of this message.
1186 \\[scroll-up] Scroll to next screen of this message.
1187 \\[scroll-down] Scroll to previous screen of this message.
1188 \\[rmail-next-undeleted-message] Move to Next non-deleted message.
1189 \\[rmail-previous-undeleted-message] Move to Previous non-deleted message.
1190 \\[rmail-next-message] Move to Next message whether deleted or not.
1191 \\[rmail-previous-message] Move to Previous message whether deleted or not.
1192 \\[rmail-first-message] Move to the first message in Rmail file.
1193 \\[rmail-last-message] Move to the last message in Rmail file.
1194 \\[rmail-show-message] Jump to message specified by numeric position in file.
1195 \\[rmail-search] Search for string and show message it is found in.
1196 \\[rmail-delete-forward] Delete this message, move to next nondeleted.
1197 \\[rmail-delete-backward] Delete this message, move to previous nondeleted.
1198 \\[rmail-undelete-previous-message] Undelete message. Tries current message, then earlier messages
1199 till a deleted message is found.
1200 \\[rmail-edit-current-message] Edit the current message. \\[rmail-cease-edit] to return to Rmail.
1206 \\[rmail-mail] Mail a message (same as \\[mail-other-window]).
1207 \\[rmail-continue] Continue composing outgoing message started before.
1208 \\[rmail-reply] Reply to this message. Like \\[rmail-mail] but initializes some fields.
1209 \\[rmail-retry-failure] Send this message again. Used on a mailer failure message.
1210 \\[rmail-forward] Forward this message to another user.
1211 \\[rmail-output-to-rmail-file] Output this message to an Rmail file (append it).
1212 \\[rmail-output] Output this message to a Unix-format mail file (append it).
1213 \\[rmail-output-body-to-file] Save message body to a file. Default filename comes from Subject line.
1215 \\[rmail-add-label] Add label to message. It will be displayed in the mode line.
1216 \\[rmail-kill-label] Kill label. Remove a label from current message.
1217 \\[rmail-next-labeled-message] Move to Next message with specified label
1221 \\[rmail-previous-labeled-message] Move to Previous message with specified label
1222 \\[rmail-summary] Show headers buffer, with a one line summary of each message.
1229 (let ((finding-rmail-file (not (eq major-mode 'rmail-mode))))
1230 (rmail-mode-2)
1239 (rmail-set-message-counters)
1240 (rmail-show-message rmail-total-messages)
1245 (run-mode-hooks 'rmail-mode-hook)))
1247 (defun rmail-mode-2 ()
1249 (rmail-mode-1)
1253 (defun rmail-mode-1 ()
1254 (setq major-mode 'rmail-mode)
1255 (setq mode-name "RMAIL")
1260 ;; The one exception is when messages are copied into an Rmail mode buffer.
1263 (setq mode-line-modified "--")
1264 (use-local-map rmail-mode-map)
1265 (set-syntax-table text-mode-syntax-table)
1266 (setq local-abbrev-table text-mode-abbrev-table))
1279 (make-local-variable 'rmail-current-message)
1283 (make-local-variable 'rmail-message-vector)
1302 ;; Set up the non-permanent locals associated with Rmail mode.
1307 ;; because it should be determined in rmail-show-message.
1311 ;; Don't let a local variables list in a message cause confusion.
1323 (font-lock-inhibit-thing-lock . (lazy-lock-mode fast-lock-mode))))
1329 (add-hook 'kill-buffer-hook 'rmail-mode-kill-summary)
1335 ;; Handle M-x revert-buffer done in an rmail-mode buffer.
1348 (rmail-mode-2)
1357 (rmail-set-message-counters)
1358 (rmail-show-message rmail-total-messages)
1359 (run-hooks 'rmail-mode-hook)))))
1424 (defun rmail-duplicate-message ()
1425 "Create a duplicated copy of the current message.
1431 (number rmail-current-message)
1432 (string (buffer-substring (rmail-msgbeg rmail-current-message)
1433 (rmail-msgend rmail-current-message))))
1434 (goto-char (rmail-msgend rmail-current-message))
1437 (rmail-show-message number)
1438 (message "Message duplicated")))
1498 (define-key rmail-mode-map [menu-bar classify input-menu]
1503 (define-key rmail-mode-map [menu-bar classify output-menu]
1509 (define-key rmail-mode-map [menu-bar classify input-menu]
1511 (define-key rmail-mode-map [menu-bar classify output-menu]
1547 (rmail-maybe-set-message-counters)
1600 ;; Scan the new text and convert each message to babyl format.
1643 (message "(No new mail has arrived)")))
1649 (rsf-scanned-message-number (1+ old-messages))
1659 (while (<= rsf-scanned-message-number
1662 (if (not (rmail-spam-filter rsf-scanned-message-number))
1665 (setq rsf-scanned-message-number (1+ rsf-scanned-message-number))
1681 (message "%d new message%s read%s"
1683 ;; print out a message on number of spam messages found:
1701 (sleep-for rsf-sleep-after-message)))
1703 ;; Move to the first new message
1705 (rmail-show-message (rmail-first-unseen-message))
1710 (or found (rmail-show-message)))))
1808 (message "Getting mail from the remote server ..."))
1811 (message "Getting mail from %s..." tofile))
1814 (message "Getting mail from %s..." file)))
1869 (message "movemail: %s"
1890 (message "")
1916 (message "Invalid Babyl format in inbox!")
1918 ;; Try to get back in sync with a real message.
1933 ;; Babyl format message
1939 ;; at the end of the message.
1971 "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
1981 (message "Malformed MIME quoted-printable message"))
2032 (message "Converting to Babyl format...%d" count)))
2059 (message "Converting to Babyl format...%d" count)))
2064 ;; If this message has a Content-Length field,
2080 "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
2114 (message "Ignoring invalid Content-Length field")
2131 (message "Malformed MIME quoted-printable message"))
2190 (message "Converting to Babyl format...%d" count)))
2257 (defun rmail-reformat-message (beg end)
2279 (if rmail-message-filter (funcall rmail-message-filter))
2327 (rmail-maybe-set-message-counters)
2329 (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
2341 (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
2373 (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
2374 (rmail-reformat-message (point-min) (point-max)))
2379 "Show original message header if pruned header currently shown, or vice versa.
2380 With argument ARG, show the message header pruned if ARG is greater than zero;
2391 (rmail-maybe-set-message-counters)
2432 "Narrow to the whole (original) header of the current message."
2434 (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
2462 ;; Make a string describing current message's attributes and keywords
2463 ;; and set it up as the name of a minor mode
2464 ;; so it will appear in the mode line.
2471 (goto-char (rmail-msgbeg rmail-current-message))
2506 (setq mode-line-process
2508 rmail-current-message rmail-total-messages blurb))
2510 ;; `mode-line-process' of rmail-view-buffer too.
2514 (let ((mlp mode-line-process))
2516 (setq mode-line-process mlp))))))
2518 ;; Turn an attribute of a message on or off according to STATE.
2520 ;; MSGNUM is message number to change; nil means current message.
2526 (or msgnum (setq msgnum rmail-current-message))
2543 (rmail-set-message-deleted-p msgnum state)))
2550 (if (= msgnum rmail-current-message)
2555 (defun rmail-message-labels-p (msg labels)
2567 (marker-position (aref rmail-message-vector (1+ n))))
2570 (marker-position (aref rmail-message-vector n)))
2573 "Call FUNCTION with point at start of internal data of current message.
2574 Assumes that bounds were previously narrowed to display the message in Rmail.
2578 FUNCTION may not change the visible text of the message, but it may
2583 (narrow-to-region (rmail-msgbeg rmail-current-message)
2590 (narrow-to-region (rmail-msgbeg rmail-current-message)
2591 (rmail-msgend rmail-current-message)))))
2595 (if (vectorp rmail-message-vector)
2597 (v rmail-message-vector)
2602 (setq rmail-message-vector nil)
2606 (defun rmail-maybe-set-message-counters ()
2608 rmail-message-vector
2609 rmail-current-message
2611 (rmail-set-message-counters)))
2618 (or nomsg (message "Counting new messages..."))
2621 ;; the entry for message N+1, which marks
2622 ;; the end of message N. (N = number of messages).
2626 (rmail-set-message-counters-counter (point-min))
2627 (setq rmail-current-message (1+ rmail-total-messages))
2630 (setq rmail-message-vector
2631 (vconcat rmail-message-vector (cdr messages-head)))
2632 (aset rmail-message-vector
2633 rmail-current-message (car messages-head))
2646 (or nomsg (message "Counting new messages...done (%d)" total-messages))))
2648 (defun rmail-set-message-counters ()
2659 (message "Counting messages...")
2662 ;; the entry for message N+1, which marks
2663 ;; the end of message N. (N = number of messages).
2667 (rmail-set-message-counters-counter (min (point) point-save))
2669 (rmail-set-message-counters-counter)
2671 (setq rmail-current-message
2674 (setq rmail-message-vector
2683 (message "Counting messages...done")))))
2685 (defun rmail-set-message-counters-counter (&optional stop)
2695 (message "Counting messages...(converting line endings)")
2712 (message "Counting messages...%d" total-messages)))))
2714 (defun rmail-beginning-of-message ()
2715 "Show current message starting from the beginning."
2717 (let ((rmail-show-message-hook
2720 (rmail-show-message rmail-current-message)))
2722 (defun rmail-end-of-message ()
2723 "Show bottom of current message."
2725 (let ((rmail-show-message-hook
2729 (rmail-show-message rmail-current-message)))
2764 (defun rmail-show-message (&optional n no-summary)
2765 "Show message number N (prefix argument), counting from start of file.
2766 If summary buffer is currently displayed, update current message there also."
2768 (or (eq major-mode 'rmail-mode)
2770 (rmail-maybe-set-message-counters)
2775 (setq mode-line-process nil))
2778 (setq n rmail-current-message)
2781 rmail-current-message 1
2782 blurb "No previous message"))
2785 rmail-current-message rmail-total-messages
2786 blurb "No following message"))
2788 (setq rmail-current-message n))))
2815 ;; Clear the "unseen" attribute when we show a message.
2820 (rmail-reformat-message beg end)
2836 (if transient-mark-mode (deactivate-mark))
2837 (run-hooks 'rmail-show-message-hook)
2838 ;; If there is a summary buffer, try to move to this message
2839 ;; in that buffer. But don't complain if this message
2844 (let ((curr-msg rmail-current-message))
2850 (message blurb))))))
2853 "Decode the body of the current message using coding system CODING.
2857 This function assumes that the current message is already decoded
2859 decode it was incorrect. It then encodes the message back to its
2862 Optional argument RAW, if non-nil, means don't encode the message
2864 message text was produced by some function which invokes `insert',
2873 encodings in the message, this function might fail because the escape
2878 (interactive "zCoding system for re-decoding this message: ")
2880 (or (eq major-mode 'rmail-mode)
2886 (let ((msgbeg (rmail-msgbeg rmail-current-message))
2887 (msgend (rmail-msgend rmail-current-message))
2889 ;; We need the message headers pruned (we later restore
2946 (rmail-show-message))
2995 "Automatically move a message into a sub-folder based on criteria.
2996 Called when a new message is displayed."
2997 (if (or (rmail-message-labels-p rmail-current-message "filed")
3025 (rmail-delete-message)
3030 (defun rmail-next-message (n)
3031 "Show following message whether deleted or not.
3035 (rmail-maybe-set-message-counters)
3036 (rmail-show-message (+ rmail-current-message n)))
3038 (defun rmail-previous-message (n)
3039 "Show previous message whether deleted or not.
3042 (rmail-next-message (- n)))
3044 (defun rmail-next-undeleted-message (n)
3045 "Show following non-deleted message.
3049 Returns t if a new message is being shown, nil otherwise."
3052 (rmail-maybe-set-message-counters)
3053 (let ((lastwin rmail-current-message)
3054 (current rmail-current-message))
3057 (if (not (rmail-message-deleted-p current))
3061 (if (not (rmail-message-deleted-p current))
3063 (if (/= lastwin rmail-current-message)
3064 (progn (rmail-show-message lastwin)
3067 (message "No previous nondeleted message"))
3069 (message "No following nondeleted message"))
3072 (defun rmail-previous-undeleted-message (n)
3073 "Show previous non-deleted message.
3077 (rmail-next-undeleted-message (- n)))
3079 (defun rmail-first-message ()
3080 "Show first message in file."
3082 (rmail-maybe-set-message-counters)
3083 (rmail-show-message 1))
3085 (defun rmail-last-message ()
3086 "Show last message in file."
3088 (rmail-maybe-set-message-counters)
3089 (rmail-show-message rmail-total-messages))
3091 (defun rmail-what-message ()
3103 (defun rmail-message-recipients-p (msg recipients &optional primary-only)
3113 (defun rmail-message-regexp-p (n regexp)
3114 "Return t, if for message number N, regexp REGEXP matches in the header."
3140 (defun rmail-search-message (msg regexp)
3141 "Return non-nil, if for message number MSG, regexp REGEXP matches."
3144 (funcall rmail-search-mime-message-function msg regexp)
3149 "Show message containing next match for REGEXP (but not the current msg).
3172 (message "%sRmail search for %s..."
3176 (rmail-maybe-set-message-counters)
3182 (msg rmail-current-message))
3187 ;; Check messages one by one, advancing message number up or down
3188 ;; but searching forward through each message.
3192 win (rmail-search-message msg regexp)))
3195 win (rmail-search-message msg regexp))))
3199 (rmail-show-message msg)
3201 ;; (if this is a reverse search) through this message to
3203 ;; was found in the hidden portion of this message. In
3212 (message "%sRmail search for %s...done"
3218 (message "Search failed: %s" regexp)))))
3221 "Show message containing previous match for REGEXP.
3245 ;; Show the first message which has the `unseen' attribute.
3246 (defun rmail-first-unseen-message ()
3247 (rmail-maybe-set-message-counters)
3253 (if (rmail-message-labels-p current ", ?\\(unseen\\),")
3256 ;; Let the caller show the message.
3258 ;; (rmail-show-message found))
3298 "Go to the next mail message having the same subject header.
3304 (i rmail-current-message)
3330 (rmail-show-message found)
3331 (error "No %s message with same subject"
3335 "Go to the previous mail message having the same subject header.
3344 (defun rmail-message-deleted-p (n)
3347 (defun rmail-set-message-deleted-p (n state)
3350 (defun rmail-delete-message ()
3351 "Delete this message and stay on it."
3354 (run-hooks 'rmail-delete-message-hook))
3356 (defun rmail-undelete-previous-message ()
3357 "Back up to deleted message, select it, and undelete it."
3360 (let ((msg rmail-current-message))
3362 (not (rmail-message-deleted-p msg)))
3365 (error "No previous deleted message")
3366 (if (/= msg rmail-current-message)
3367 (rmail-show-message msg))
3376 "Delete this message and move to next nondeleted one.
3380 Returns t if a new message is displayed after the delete, or nil otherwise."
3383 (run-hooks 'rmail-delete-message-hook)
3384 (let ((del-msg rmail-current-message))
3388 (prog1 (rmail-next-undeleted-message (if backward -1 1))
3392 "Delete this message and move to previous nondeleted one.
3397 ;; Compute the message number a given message would have after expunging.
3398 ;; The present number of the message is OLDNUM.
3400 ;; The value is nil for a message that would be deleted.
3413 "Return t if deleted message should be expunged. If necessary, ask the user.
3426 (message "Expunging deleted messages...")
3430 (rmail-maybe-set-message-counters)
3433 (opoint (if (and (> rmail-current-message 0)
3434 (rmail-message-deleted-p rmail-current-message))
3440 (messages-head (cons (aref rmail-message-vector 0) nil))
3452 (new-message-number rmail-current-message)
3457 (messages rmail-message-vector)
3461 rmail-current-message nil
3462 rmail-message-vector nil
3473 (if (> new-message-number counter)
3474 (setq new-message-number (1- new-message-number))))
3487 (message "Expunging deleted messages...%d" number)))
3491 (setq rmail-current-message new-message-number
3493 rmail-message-vector (apply 'vector messages-head)
3498 (message "Expunging deleted messages...done")
3502 (rmail-show-message
3503 (if (zerop rmail-current-message) 1 nil)))
3545 While composing the message, use \\[mail-yank-original] to yank the
3546 original message into it."
3551 "Continue composing outgoing message previously being composed."
3556 "Reply to the current message.
3557 Normally include CC: to all other recipients of original message;
3559 use \\[mail-yank-original] to yank the original message into it."
3561 (let (from reply-to cc subject date to message-id references
3563 (msgnum rmail-current-message))
3573 (goto-char (rmail-msgbeg rmail-current-message))
3579 (progn (search-forward "\n\n" (rmail-msgend rmail-current-message)
3591 message-id (mail-fetch-field "message-id")
3599 ;;; resent-message-id (mail-fetch-field "resent-message-id")
3640 (rmail-make-in-reply-to-field from date message-id)
3650 (list (list 'rmail-mark-message
3657 " " message-id))))))
3659 (defun rmail-mark-message (buffer msgnum-list attribute)
3660 "Give BUFFER's message number in MSGNUM-LIST the attribute ATTRIBUTE.
3661 This is use in the send-actions for message buffers.
3669 (defun rmail-make-in-reply-to-field (from date message-id)
3671 (if message-id
3672 message-id
3677 (if message-id
3684 message-id))
3686 message-id
3687 (concat message-id " (" tem ")"))
3695 (concat field "'s message of " date)
3718 (if date (setq field (concat "message from " field " on " date)))
3719 (if message-id
3720 ;; "<AA259@bar.edu> (message from Unix Loser on 1-Apr-89)"
3721 (concat message-id " (" field ")")
3726 (rmail-make-in-reply-to-field from date message-id)))))
3730 "Forward the current message to another user.
3731 With prefix argument, \"resend\" the message instead of forwarding it;
3737 (msgnum rmail-current-message)
3748 (list (list 'rmail-mark-message
3763 (funcall rmail-insert-mime-forwarded-message-function
3765 (insert "------- Start of forwarded message -------\n")
3782 (insert "------- End of forwarded message -------\n"))
3787 "Resend current message to ADDRESSES.
3791 Optional FROM is the address to resend the message from, and
3793 Optional COMMENT is a string to insert as a comment in the resent message.
3810 ;;>> Copy message into temp buffer
3812 (funcall rmail-insert-mime-resent-message-function mailbuf)
3872 ;; of the original message.
3877 (rmail-set-attribute "resent" t rmail-current-message))))
3881 (concat "^ *---+ +Unsent message follows +---+ *$\\|"
3882 "^ *---+ +Returned message +---+ *$\\|"
3884 "^Start of returned message$\\|"
3885 "^---+ Below this line is a copy of the message.$\\|"
3886 "^ *---+ +Original message +---+ *$\\|"
3887 "^ *--+ +begin message +--+ *$\\|"
3888 "^ *---+ +Original message follows +---+ *$\\|"
3889 "^ *---+ +Your message follows +---+ *$\\|"
3891 "^ *---+ +This is a copy of \\w+ message, including all the headers.*---+ *$")
3892 "A regexp that matches the separator before the text of a failed message.")
3894 (defvar mail-mime-unsent-header "^Content-Type: message/rfc822 *$"
3895 "A regexp that matches the header of a MIME body part with a failed message.")
3898 "Edit a mail message which is based on the contents of the current message.
3899 For a message rejected by the mail system, extract the interesting headers and
3900 the body of the original message.
3901 If the failed message is a MIME multipart message, it is searched for a
3904 delimits the returned original message.
3906 specifying headers which should not be copied into the new message."
3910 (msgnum rmail-current-message)
3912 ;; Fetch any content-type header in current message
3926 ;; Handle a MIME multipart bounce message.
3932 (error "Cannot find beginning of header in failed message"))
3934 (error "Cannot find start of Mime data in failed message"))
3941 (error "Cannot parse this as a failure message"))
3943 ;; Support a style of failure message in which the original
3944 ;; message is indented, and included within lines saying
3945 ;; `Start of returned message' and `End of returned message'.
3952 (re-search-backward "^End of returned message$" nil t)
3954 ;; One message contained a few random lines before
3955 ;; the old message header. The first line of the
3956 ;; message started with two hyphens. A blank line
3959 ;; the end of the message.
3973 (error "Cannot find end of header in failed message"))))))
3974 ;; We have found the message that bounced, within the current message.
3975 ;; Now start sending new message; default header fields from original.
3976 ;; Turn off the usual actions for initializing the message body
3977 ;; because we want to get only the text from the failure message.
3980 (list (list 'rmail-mark-message
3984 ;; Insert original text as initial text of new draft message.
3986 ;; of the previous message was probably read-only.
4062 (add-hook 'rmail-show-message-hook 'rmail-fontify-message nil t)
4063 ;; If we're already showing a message, fontify it now.
4064 (if rmail-current-message (rmail-fontify-message))
4065 ;; Prevent Font Lock mode from kicking in.
4076 (remove-hook 'rmail-show-message-hook 'rmail-fontify-message t)
4081 (defun rmail-fontify-message ()
4082 ;; Fontify the current message if it is not already fontified.
4107 "Keymap used when in rmail display mode.")
4119 'rmail-speedbar-move-message-to-folder-on-line)))
4123 ["Move message to folder" rmail-speedbar-move-message-to-folder-on-line
4128 ;; Make sure our special speedbar major mode is loaded
4137 current message into that RMAIL folder."
4167 'rmail-speedbar-move-message (car df))
4182 (message "Loading in RMAIL file %s..." text)
4185 (defun rmail-speedbar-move-message-to-folder-on-line ()
4186 "If the current line is a folder, move current message to it."
4195 (defun rmail-speedbar-move-message (text token indent)
4196 "From button TEXT, copy current message to the rmail file specified by TOKEN.
4199 (message "Moving message to %s" token)
4261 (if (eq major-mode 'rmail-mode)
4268 (add-to-list 'desktop-buffer-mode-handlers
4269 '(rmail-mode . rmail-restore-desktop-buffer))