From: Richard M. Stallman Date: Wed, 26 Jan 1994 18:58:37 +0000 (+0000) Subject: (rmail-summary-undelete): If we don't undelete anything, don't move point. X-Git-Tag: emacs-19.34~10173 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5ed1243c2fca529959338f557aabb46a46edbe24;p=emacs.git (rmail-summary-undelete): If we don't undelete anything, don't move point. --- diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 46210dee5f7..ef8b101ccde 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -448,7 +448,8 @@ Optional prefix ARG means undelete ARG previous messages." (interactive "p") (if (/= arg 1) (rmail-summary-undelete-many arg) - (let ((buffer-read-only nil)) + (let ((buffer-read-only nil) + (opoint (point))) (end-of-line) (cond ((re-search-backward "\\(^ *[0-9]*\\)\\(D\\)" nil t) (replace-match "\\1 ") @@ -456,7 +457,8 @@ Optional prefix ARG means undelete ARG previous messages." (pop-to-buffer rmail-buffer) (and (rmail-message-deleted-p rmail-current-message) (rmail-undelete-previous-message)) - (pop-to-buffer rmail-summary-buffer)))))) + (pop-to-buffer rmail-summary-buffer)) + (t (goto-char opoint)))))) (defun rmail-summary-undelete-many (&optional n) "Undelete all deleted msgs, optional prefix arg N means undelete N prev msgs."