summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-compat.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2015-10-04 13:00:33 +0200
committerMichael Albinus <michael.albinus@gmx.de>2015-10-04 13:00:33 +0200
commitacfb5cd0353406784f085ddb6edfb0d0587048c8 (patch)
tree8e42498109553516b9aee8662b91c365995d16ee /lisp/net/tramp-compat.el
parentb28beb11f3ed93af0f53fb87838bbcab0b469dfb (diff)
downloademacs-acfb5cd0353406784f085ddb6edfb0d0587048c8.tar.gz
emacs-acfb5cd0353406784f085ddb6edfb0d0587048c8.tar.bz2
emacs-acfb5cd0353406784f085ddb6edfb0d0587048c8.zip
Improve XEmacs compatibility of Tramp
* lisp/net/tramp-compat.el (directory-listing-before-filename-regexp): Declare if it doesn't exist. (file-remote-p): Remove defalias, which was necessary for GNU Emacs 21. (redisplay): Make it an alias if it doesn't exist. * lisp/net/tramp.el (tramp-get-remote-tmpdir): Don't use `file-remote-p' (due to XEmacs compatibility). * lisp/net/trampver.el (locate-dominating-file) (tramp-compat-replace-regexp-in-string): Autoload. (tramp-repository-get-version): Do not dupe byte-compiler.
Diffstat (limited to 'lisp/net/tramp-compat.el')
-rw-r--r--lisp/net/tramp-compat.el22
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 9848325e45a..e6451956dc4 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -105,6 +105,12 @@
(unless (boundp 'remote-file-name-inhibit-cache)
(defvar remote-file-name-inhibit-cache nil))
+ ;; `directory-listing-before-filename-regexp' does not exist in
+ ;; XEmacs. Since we use it only in tramp-adb.el, it doesn't harm to
+ ;; declare it here.
+ (unless (boundp 'directory-listing-before-filename-regexp)
+ (defvar directory-listing-before-filename-regexp nil))
+
;; For not existing functions, or functions with a changed argument
;; list, there are compiler warnings. We want to avoid them in
;; cases we know what we do.
@@ -122,16 +128,6 @@
;; `tramp-handle-*' functions, because this would bypass the locking
;; mechanism.
- ;; `file-remote-p' has been introduced with Emacs 22. The version
- ;; of XEmacs is not a magic file name function (yet).
- (unless (fboundp 'file-remote-p)
- (defalias 'file-remote-p
- (lambda (file &optional identification connected)
- (when (tramp-tramp-file-p file)
- (tramp-compat-funcall
- 'tramp-file-name-handler
- 'file-remote-p file identification connected)))))
-
;; `process-file' does not exist in XEmacs.
(unless (fboundp 'process-file)
(defalias 'process-file
@@ -187,7 +183,11 @@
(lambda ()
(ad-remove-advice
'file-expand-wildcards 'around 'tramp-advice-file-expand-wildcards)
- (ad-activate 'file-expand-wildcards)))))
+ (ad-activate 'file-expand-wildcards))))
+
+ ;; `redisplay' does not exist in XEmacs.
+ (unless (fboundp 'redisplay)
+ (defalias 'redisplay 'ignore)))
;; `with-temp-message' does not exist in XEmacs.
(if (fboundp 'with-temp-message)