1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-30 19:53:09 +00:00

(ange-ftp-error): Add save-excursion.

This commit is contained in:
Richard M. Stallman 2003-08-17 00:19:18 +00:00
parent 606f5e7543
commit 6df73ca392

View File

@ -1469,14 +1469,15 @@ only return the directory part of FILE."
;; Display the last chunk of output from the ftp process for the given HOST ;; 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. ;; USER pair, and signal an error including MSG in the text.
(defun ange-ftp-error (host user msg) (defun ange-ftp-error (host user msg)
(let ((cur (selected-window)) (save-excursion ;; Prevent pop-to-buffer from changing current buffer.
(pop-up-windows t)) (let ((cur (selected-window))
(pop-to-buffer (pop-up-windows t))
(get-buffer-create (pop-to-buffer
(ange-ftp-ftp-process-buffer host user))) (get-buffer-create
(goto-char (point-max)) (ange-ftp-ftp-process-buffer host user)))
(select-window cur)) (goto-char (point-max))
(signal 'ftp-error (list (format "FTP Error: %s" msg)))) (select-window cur))
(signal 'ftp-error (list (format "FTP Error: %s" msg)))))
(defun ange-ftp-set-buffer-mode () (defun ange-ftp-set-buffer-mode ()
"Set correct modes for the current buffer if visiting a remote file." "Set correct modes for the current buffer if visiting a remote file."