aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-04 02:24:45 +0000
committerRichard M. Stallman1993-06-04 02:24:45 +0000
commitb37767e7fff8d36236494b0647266b466d31bb06 (patch)
treeff3d6784b2abe1f413e0bb4288e730bae006088d
parent60f9aad3afe6fb7cc11241a6b1a592633761414b (diff)
downloademacs-b37767e7fff8d36236494b0647266b466d31bb06.tar.gz
emacs-b37767e7fff8d36236494b0647266b466d31bb06.zip
(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.
-rw-r--r--lisp/mail/rmailsum.el29
1 files changed, 18 insertions, 11 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 83cf1d62ea5..b727951a772 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -186,7 +186,7 @@ nil for FUNCTION means all messages."
186 (setq buffer-read-only t) 186 (setq buffer-read-only t)
187 (rmail-summary-mode) 187 (rmail-summary-mode)
188 (make-local-variable 'minor-mode-alist) 188 (make-local-variable 'minor-mode-alist)
189 (setq minor-mode-alist (list ": " description)) 189 (setq minor-mode-alist (list '(t (concat ": " description))))
190 (setq rmail-buffer rbuf 190 (setq rmail-buffer rbuf
191 rmail-summary-redo redo-form 191 rmail-summary-redo redo-form
192 rmail-total-messages total)))) 192 rmail-total-messages total))))
@@ -362,7 +362,7 @@ With optional prefix argument NUMBER, moves forward this number of non-deleted
362messages, or backward if NUMBER is negative." 362messages, or backward if NUMBER is negative."
363 (interactive "p") 363 (interactive "p")
364 (forward-line 0) 364 (forward-line 0)
365 (and (> number 0) (forward-line 1)) 365 (and (> number 0) (end-of-line))
366 (let ((count (if (< number 0) (- number) number)) 366 (let ((count (if (< number 0) (- number) number))
367 (search (if (> number 0) 're-search-forward 're-search-backward)) 367 (search (if (> number 0) 're-search-forward 're-search-backward))
368 (non-del-msg-found nil)) 368 (non-del-msg-found nil))
@@ -370,6 +370,7 @@ messages, or backward if NUMBER is negative."
370 (or (funcall search "^.....[^D]" nil t) 370 (or (funcall search "^.....[^D]" nil t)
371 non-del-msg-found))) 371 non-del-msg-found)))
372 (setq count (1- count)))) 372 (setq count (1- count))))
373 (beginning-of-line)
373 (display-buffer rmail-buffer)) 374 (display-buffer rmail-buffer))
374 375
375(defun rmail-summary-previous-msg (&optional number) 376(defun rmail-summary-previous-msg (&optional number)
@@ -677,24 +678,30 @@ Instead, all of the Rmail Mode commands are available, plus:
677 (interactive) 678 (interactive)
678 (save-excursion 679 (save-excursion
679 (set-buffer rmail-buffer) 680 (set-buffer rmail-buffer)
680 (rmail-only-expunge) 681 (rmail-only-expunge))
682 (rmail-update-summary)
683 (save-excursion
681 (set-buffer rmail-buffer) 684 (set-buffer rmail-buffer)
682 (save-buffer)) 685 (save-buffer)))
683 (rmail-update-summary))
684 686
685(defun rmail-summary-get-new-mail () 687(defun rmail-summary-get-new-mail ()
686 "Get new mail and recompute summary headers." 688 "Get new mail and recompute summary headers."
687 (interactive) 689 (interactive)
688 (save-excursion 690 (let (msg)
689 (set-buffer rmail-buffer) 691 (save-excursion
690 (rmail-get-new-mail))) 692 (set-buffer rmail-buffer)
693 (rmail-get-new-mail)
694 ;; Get the proper new message number.
695 (setq msg rmail-current-message))
696 ;; Make sure that message is displayed.
697 (rmail-summary-goto-msg msg)))
691 698
692(defun rmail-summary-input (filename) 699(defun rmail-summary-input (filename)
693 "Run Rmail on file FILENAME." 700 "Run Rmail on file FILENAME."
694 (interactive "FRun rmail on RMAIL file: ") 701 (interactive "FRun rmail on RMAIL file: ")
695 (save-excursion 702 ;; We switch windows here, then display the other Rmail file there.
696 (set-buffer rmail-buffer) 703 (pop-to-buffer rmail-buffer)
697 (rmail filename))) 704 (rmail filename))
698 705
699(defun rmail-summary-first-message () 706(defun rmail-summary-first-message ()
700 "Show first message in Rmail file from summary buffer." 707 "Show first message in Rmail file from summary buffer."