Commit b37767e7 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(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.
parent 60f9aad3
...@@ -186,7 +186,7 @@ nil for FUNCTION means all messages." ...@@ -186,7 +186,7 @@ nil for FUNCTION means all messages."
(setq buffer-read-only t) (setq buffer-read-only t)
(rmail-summary-mode) (rmail-summary-mode)
(make-local-variable 'minor-mode-alist) (make-local-variable 'minor-mode-alist)
(setq minor-mode-alist (list ": " description)) (setq minor-mode-alist (list '(t (concat ": " description))))
(setq rmail-buffer rbuf (setq rmail-buffer rbuf
rmail-summary-redo redo-form rmail-summary-redo redo-form
rmail-total-messages total)))) rmail-total-messages total))))
...@@ -362,7 +362,7 @@ With optional prefix argument NUMBER, moves forward this number of non-deleted ...@@ -362,7 +362,7 @@ With optional prefix argument NUMBER, moves forward this number of non-deleted
messages, or backward if NUMBER is negative." messages, or backward if NUMBER is negative."
(interactive "p") (interactive "p")
(forward-line 0) (forward-line 0)
(and (> number 0) (forward-line 1)) (and (> number 0) (end-of-line))
(let ((count (if (< number 0) (- number) number)) (let ((count (if (< number 0) (- number) number))
(search (if (> number 0) 're-search-forward 're-search-backward)) (search (if (> number 0) 're-search-forward 're-search-backward))
(non-del-msg-found nil)) (non-del-msg-found nil))
...@@ -370,6 +370,7 @@ messages, or backward if NUMBER is negative." ...@@ -370,6 +370,7 @@ messages, or backward if NUMBER is negative."
(or (funcall search "^.....[^D]" nil t) (or (funcall search "^.....[^D]" nil t)
non-del-msg-found))) non-del-msg-found)))
(setq count (1- count)))) (setq count (1- count))))
(beginning-of-line)
(display-buffer rmail-buffer)) (display-buffer rmail-buffer))
(defun rmail-summary-previous-msg (&optional number) (defun rmail-summary-previous-msg (&optional number)
...@@ -677,24 +678,30 @@ Instead, all of the Rmail Mode commands are available, plus: ...@@ -677,24 +678,30 @@ Instead, all of the Rmail Mode commands are available, plus:
(interactive) (interactive)
(save-excursion (save-excursion
(set-buffer rmail-buffer) (set-buffer rmail-buffer)
(rmail-only-expunge) (rmail-only-expunge))
(rmail-update-summary)
(save-excursion
(set-buffer rmail-buffer) (set-buffer rmail-buffer)
(save-buffer)) (save-buffer)))
(rmail-update-summary))
(defun rmail-summary-get-new-mail () (defun rmail-summary-get-new-mail ()
"Get new mail and recompute summary headers." "Get new mail and recompute summary headers."
(interactive) (interactive)
(let (msg)
(save-excursion (save-excursion
(set-buffer rmail-buffer) (set-buffer rmail-buffer)
(rmail-get-new-mail))) (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) (defun rmail-summary-input (filename)
"Run Rmail on file FILENAME." "Run Rmail on file FILENAME."
(interactive "FRun rmail on RMAIL file: ") (interactive "FRun rmail on RMAIL file: ")
(save-excursion ;; We switch windows here, then display the other Rmail file there.
(set-buffer rmail-buffer) (pop-to-buffer rmail-buffer)
(rmail filename))) (rmail filename))
(defun rmail-summary-first-message () (defun rmail-summary-first-message ()
"Show first message in Rmail file from summary buffer." "Show first message in Rmail file from summary buffer."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment