]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/ange-ftp.el (ange-ftp-run-real-handler-orig): New defun,
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 15 Apr 2013 09:43:20 +0000 (11:43 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 15 Apr 2013 09:43:20 +0000 (11:43 +0200)
uses code from the previous `ange-ftp-run-real-handler'.
(ange-ftp-run-real-handler): Set it to `tramp-run-real-handler'
only in case that function exist.  This is needed for proper
unloading of Tramp.

lisp/ChangeLog
lisp/net/ange-ftp.el

index 34711b72c3eaa3043abc66f60c247d423ccb9b63..f3db36db290b7c8884f9e2dbe066da1fc5a52aef 100644 (file)
@@ -1,3 +1,11 @@
+2013-04-15  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/ange-ftp.el (ange-ftp-run-real-handler-orig): New defun,
+       uses code from the previous `ange-ftp-run-real-handler'.
+       (ange-ftp-run-real-handler): Set it to `tramp-run-real-handler'
+       only in case that function exist.  This is needed for proper
+       unloading of Tramp.
+
 2013-04-15  Tassilo Horn  <tsdh@gnu.org>
 
        * textmodes/reftex-vars.el (reftex-label-regexps): New defcustom.
index 2b8c7ae145baf4247fd83746eebaba592c1e63c1..f6efc56023a79673fe4612aa11e57429a9cb04a6 100644 (file)
@@ -4437,16 +4437,18 @@ 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)))
-
-(defalias 'ange-ftp-run-real-handler 'tramp-run-real-handler)
+(defun ange-ftp-run-real-handler-orig (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
+  (if (fboundp 'tramp-run-real-handler)
+      'tramp-run-real-handler 'ange-ftp-run-real-handler-orig))
 
 (defun ange-ftp-real-file-name-directory (&rest args)
   (ange-ftp-run-real-handler 'file-name-directory args))