aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-01-19 20:22:12 +0000
committerRichard M. Stallman1998-01-19 20:22:12 +0000
commit3210e730cf1b66d367083f78dfd8d069672ce546 (patch)
treecb7ebe86252f971baaf86de66bbbb3ee0b36882c
parent3a73fa5d33fde1799cf990527d2a103c859df182 (diff)
downloademacs-3210e730cf1b66d367083f78dfd8d069672ce546.tar.gz
emacs-3210e730cf1b66d367083f78dfd8d069672ce546.zip
(rmail): Don't bind enable-multibyte-characters;
read the file normally. (rmail-revert): Likewise. (rmail): Don't kill local enable-multibyte-characters. Don't bind coding-system-for-read. Fix error message. (rmail-make-in-reply-to-field): Make foo and bar patterns match all non-ASCII chars.
-rw-r--r--lisp/mail/rmail.el21
1 files changed, 7 insertions, 14 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 3561b3b33fc..e24698351cb 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -452,7 +452,6 @@ If `rmail-display-summary' is non-nil, make a summary for this RMAIL file."
452 (setq rmail-enable-mime nil)))) 452 (setq rmail-enable-mime nil))))
453 (let* ((file-name (expand-file-name (or file-name-arg rmail-file-name))) 453 (let* ((file-name (expand-file-name (or file-name-arg rmail-file-name)))
454 (existed (get-file-buffer file-name)) 454 (existed (get-file-buffer file-name))
455 (coding-system-for-read 'no-conversion)
456 run-mail-hook msg-shown) 455 run-mail-hook msg-shown)
457 ;; Like find-file, but in the case where a buffer existed 456 ;; Like find-file, but in the case where a buffer existed
458 ;; and the file was reverted, recompute the message-data. 457 ;; and the file was reverted, recompute the message-data.
@@ -460,22 +459,19 @@ If `rmail-display-summary' is non-nil, make a summary for this RMAIL file."
460 (progn 459 (progn
461 ;; Don't be confused by apparent local-variables spec 460 ;; Don't be confused by apparent local-variables spec
462 ;; in the last message in the RMAIL file. 461 ;; in the last message in the RMAIL file.
463 (let ((enable-local-variables nil)) 462 (find-file file-name)
464 (find-file file-name))
465 (if (and (verify-visited-file-modtime existed) 463 (if (and (verify-visited-file-modtime existed)
466 (eq major-mode 'rmail-mode)) 464 (eq major-mode 'rmail-mode))
467 (progn (rmail-forget-messages) 465 (progn (rmail-forget-messages)
468 (rmail-set-message-counters)))) 466 (rmail-set-message-counters))))
469 (let ((enable-local-variables nil)) 467 (find-file file-name))
470 (find-file file-name)))
471 (if (eq major-mode 'rmail-edit-mode) 468 (if (eq major-mode 'rmail-edit-mode)
472 (error "Exit Rmail Edit mode before getting new mail.")) 469 (error "Exit Rmail Edit mode before getting new mail"))
473 (if (and existed (> (buffer-size) 0)) 470 (if (and existed (> (buffer-size) 0))
474 ;; Buffer not new and not empty; ensure in proper mode, but that's all. 471 ;; Buffer not new and not empty; ensure in proper mode, but that's all.
475 (or (eq major-mode 'rmail-mode) 472 (or (eq major-mode 'rmail-mode)
476 (progn (rmail-mode-2) 473 (progn (rmail-mode-2)
477 (setq run-mail-hook t))) 474 (setq run-mail-hook t)))
478 (kill-local-variable 'enable-multibyte-characters)
479 (setq run-mail-hook t) 475 (setq run-mail-hook t)
480 (rmail-mode-2) 476 (rmail-mode-2)
481 ;; Convert all or part to Babyl file if possible. 477 ;; Convert all or part to Babyl file if possible.
@@ -901,10 +897,7 @@ Instead, these commands are available:
901 (if (revert-buffer arg noconfirm) 897 (if (revert-buffer arg noconfirm)
902 ;; If the user said "yes", and we changed something, 898 ;; If the user said "yes", and we changed something,
903 ;; reparse the messages. 899 ;; reparse the messages.
904 ;; But, we don't have to convert coding system because backup 900 (progn
905 ;; files should have been saved by Emacs' internal format.
906 (let ((rmail-file-coding-system nil)
907 (enable-multibyte-characters nil))
908 (rmail-convert-file) 901 (rmail-convert-file)
909 (goto-char (point-max)) 902 (goto-char (point-max))
910 (rmail-mode))))) 903 (rmail-mode)))))
@@ -2609,9 +2602,9 @@ which is an element of rmail-msgref-vector."
2609 (if date 2602 (if date
2610 (concat field "'s message of " date) 2603 (concat field "'s message of " date)
2611 field))))) 2604 field)))))
2612 ((let* ((foo "[^][\000-\037\177-\377()<>@,;:\\\" ]+") 2605 ((let* ((foo "[^][\000-\037()<>@,;:\\\" ]+")
2613 (bar "[^][\000-\037\177-\377()<>@,;:\\\"]+")) 2606 (bar "[^][\000-\037()<>@,;:\\\"]+"))
2614 ;; Can't use format because format loses on \000 (unix *^&%*^&%$!!) 2607 ;; These strings both match all non-ASCII characters.
2615 (or (string-match (concat "\\`[ \t]*\\(" bar 2608 (or (string-match (concat "\\`[ \t]*\\(" bar
2616 "\\)\\(<" foo "@" foo ">\\)?[ \t]*\\'") 2609 "\\)\\(<" foo "@" foo ">\\)?[ \t]*\\'")
2617 ;; "Unix Loser <Foo@bar.edu>" => "Unix Loser" 2610 ;; "Unix Loser <Foo@bar.edu>" => "Unix Loser"