1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00

* mail/rmailout.el (rmail-output): If file is visited,

check the buffer's format.
This commit is contained in:
Richard M. Stallman 2009-04-09 16:48:25 +00:00
parent f824857fc5
commit de62d9e983
2 changed files with 17 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2009-04-09 Richard M Stallman <rms@gnu.org>
* mail/rmailout.el (rmail-output): If file is visited,
check the buffer's format.
* mail/rmailout.el (rmail-convert-to-babyl-format): Don't set "unseen".
* mail/rmailout.el (rmail-output-to-rmail-buffer):

View File

@ -434,7 +434,20 @@ from a non-Rmail buffer. In this case, COUNT is ignored."
(if noattribute (setq noattribute 'nomsg))
(let ((babyl-format (and (file-readable-p file-name)
(mail-file-babyl-p file-name)))
(cur (current-buffer)))
(cur (current-buffer))
(buf (find-buffer-visiting file-name)))
;; If a babyl file is visited in a buffer, is it visited as babyl
;; or as mbox?
(and babyl-format buf
(with-current-buffer buf
(save-restriction
(widen)
(save-excursion
(goto-char (point-min))
(setq babyl-format
(looking-at "BABYL OPTIONS:"))))))
(if not-rmail ; eg via message-fcc-handler-function
(with-temp-buffer
(insert-buffer-substring cur)