changeset 3466:c8f52c44d9a4

(rmail-summary-expunge-and-save): Do save-buffer last. Use two separate save-excursion calls. (rmail-summary-input): Use pop-to-buffer. (rmail-summary-get-new-mail): Gobble rmail-current-message; later go to that message. (rmail-summary-next-msg): Start at end of line, if moving forward. Move to beginning of line, after the loop. (rmail-new-summary): Fix format of elt in minor-mode-alist.
author Richard M. Stallman <rms@gnu.org>
date Fri, 04 Jun 1993 02:24:45 +0000
parents d23de4338f96
children 002945794814
files lisp/mail/rmailsum.el
diffstat 1 files changed, 18 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Fri Jun 04 00:57:45 1993 +0000
+++ b/lisp/mail/rmailsum.el	Fri Jun 04 02:24:45 1993 +0000
@@ -186,7 +186,7 @@
 	    (setq buffer-read-only t)
 	    (rmail-summary-mode)
 	    (make-local-variable 'minor-mode-alist)
-	    (setq minor-mode-alist (list ": " description))
+	    (setq minor-mode-alist (list '(t (concat ": " description))))
 	    (setq rmail-buffer rbuf
 		  rmail-summary-redo redo-form
 		  rmail-total-messages total))))
@@ -362,7 +362,7 @@
 messages, or backward if NUMBER is negative."
   (interactive "p")
   (forward-line 0)
-  (and (> number 0) (forward-line 1))
+  (and (> number 0) (end-of-line))
   (let ((count (if (< number 0) (- number) number))
 	(search (if (> number 0) 're-search-forward 're-search-backward))
 	(non-del-msg-found nil))
@@ -370,6 +370,7 @@
 				  (or (funcall search "^.....[^D]" nil t)
 				      non-del-msg-found)))
       (setq count (1- count))))
+  (beginning-of-line)
   (display-buffer rmail-buffer))
 
 (defun rmail-summary-previous-msg (&optional number)
@@ -677,24 +678,30 @@
   (interactive)
   (save-excursion
     (set-buffer rmail-buffer)
-    (rmail-only-expunge)
+    (rmail-only-expunge))
+  (rmail-update-summary)
+  (save-excursion
     (set-buffer rmail-buffer)
-    (save-buffer))
-  (rmail-update-summary))
+    (save-buffer)))
 
 (defun rmail-summary-get-new-mail ()
   "Get new mail and recompute summary headers."
   (interactive)
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (rmail-get-new-mail)))
+  (let (msg)
+    (save-excursion
+      (set-buffer rmail-buffer)
+      (rmail-get-new-mail)
+      ;; Get the proper new message number.
+      (setq msg rmail-current-message))
+    ;; Make sure that message is displayed.
+    (rmail-summary-goto-msg msg)))
 
 (defun rmail-summary-input (filename)
   "Run Rmail on file FILENAME."
   (interactive "FRun rmail on RMAIL file: ")
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (rmail filename)))
+  ;; We switch windows here, then display the other Rmail file there.
+  (pop-to-buffer rmail-buffer)
+  (rmail filename))
 
 (defun rmail-summary-first-message ()
   "Show first message in Rmail file from summary buffer."