Mercurial > emacs
changeset 52209:abb0fb200345
(ange-ftp-error): Add save-excursion.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 17 Aug 2003 00:19:18 +0000 |
parents | 4a7f0e1b3678 |
children | eb055edafe69 |
files | lisp/net/ange-ftp.el |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/net/ange-ftp.el Sun Aug 17 00:18:15 2003 +0000 +++ b/lisp/net/ange-ftp.el Sun Aug 17 00:19:18 2003 +0000 @@ -1469,14 +1469,15 @@ ;; Display the last chunk of output from the ftp process for the given HOST ;; USER pair, and signal an error including MSG in the text. (defun ange-ftp-error (host user msg) - (let ((cur (selected-window)) - (pop-up-windows t)) - (pop-to-buffer - (get-buffer-create - (ange-ftp-ftp-process-buffer host user))) - (goto-char (point-max)) - (select-window cur)) - (signal 'ftp-error (list (format "FTP Error: %s" msg)))) + (save-excursion ;; Prevent pop-to-buffer from changing current buffer. + (let ((cur (selected-window)) + (pop-up-windows t)) + (pop-to-buffer + (get-buffer-create + (ange-ftp-ftp-process-buffer host user))) + (goto-char (point-max)) + (select-window cur)) + (signal 'ftp-error (list (format "FTP Error: %s" msg))))) (defun ange-ftp-set-buffer-mode () "Set correct modes for the current buffer if visiting a remote file."