Spelling fixes.
[bpt/emacs.git] / lisp / net / ange-ftp.el
index 41716db..458d419 100644 (file)
@@ -721,7 +721,7 @@ parenthesized expressions in REGEXP for the components (in that order)."
          "^local:\\|^Trying\\|^125 \\|^550-\\|^221 .*oodbye\\|"
           "^500 .*AUTH\\|^KERBEROS\\|"
           "^504 Unknown security mechanism\\|"
-         "^530 Please login with USER and PASS\\|" ; non kerberised vsFTPd
+         "^530 Please login with USER and PASS\\|" ; non kerberized vsFTPd
          "^534 Kerberos Authentication not enabled\\|"
          "^22[789] .*[Pp]assive\\|^200 EPRT\\|^500 .*EPRT")
   "Regular expression matching FTP messages that can be ignored."
@@ -4027,7 +4027,7 @@ E.g.,
              (concat bestmatch "/")
            bestmatch)))))
 
-;; Put these lines uncommmented in your .emacs if you want C-r to refresh
+;; Put these lines uncommented in your .emacs if you want C-r to refresh
 ;; ange-ftp's cache whilst doing filename completion.
 ;;
 ;;(define-key minibuffer-local-completion-map "\C-r" 'ange-ftp-re-read-dir)
@@ -4412,14 +4412,16 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
 ;;; Define ways of getting at unmodified Emacs primitives,
 ;;; turning off our handler.
 
-(defun ange-ftp-run-real-handler (operation args)
-  (let ((inhibit-file-name-handlers
-        (cons 'ange-ftp-hook-function
-              (cons 'ange-ftp-completion-hook-function
-                    (and (eq inhibit-file-name-operation operation)
-                         inhibit-file-name-handlers))))
-       (inhibit-file-name-operation operation))
-    (apply operation args)))
+;(defun ange-ftp-run-real-handler (operation args)
+;  (let ((inhibit-file-name-handlers
+;       (cons 'ange-ftp-hook-function
+;             (cons 'ange-ftp-completion-hook-function
+;                   (and (eq inhibit-file-name-operation operation)
+;                        inhibit-file-name-handlers))))
+;      (inhibit-file-name-operation operation))
+;    (apply operation args)))
+
+(defalias 'ange-ftp-run-real-handler 'tramp-run-real-handler)
 
 (defun ange-ftp-real-file-name-directory (&rest args)
   (ange-ftp-run-real-handler 'file-name-directory args))
@@ -4505,7 +4507,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
     ;; We used to follow symlinks on `file' here.  Apparently it was done
     ;; because some FTP servers react to "ls foo" by listing the symlink foo
     ;; rather than the directory it points to.  Now that ange-ftp-ls uses
-    ;; "cd foo; ls" instead, this is not necesssary any more.
+    ;; "cd foo; ls" instead, this is not necessary any more.
     (let ((beg (point))
          (end (point-marker)))
       (set-marker-insertion-type end t)
@@ -5005,7 +5007,11 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
                      dir (and dir "/")
                      file))
          (error "name %s didn't match" name))
-      (let (drive dir file tmp)
+      (let (drive dir file tmp quote)
+       (if (string-match "\\`\".+\"\\'" name)
+           (setq name (substring name 1 -1)
+                 quote "\"")
+         (setq quote ""))
        (if (string-match "\\`/[^:]+:/" name)
            (setq drive (substring name 1
                                   (1- (match-end 0)))
@@ -5014,9 +5020,9 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
        (if tmp
            (setq dir (subst-char-in-string ?/ ?. (substring tmp 0 -1) t)))
        (setq file (file-name-nondirectory name))
-       (concat drive
+       (concat quote drive
                (and dir (concat "[" (if drive nil ".") dir "]"))
-               file)))))
+               file quote)))))
 
 ;; (ange-ftp-fix-name-for-vms "/PUB$:/ANONYMOUS/SDSCPUB/NEXT/Readme.txt;1")
 ;; (ange-ftp-fix-name-for-vms "/PUB$:[ANONYMOUS.SDSCPUB.NEXT]Readme.txt;1" t)