# HG changeset patch # User Karl Heuer # Date 764994079 0 # Node ID bac8e17d51b377f8869204b329da0f266b57c0aa # Parent 3a0db3b2366cefc047afadc104eb0cb975d25c64 (rmail-sort-from-summary): Preserve window selection. diff -r 3a0db3b2366c -r bac8e17d51b3 lisp/mail/rmailsum.el --- a/lisp/mail/rmailsum.el Wed Mar 30 02:14:11 1994 +0000 +++ b/lisp/mail/rmailsum.el Wed Mar 30 02:21:19 1994 +0000 @@ -1111,8 +1111,10 @@ (defun rmail-sort-from-summary (sortfun reverse) "Sort Rmail messages from Summary buffer and update it after sorting." (require 'rmailsort) - (pop-to-buffer rmail-buffer) - (funcall sortfun reverse) - (rmail-summary)) + (let ((selwin (selected-window))) + (unwind-protect + (progn (pop-to-buffer rmail-buffer) + (funcall sortfun reverse)) + (select-window selwin)))) ;;; rmailsum.el ends here