comparison lisp/mail/rmailsum.el @ 8728:b30c35c8e7ed

(rmail-summary-goto-msg): Preserve the current buffer.
author Richard M. Stallman <rms@gnu.org>
date Tue, 13 Sep 1994 04:14:00 +0000
parents a241401a67ff
children 3abf3f2ef6cf
comparison
equal deleted inserted replaced
8727:592bbf02e29d 8728:b30c35c8e7ed
778 (defun rmail-summary-goto-msg (&optional n nowarn skip-rmail) 778 (defun rmail-summary-goto-msg (&optional n nowarn skip-rmail)
779 (interactive "P") 779 (interactive "P")
780 (if (consp n) (setq n (prefix-numeric-value n))) 780 (if (consp n) (setq n (prefix-numeric-value n)))
781 (if (eobp) (forward-line -1)) 781 (if (eobp) (forward-line -1))
782 (beginning-of-line) 782 (beginning-of-line)
783 (let ((buf rmail-buffer) 783 (let ((obuf (current-buffer))
784 (buf rmail-buffer)
784 (cur (point)) 785 (cur (point))
785 message-not-found 786 message-not-found
786 (curmsg (string-to-int 787 (curmsg (string-to-int
787 (buffer-substring (point) 788 (buffer-substring (point)
788 (min (point-max) (+ 5 (point))))))) 789 (min (point-max) (+ 5 (point)))))))
830 nil 831 nil
831 (let ((selwin (selected-window))) 832 (let ((selwin (selected-window)))
832 (unwind-protect 833 (unwind-protect
833 (progn (pop-to-buffer buf) 834 (progn (pop-to-buffer buf)
834 (rmail-show-message n)) 835 (rmail-show-message n))
835 (select-window selwin)))))) 836 (select-window selwin)
837 ;; The actions above can alter the current buffer. Preserve it.
838 (set-buffer obuf))))))
836 839
837 (defun rmail-summary-scroll-msg-up (&optional dist) 840 (defun rmail-summary-scroll-msg-up (&optional dist)
838 "Scroll the Rmail window forward." 841 "Scroll the Rmail window forward."
839 (interactive "P") 842 (interactive "P")
840 (let ((other-window-scroll-buffer rmail-buffer)) 843 (let ((other-window-scroll-buffer rmail-buffer))