[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp/mail rmailout.el
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs/lisp/mail rmailout.el |
Date: |
Thu, 05 Mar 2009 03:43:01 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 09/03/05 03:43:01
Modified files:
lisp/mail : rmailout.el
Log message:
(rmail-output-as-mbox): Use rmail-ensure-blank-line.
(rmail-output-to-rmail-buffer): Add the new message at the end of the
existing messages, ensuring there is a blank line between them.
(Bug#2521)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/rmailout.el?cvsroot=emacs&r1=1.97&r2=1.98
Patches:
Index: rmailout.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mail/rmailout.el,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -b -r1.97 -r1.98
--- rmailout.el 28 Feb 2009 03:53:00 -0000 1.97
+++ rmailout.el 5 Mar 2009 03:43:01 -0000 1.98
@@ -33,6 +33,7 @@
:type 'boolean
:group 'rmail-output)
+;; FIXME risky?
(defcustom rmail-output-file-alist nil
"Alist matching regexps to suggested output Rmail files.
This is a list of elements of the form (REGEXP . NAME-EXP).
@@ -335,15 +336,13 @@
(widen)
;; Make sure message ends with blank line.
(goto-char (point-max))
- (unless (bolp)
- (insert "\n"))
- (unless (looking-back "\n\n")
- (insert "\n"))
+ (rmail-ensure-blank-line)
(goto-char (point-min))
(let ((buf (find-buffer-visiting file-name))
(tembuf (current-buffer)))
(if (null buf)
(let ((coding-system-for-write 'raw-text-unix))
+ ;; FIXME should ensure existing file ends with a blank line.
(write-region (point-min) (point-max) file-name t nomsg))
(if (eq buf (current-buffer))
(error "Can't output message to same file it's already in"))
@@ -367,15 +366,22 @@
display message number MSG."
(save-excursion
(rmail-swap-buffers-maybe)
- ;; Turn on Auto Save mode, if it's off in this
- ;; buffer but enabled by default.
+ ;; Turn on Auto Save mode, if it's off in this buffer but enabled
+ ;; by default.
(and (not buffer-auto-save-file-name)
auto-save-default
(auto-save-mode t))
(rmail-maybe-set-message-counters)
+ ;; Insert the new message after the last old message.
+ (widen)
+ ;; Make sure the last old message ends with a blank line.
+ (goto-char (point-max))
+ (rmail-ensure-blank-line)
+ ;; Insert the new message at the end.
(narrow-to-region (point-max) (point-max))
(insert-buffer-substring tembuf)
(rmail-count-new-messages t)
+ ;; FIXME should re-use existing windows.
(if (rmail-summary-exists)
(rmail-select-summary (rmail-update-summary)))
(rmail-show-message-1 msg)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp/mail rmailout.el,
Glenn Morris <=