diff options
| author | Richard M. Stallman | 1998-06-06 22:10:19 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-06-06 22:10:19 +0000 |
| commit | b5e00b02008b667ed32e6fd47fd90e64a6ab95b6 (patch) | |
| tree | fbca4f05add4bca9a2d233134cbe2fa47882590c | |
| parent | 9cc4fad570353aafafdcaffe457b51d2a04f709f (diff) | |
| download | emacs-b5e00b02008b667ed32e6fd47fd90e64a6ab95b6.tar.gz emacs-b5e00b02008b667ed32e6fd47fd90e64a6ab95b6.zip | |
(rmail): Prevent find-file from calling
rmail-mode for a new buffer. Do it later, instead.
| -rw-r--r-- | lisp/mail/rmail.el | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 0f3063769a8..5d6889a1b5a 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -511,7 +511,8 @@ If `rmail-display-summary' is non-nil, make a summary for this RMAIL file." | |||
| 511 | (eq major-mode 'rmail-mode)) | 511 | (eq major-mode 'rmail-mode)) |
| 512 | (progn (rmail-forget-messages) | 512 | (progn (rmail-forget-messages) |
| 513 | (rmail-set-message-counters)))) | 513 | (rmail-set-message-counters)))) |
| 514 | (find-file file-name)) | 514 | (let ((enable-local-variables nil)) |
| 515 | (find-file file-name))) | ||
| 515 | (if (eq major-mode 'rmail-edit-mode) | 516 | (if (eq major-mode 'rmail-edit-mode) |
| 516 | (error "Exit Rmail Edit mode before getting new mail")) | 517 | (error "Exit Rmail Edit mode before getting new mail")) |
| 517 | (if (and existed (> (buffer-size) 0)) | 518 | (if (and existed (> (buffer-size) 0)) |
| @@ -528,16 +529,14 @@ If `rmail-display-summary' is non-nil, make a summary for this RMAIL file." | |||
| 528 | (if (and rmail-enable-multibyte | 529 | (if (and rmail-enable-multibyte |
| 529 | (not enable-multibyte-characters)) | 530 | (not enable-multibyte-characters)) |
| 530 | (set-buffer-multibyte t)) | 531 | (set-buffer-multibyte t)) |
| 531 | (goto-char (point-max)) | 532 | (goto-char (point-max))) |
| 532 | (if (null rmail-inbox-list) | 533 | ;; Unconditionally rescan to find all the messages. |
| 533 | (progn | 534 | ;; It is useful to have M-x rmail as a way to do that. |
| 534 | (rmail-set-message-counters) | 535 | (rmail-set-message-counters) |
| 535 | (rmail-show-message) | ||
| 536 | (setq msg-shown t)))) | ||
| 537 | (unwind-protect | 536 | (unwind-protect |
| 538 | (or (and (null file-name-arg) | 537 | (unless (and (not file-name-arg) |
| 539 | (rmail-get-new-mail)) | 538 | (rmail-get-new-mail)) |
| 540 | (or msg-shown (rmail-show-message (rmail-first-unseen-message)))) | 539 | (rmail-show-message (rmail-first-unseen-message))) |
| 541 | (progn | 540 | (progn |
| 542 | (if rmail-display-summary (rmail-summary)) | 541 | (if rmail-display-summary (rmail-summary)) |
| 543 | (rmail-construct-io-menu) | 542 | (rmail-construct-io-menu) |