Mercurial > emacs
comparison lisp/net/ange-ftp.el @ 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 | 2a6ed9e210b2 |
children | 695cf19ef79e |
comparison
equal
deleted
inserted
replaced
52208:4a7f0e1b3678 | 52209:abb0fb200345 |
---|---|
1467 (concat "*ftp " user "@" host "*")) | 1467 (concat "*ftp " user "@" host "*")) |
1468 | 1468 |
1469 ;; Display the last chunk of output from the ftp process for the given HOST | 1469 ;; Display the last chunk of output from the ftp process for the given HOST |
1470 ;; USER pair, and signal an error including MSG in the text. | 1470 ;; USER pair, and signal an error including MSG in the text. |
1471 (defun ange-ftp-error (host user msg) | 1471 (defun ange-ftp-error (host user msg) |
1472 (let ((cur (selected-window)) | 1472 (save-excursion ;; Prevent pop-to-buffer from changing current buffer. |
1473 (pop-up-windows t)) | 1473 (let ((cur (selected-window)) |
1474 (pop-to-buffer | 1474 (pop-up-windows t)) |
1475 (get-buffer-create | 1475 (pop-to-buffer |
1476 (ange-ftp-ftp-process-buffer host user))) | 1476 (get-buffer-create |
1477 (goto-char (point-max)) | 1477 (ange-ftp-ftp-process-buffer host user))) |
1478 (select-window cur)) | 1478 (goto-char (point-max)) |
1479 (signal 'ftp-error (list (format "FTP Error: %s" msg)))) | 1479 (select-window cur)) |
1480 (signal 'ftp-error (list (format "FTP Error: %s" msg))))) | |
1480 | 1481 |
1481 (defun ange-ftp-set-buffer-mode () | 1482 (defun ange-ftp-set-buffer-mode () |
1482 "Set correct modes for the current buffer if visiting a remote file." | 1483 "Set correct modes for the current buffer if visiting a remote file." |
1483 (if (and (stringp buffer-file-name) | 1484 (if (and (stringp buffer-file-name) |
1484 (ange-ftp-ftp-name buffer-file-name)) | 1485 (ange-ftp-ftp-name buffer-file-name)) |