diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2013-04-15 11:43:20 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2013-04-15 11:43:20 +0200 |
commit | eb922adfdb19296c02fec37559b3374fc7a0b71a (patch) | |
tree | 9b1180c160ea694849317d09e4c3c66f35dacbf8 | |
parent | 7a55aa139a4d9977844afafae4f368977d555daf (diff) | |
download | emacs-eb922adfdb19296c02fec37559b3374fc7a0b71a.tar.gz |
* 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.
-rw-r--r-- | lisp/ChangeLog | 8 | ||||
-rw-r--r-- | lisp/net/ange-ftp.el | 22 |
2 files changed, 20 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 34711b72c3e..f3db36db290 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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. diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 2b8c7ae145b..f6efc56023a 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -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)) |