summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-ftp.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2008-06-28 10:15:00 +0000
committerMichael Albinus <michael.albinus@gmx.de>2008-06-28 10:15:00 +0000
commit2d8b5d77c1fa8e257b3d1b56a1d47e88d782a67a (patch)
treeb1f79cd0d02311d7f0e528065083e3d1824f5826 /lisp/net/tramp-ftp.el
parentf731e2f977dd330bd8ac8c25bfccef3ddb1e64fa (diff)
downloademacs-2d8b5d77c1fa8e257b3d1b56a1d47e88d782a67a.tar.gz
emacs-2d8b5d77c1fa8e257b3d1b56a1d47e88d782a67a.tar.bz2
emacs-2d8b5d77c1fa8e257b3d1b56a1d47e88d782a67a.zip
* net/tramp-ftp.el (top): Delete 'ange-ftp property from
`substitute-in-file-name' when unloading. (tramp-ftp-file-name-handler): Set `tramp-mode' to nil.
Diffstat (limited to 'lisp/net/tramp-ftp.el')
-rw-r--r--lisp/net/tramp-ftp.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index 3bac605480d..5ad73a7d4b6 100644
--- a/lisp/net/tramp-ftp.el
+++ b/lisp/net/tramp-ftp.el
@@ -120,6 +120,13 @@ present for backward compatibility."
;; If there is URL syntax, `substitute-in-file-name' needs special
;; handling.
(put 'substitute-in-file-name 'ange-ftp 'tramp-handle-substitute-in-file-name)
+(add-hook 'tramp-ftp-unload-hook
+ '(lambda ()
+ (setplist 'substitute-in-file-name
+ (delete 'ange-ftp
+ (delete 'tramp-handle-substitute-in-file-name
+ (symbol-plist
+ 'substitute-in-file-name))))))
(defun tramp-ftp-file-name-handler (operation &rest args)
"Invoke the Ange-FTP handler for OPERATION.
@@ -178,7 +185,12 @@ pass to the OPERATION."
(ignore-errors (delete-file tmpfile)))))
;; Normally, the handlers must be discarded.
- (t (let* ((inhibit-file-name-handlers
+ ;; `inhibit-file-name-handlers' isn't sufficient, because the
+ ;; local file name could be in Tramp syntax as well (for
+ ;; example, returning VMS file names like "/DISK$CAM:/AAA").
+ ;; That's why we set also `tramp-mode' to nil.
+ (t (let* ((tramp-mode nil)
+ (inhibit-file-name-handlers
(list 'tramp-file-name-handler
'tramp-completion-file-name-handler
(and (eq inhibit-file-name-operation operation)