]> code.delx.au - gnu-emacs/blobdiff - lisp/ange-ftp.el
(shell-command-on-region):
[gnu-emacs] / lisp / ange-ftp.el
index 81829f1cdec3f451a7e61f9495d5977369f02ac4..6e771fa214be5f1880dac3e7d9f58c91441a37f0 100644 (file)
@@ -857,7 +857,7 @@ SIZE, if supplied, should be a prime number."
 ;;;; Internal variables.
 ;;;; ------------------------------------------------------------
 
-(defconst ange-ftp-version "$Revision: 1.6 $")
+(defconst ange-ftp-version "$Revision: 1.9 $")
 
 (defvar ange-ftp-data-buffer-name " *ftp data*"
   "Buffer name to hold directory listing data received from ftp process.")
@@ -1345,7 +1345,7 @@ file."
        (auto-save-mode ange-ftp-auto-save))))
 
 (defun ange-ftp-kill-ftp-process (buffer)
-  "Kill the FTP process associated with BUFFER."
+  "Kill the FTP process associated with BUFFER.
 If the BUFFER's visited filename or default-directory is an ftp filename
 then kill the related ftp process."
   (interactive "bKill FTP process associated with buffer: ")
@@ -2171,9 +2171,7 @@ to take switch arguments."
   "Interactively adds a given HOST to ange-ftp-dumb-unix-host-regexp."
   (interactive
    (list (read-string "Host: "
-                     (let ((name (or (buffer-file-name)
-                                     (and (eq major-mode 'dired-mode)
-                                          dired-directory))))
+                     (let ((name (or (buffer-file-name) default-directory)))
                        (and name (car (ange-ftp-ftp-name name)))))))
   (if (not (ange-ftp-dumb-unix-host host))
       (setq ange-ftp-dumb-unix-host-regexp
@@ -2404,9 +2402,7 @@ as well.")
   "Interactively adds a DIR to ange-ftp-dl-dir-regexp."
   (interactive
    (list (read-string "Directory: "
-                     (let ((name (or (buffer-file-name)
-                                     (and (eq major-mode 'dired-mode)
-                                          dired-directory))))
+                     (let ((name (or (buffer-file-name) default-directory)))
                        (and name (ange-ftp-ftp-name name)
                             (file-name-directory name))))))
   (if (not (and ange-ftp-dl-dir-regexp
@@ -2531,10 +2527,11 @@ that a wasted listing is not done:
             (host-type (ange-ftp-host-type
                         (car parsed))))
        (or
-        ;; Deal with dired
-        (and (boundp 'dired-local-variables-file)
-             (stringp dired-local-variables-file)
-             (string-equal dired-local-variables-file efile))
+;;; This variable seems not to exist in Emacs 19 -- rms.
+;;;     ;; Deal with dired
+;;;     (and (boundp 'dired-local-variables-file)
+;;;          (stringp dired-local-variables-file)
+;;;          (string-equal dired-local-variables-file efile))
         ;; No dots in dir names in vms.
         (and (eq host-type 'vms)
              (string-match "\\." efile))
@@ -3780,6 +3777,14 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
 (put 'file-name-sans-versions 'ange-ftp 'ange-ftp-file-name-sans-versions)
 (put 'dired-uncache 'ange-ftp 'ange-ftp-dired-uncache)
 (put 'dired-compress-file 'ange-ftp 'ange-ftp-dired-compress-file)
+
+;; Turn off truename processing to save time.
+;; Treat each name as its own truename.
+(put 'file-truename 'ange-ftp 'identity)
+
+;; Turn off RCS/SCCS processing to save time.
+;; This returns nil for any file name as argument.
+(put 'vc-registered 'ange-ftp 'null)
 \f
 ;;; Define ways of getting at unmodified Emacs primitives,
 ;;; turning off our handler.
@@ -4567,9 +4572,7 @@ Other orders of $ and _ seem to all work just fine.")
   "Mark HOST as the name of a machine running VMS."
   (interactive
    (list (read-string "Host: "
-                     (let ((name (or (buffer-file-name)
-                                     (and (eq major-mode 'dired-mode)
-                                          dired-directory))))
+                     (let ((name (or (buffer-file-name) default-directory)))
                        (and name (car (ange-ftp-ftp-name name)))))))
   (if (not (ange-ftp-vms-host host))
       (setq ange-ftp-vms-host-regexp
@@ -4977,9 +4980,7 @@ Other orders of $ and _ seem to all work just fine.")
   "Mark HOST as the name of a machine running MTS."
   (interactive
    (list (read-string "Host: "
-                     (let ((name (or (buffer-file-name)
-                                     (and (eq major-mode 'dired-mode)
-                                          dired-directory))))
+                     (let ((name (or (buffer-file-name) default-directory)))
                        (and name (car (ange-ftp-ftp-name name)))))))
   (if (not (ange-ftp-mts-host host))
       (setq ange-ftp-mts-host-regexp
@@ -5161,9 +5162,7 @@ Other orders of $ and _ seem to all work just fine.")
   "Mark HOST as the name of a CMS host."
   (interactive
    (list (read-string "Host: "
-                     (let ((name (or (buffer-file-name)
-                                     (and (eq major-mode 'dired-mode)
-                                          dired-directory))))
+                     (let ((name (or (buffer-file-name) default-directory)))
                        (and name (car (ange-ftp-ftp-name name)))))))
   (if (not (ange-ftp-cms-host host))
       (setq ange-ftp-cms-host-regexp