aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/mail/rmail.el57
1 files changed, 32 insertions, 25 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 477502dce0f..83246d59e8d 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -219,9 +219,9 @@ still the current message in the Rmail buffer.")
219;; delimiting used on a given host (delim1 and delim2 from the config 219;; delimiting used on a given host (delim1 and delim2 from the config
220;; files). 220;; files).
221 221
222(defvar mmdf-delim1 "^\001\001\001\001\n" 222(defvar rmail-mmdf-delim1 "^\001\001\001\001\n"
223 "Regexp marking the start of an mmdf message") 223 "Regexp marking the start of an mmdf message")
224(defvar mmdf-delim2 "^\001\001\001\001\n" 224(defvar rmail-mmdf-delim2 "^\001\001\001\001\n"
225 "Regexp marking the end of an mmdf message") 225 "Regexp marking the end of an mmdf message")
226 226
227(defvar rmail-message-filter nil 227(defvar rmail-message-filter nil
@@ -1357,7 +1357,7 @@ Optional DEFAULT is password to start with."
1357 (sit-for 3) 1357 (sit-for 3)
1358 ;; Try to get back in sync with a real message. 1358 ;; Try to get back in sync with a real message.
1359 (if (re-search-forward 1359 (if (re-search-forward
1360 (concat mmdf-delim1 "\\|^From") nil t) 1360 (concat rmail-mmdf-delim1 "\\|^From") nil t)
1361 (beginning-of-line) 1361 (beginning-of-line)
1362 (goto-char (point-max))))))) 1362 (goto-char (point-max)))))))
1363 (goto-char (point-min)) 1363 (goto-char (point-min))
@@ -1390,10 +1390,10 @@ Optional DEFAULT is password to start with."
1390 (narrow-to-region (point) (point-max))) 1390 (narrow-to-region (point) (point-max)))
1391 ;;*** MMDF format 1391 ;;*** MMDF format
1392 ((let ((case-fold-search t)) 1392 ((let ((case-fold-search t))
1393 (looking-at mmdf-delim1)) 1393 (looking-at rmail-mmdf-delim1))
1394 (let ((case-fold-search t)) 1394 (let ((case-fold-search t))
1395 (replace-match "\^L\n0, unseen,,\n*** EOOH ***\n") 1395 (replace-match "\^L\n0, unseen,,\n*** EOOH ***\n")
1396 (re-search-forward mmdf-delim2 nil t) 1396 (re-search-forward rmail-mmdf-delim2 nil t)
1397 (replace-match "\^_")) 1397 (replace-match "\^_"))
1398 (save-excursion 1398 (save-excursion
1399 (save-restriction 1399 (save-restriction
@@ -1441,7 +1441,7 @@ Optional DEFAULT is password to start with."
1441 (and (looking-at "\^L") 1441 (and (looking-at "\^L")
1442 (search-forward "\n\^_" nil t)) 1442 (search-forward "\n\^_" nil t))
1443 (let ((case-fold-search t)) 1443 (let ((case-fold-search t))
1444 (looking-at mmdf-delim1)) 1444 (looking-at rmail-mmdf-delim1))
1445 (looking-at "From ")))) 1445 (looking-at "From "))))
1446 (goto-char (+ header-end size)) 1446 (goto-char (+ header-end size))
1447 (message "Ignoring invalid Content-Length field") 1447 (message "Ignoring invalid Content-Length field")
@@ -1451,7 +1451,7 @@ Optional DEFAULT is password to start with."
1451 (concat "^[\^_]?\\(" 1451 (concat "^[\^_]?\\("
1452 rmail-unix-mail-delimiter 1452 rmail-unix-mail-delimiter
1453 "\\|" 1453 "\\|"
1454 mmdf-delim1 "\\|" 1454 rmail-mmdf-delim1 "\\|"
1455 "^BABYL OPTIONS:\\|" 1455 "^BABYL OPTIONS:\\|"
1456 "\^L\n[01],\\)") nil t) 1456 "\^L\n[01],\\)") nil t)
1457 (goto-char (match-beginning 1)) 1457 (goto-char (match-beginning 1))
@@ -2475,24 +2475,31 @@ use \\[mail-yank-original] to yank the original message into it."
2475 (string-match rmail-reply-regexp subject)) 2475 (string-match rmail-reply-regexp subject))
2476 (substring subject (match-end 0)) 2476 (substring subject (match-end 0))
2477 subject)))) 2477 subject))))
2478 (rmail-start-mail nil 2478 (rmail-start-mail
2479 (mail-strip-quoted-names reply-to) 2479 nil
2480 subject 2480 ;; Using mail-strip-quoted-names is undesirable with newer mailers
2481 (rmail-make-in-reply-to-field from date message-id) 2481 ;; since they can handle the names unstripped.
2482 (if just-sender 2482 ;; I don't know whether there are other mailers that still
2483 nil 2483 ;; need the names to be stripped.
2484 (let* ((cc-list (rmail-dont-reply-to 2484 (mail-strip-quoted-names reply-to)
2485 (mail-strip-quoted-names 2485 subject
2486 (if (null cc) to (concat to ", " cc)))))) 2486 (rmail-make-in-reply-to-field from date message-id)
2487 (if (string= cc-list "") nil cc-list))) 2487 (if just-sender
2488 rmail-view-buffer 2488 nil
2489 (list (list 'rmail-mark-message 2489 ;; mail-strip-quoted-names is NOT necessary for rmail-dont-reply-to
2490 rmail-view-buffer 2490 ;; to do its job.
2491 (aref rmail-msgref-vector msgnum) 2491 (let* ((cc-list (rmail-dont-reply-to
2492 "answered")) 2492 (mail-strip-quoted-names
2493 nil 2493 (if (null cc) to (concat to ", " cc))))))
2494 (list (cons "References" (concat (mapconcat 'identity references " ") 2494 (if (string= cc-list "") nil cc-list)))
2495 " " message-id)))))) 2495 rmail-view-buffer
2496 (list (list 'rmail-mark-message
2497 rmail-view-buffer
2498 (aref rmail-msgref-vector msgnum)
2499 "answered"))
2500 nil
2501 (list (cons "References" (concat (mapconcat 'identity references " ")
2502 " " message-id))))))
2496 2503
2497(defun rmail-mark-message (buffer msgnum-list attribute) 2504(defun rmail-mark-message (buffer msgnum-list attribute)
2498 "Give BUFFER's message number in MSGNUM-LIST the attribute ATTRIBUTE. 2505 "Give BUFFER's message number in MSGNUM-LIST the attribute ATTRIBUTE.