From: Glenn Morris Date: Tue, 3 Mar 2009 08:13:56 +0000 (+0000) Subject: (rmail-summary-search): Ensure the selected message shows. X-Git-Tag: emacs-pretest-23.0.92~368 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a5110f66bd04353e649f3d9bbe4af2a1921668da;p=emacs.git (rmail-summary-search): Ensure the selected message shows. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e750d494cd0..6e32360325f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -11,6 +11,7 @@ (rmail-summary-mode-map): Bind C-o to output-as-seen, not output. Make the output menu-items consistent with rmail-mode-map. Bind rmail-summary-by-senders to C-M-f. + (rmail-summary-search): Ensure the selected message shows. 2009-03-03 Kenichi Handa diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 37f97962efc..bad78369f7b 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -1034,6 +1034,8 @@ Search, the `unseen' attribute is restored.") (define-key rmail-summary-mode-map "Q" 'rmail-summary-wipe) (define-key rmail-summary-mode-map "r" 'rmail-summary-reply) (define-key rmail-summary-mode-map "s" 'rmail-summary-expunge-and-save) + ;; See rms's comment in rmail.el +;;; (define-key rmail-summary-mode-map "\er" 'rmail-summary-search-backward) (define-key rmail-summary-mode-map "\es" 'rmail-summary-search) (define-key rmail-summary-mode-map "t" 'rmail-summary-toggle-header) (define-key rmail-summary-mode-map "u" 'rmail-summary-undelete) @@ -1535,11 +1537,13 @@ Interactively, empty argument means use same regexp used last time." (prefix-numeric-value current-prefix-arg)))) ;; Don't use save-excursion because that prevents point from moving ;; properly in the summary buffer. - (let ((buffer (current-buffer))) + (let ((buffer (current-buffer)) + (selwin (selected-window))) (unwind-protect (progn - (set-buffer rmail-buffer) + (pop-to-buffer rmail-buffer) (rmail-search regexp n)) + (select-window selwin) (set-buffer buffer)))) (defun rmail-summary-toggle-header ()