diff options
| author | Richard M. Stallman | 2009-04-09 16:48:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2009-04-09 16:48:25 +0000 |
| commit | de62d9e98353da9b87926bed109a58059cd61679 (patch) | |
| tree | b2d0220787f8931f2fe77b9477101df0d1668f50 | |
| parent | f824857fc589ea08b77f2876ec7d548439e5c4c0 (diff) | |
| download | emacs-de62d9e98353da9b87926bed109a58059cd61679.tar.gz emacs-de62d9e98353da9b87926bed109a58059cd61679.zip | |
* mail/rmailout.el (rmail-output): If file is visited,
check the buffer's format.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/mail/rmailout.el | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a4050c3e5ea..00bc4b3d71d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2009-04-09 Richard M Stallman <rms@gnu.org> | 1 | 2009-04-09 Richard M Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * mail/rmailout.el (rmail-output): If file is visited, | ||
| 4 | check the buffer's format. | ||
| 5 | |||
| 3 | * mail/rmailout.el (rmail-convert-to-babyl-format): Don't set "unseen". | 6 | * mail/rmailout.el (rmail-convert-to-babyl-format): Don't set "unseen". |
| 4 | 7 | ||
| 5 | * mail/rmailout.el (rmail-output-to-rmail-buffer): | 8 | * mail/rmailout.el (rmail-output-to-rmail-buffer): |
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index b6f20df69a0..dad696f5355 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el | |||
| @@ -434,7 +434,20 @@ from a non-Rmail buffer. In this case, COUNT is ignored." | |||
| 434 | (if noattribute (setq noattribute 'nomsg)) | 434 | (if noattribute (setq noattribute 'nomsg)) |
| 435 | (let ((babyl-format (and (file-readable-p file-name) | 435 | (let ((babyl-format (and (file-readable-p file-name) |
| 436 | (mail-file-babyl-p file-name))) | 436 | (mail-file-babyl-p file-name))) |
| 437 | (cur (current-buffer))) | 437 | (cur (current-buffer)) |
| 438 | (buf (find-buffer-visiting file-name))) | ||
| 439 | |||
| 440 | ;; If a babyl file is visited in a buffer, is it visited as babyl | ||
| 441 | ;; or as mbox? | ||
| 442 | (and babyl-format buf | ||
| 443 | (with-current-buffer buf | ||
| 444 | (save-restriction | ||
| 445 | (widen) | ||
| 446 | (save-excursion | ||
| 447 | (goto-char (point-min)) | ||
| 448 | (setq babyl-format | ||
| 449 | (looking-at "BABYL OPTIONS:")))))) | ||
| 450 | |||
| 438 | (if not-rmail ; eg via message-fcc-handler-function | 451 | (if not-rmail ; eg via message-fcc-handler-function |
| 439 | (with-temp-buffer | 452 | (with-temp-buffer |
| 440 | (insert-buffer-substring cur) | 453 | (insert-buffer-substring cur) |