Mercurial > emacs
annotate lisp/net/tramp-compat.el @ 91130:d576e6864dbb
*** empty log message ***
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sat, 01 Dec 2007 02:00:06 +0000 |
parents | 4636000015c5 |
children | e99e230d7eb3 |
rev | line source |
---|---|
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
1 ;;; tramp-compat.el --- Tramp compatibility functions |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
2 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
3 ;; Copyright (C) 2007 Free Software Foundation, Inc. |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
4 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
5 ;; Author: Michael Albinus <michael.albinus@gmx.de> |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
6 ;; Keywords: comm, processes |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
7 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
8 ;; This file is part of GNU Emacs. |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
9 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
10 ;; GNU Emacs is free software; you can redistribute it and/or modify |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
11 ;; it under the terms of the GNU General Public License as published by |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
12 ;; the Free Software Foundation; either version 3, or (at your option) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
13 ;; any later version. |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
14 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
15 ;; GNU Emacs is distributed in the hope that it will be useful, |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
18 ;; GNU General Public License for more details. |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
19 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
20 ;; You should have received a copy of the GNU General Public License |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
21 ;; along with GNU Emacs; see the file COPYING. If not, see |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
22 ;; <http://www.gnu.org/licenses/>. |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
23 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
24 ;;; Commentary: |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
25 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
26 ;; Tramp's main Emacs version for development is GNU Emacs 23. This |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
27 ;; package provides compatibility functions for GNU Emacs 21, GNU |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
28 ;; Emacs 22 and XEmacs 21.4+. |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
29 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
30 ;;; Code: |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
31 |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
32 (eval-and-compile |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
33 |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
34 ;; Pacify byte-compiler. |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
35 (require 'cl) |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
36 (require 'custom) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
37 |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
38 ;; Load the appropriate timer package. |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
39 (if (featurep 'xemacs) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
40 (require 'timer-funcs) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
41 (require 'timer)) |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
42 |
85067
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
43 ;; tramp-util offers integration into other (X)Emacs packages like |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
44 ;; compile.el, gud.el etc. Not necessary in Emacs 23. |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
45 (eval-after-load "tramp" |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
46 ;; We check whether `start-file-process' is an alias. |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
47 '(when (or (not (fboundp 'start-file-process)) |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
48 (symbolp (symbol-function 'start-file-process))) |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
49 (require 'tramp-util) |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
50 (add-hook 'tramp-unload-hook |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
51 '(lambda () |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
52 (when (featurep 'tramp-util) |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
53 (unload-feature 'tramp-util 'force)))))) |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
54 |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
55 ;; Make sure that we get integration with the VC package. When it |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
56 ;; is loaded, we need to pull in the integration module. Not |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
57 ;; necessary in Emacs 23. |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
58 (eval-after-load "vc" |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
59 (eval-after-load "tramp" |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
60 ;; We check whether `start-file-process' is an alias. |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
61 '(when (or (not (fboundp 'start-file-process)) |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
62 (symbolp (symbol-function 'start-file-process))) |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
63 (require 'tramp-vc) |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
64 (add-hook 'tramp-unload-hook |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
65 '(lambda () |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
66 (when (featurep 'tramp-vc) |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
67 (unload-feature 'tramp-vc 'force))))))) |
4636000015c5
* net/tramp.el (top): Move loading of tramp-util.el and
Michael Albinus <michael.albinus@gmx.de>
parents:
85041
diff
changeset
|
68 |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
69 ;; Avoid byte-compiler warnings if the byte-compiler supports this. |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
70 ;; Currently, XEmacs supports this. |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
71 (when (featurep 'xemacs) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
72 (unless (boundp 'byte-compile-default-warnings) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
73 (defvar byte-compile-default-warnings nil)) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
74 (delq 'unused-vars byte-compile-default-warnings)) |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
75 |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
76 ;; `last-coding-system-used' is unknown in XEmacs. |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
77 (unless (boundp 'last-coding-system-used) |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
78 (defvar last-coding-system-used nil)) |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
79 |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
80 ;; `directory-sep-char' is an obsolete variable in Emacs. But it is |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
81 ;; used in XEmacs, so we set it here and there. The following is |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
82 ;; needed to pacify Emacs byte-compiler. |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
83 (unless (boundp 'byte-compile-not-obsolete-var) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
84 (defvar byte-compile-not-obsolete-var nil)) |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
85 (setq byte-compile-not-obsolete-var 'directory-sep-char) |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
86 |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
87 ;; `with-temp-message' does not exists in XEmacs. |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
88 (condition-case nil |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
89 (with-temp-message (current-message) nil) |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
90 (error (defmacro with-temp-message (message &rest body) `(progn ,@body)))) |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
91 |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
92 ;; `set-buffer-multibyte' comes from Emacs Leim. |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
93 (unless (fboundp 'set-buffer-multibyte) |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
94 (defalias 'set-buffer-multibyte 'ignore)) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
95 |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
96 ;; `font-lock-add-keywords' does not exist in XEmacs. |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
97 (unless (fboundp 'font-lock-add-keywords) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
98 (defalias 'font-lock-add-keywords 'ignore)) |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
99 |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
100 ;; `file-remote-p' has been introduced with Emacs 22. The version |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
101 ;; of XEmacs is not a magic file name function (yet); this is |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
102 ;; corrected in tramp-util.el. Here it is sufficient if the |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
103 ;; function exists. |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
104 (unless (fboundp 'file-remote-p) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
105 (defalias 'file-remote-p 'tramp-handle-file-remote-p)) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
106 |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
107 ;; `process-file' exists since Emacs 22. |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
108 (unless (fboundp 'process-file) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
109 (defalias 'process-file 'tramp-handle-process-file)) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
110 |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
111 ;; `start-file-process' is new in Emacs 23. |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
112 (unless (fboundp 'start-file-process) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
113 (defalias 'start-file-process 'tramp-handle-start-file-process)) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
114 |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
115 ;; `set-file-times' is also new in Emacs 23. |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
116 (unless (fboundp 'set-file-times) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
117 (defalias 'set-file-times 'tramp-handle-set-file-times))) |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
118 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
119 (defsubst tramp-compat-line-end-position () |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
120 "Return point at end of line (compat function). |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
121 Calls `line-end-position' or `point-at-eol' if defined, else |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
122 own implementation." |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
123 (cond |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
124 ((fboundp 'line-end-position) (funcall (symbol-function 'line-end-position))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
125 ((fboundp 'point-at-eol) (funcall (symbol-function 'point-at-eol))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
126 (t (save-excursion (end-of-line) (point))))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
127 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
128 (defsubst tramp-compat-temporary-file-directory () |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
129 "Return name of directory for temporary files (compat function). |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
130 For Emacs, this is the variable `temporary-file-directory', for XEmacs |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
131 this is the function `temp-directory'." |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
132 (cond |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
133 ((boundp 'temporary-file-directory) (symbol-value 'temporary-file-directory)) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
134 ((fboundp 'temp-directory) (funcall (symbol-function 'temp-directory))) |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
135 ((let ((d (getenv "TEMP"))) (and d (file-directory-p d))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
136 (file-name-as-directory (getenv "TEMP"))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
137 ((let ((d (getenv "TMP"))) (and d (file-directory-p d))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
138 (file-name-as-directory (getenv "TMP"))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
139 ((let ((d (getenv "TMPDIR"))) (and d (file-directory-p d))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
140 (file-name-as-directory (getenv "TMPDIR"))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
141 ((file-exists-p "c:/temp") (file-name-as-directory "c:/temp")) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
142 (t (message (concat "Neither `temporary-file-directory' nor " |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
143 "`temp-directory' is defined -- using /tmp.")) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
144 (file-name-as-directory "/tmp")))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
145 |
85041
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
146 ;; `make-temp-file' exists in Emacs only. The third parameter SUFFIX |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
147 ;; has been introduced with Emacs 22. We try it, if it fails, we fall |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
148 ;; back to `make-temp-name', creating the temporary file immediately |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
149 ;; in order to avoid a security hole. |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
150 (defsubst tramp-compat-make-temp-file (filename) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
151 "Create a temporary file (compat function). |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
152 Add the extension of FILENAME, if existing." |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
153 (let ((prefix (expand-file-name |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
154 (symbol-value 'tramp-temp-name-prefix) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
155 (tramp-compat-temporary-file-directory))) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
156 (extension (file-name-extension filename t)) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
157 result) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
158 (condition-case nil |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
159 (setq result |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
160 (funcall (symbol-function 'make-temp-file) prefix nil extension)) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
161 (error |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
162 ;; We use our own implementation, taken from files.el. |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
163 (while |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
164 (condition-case () |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
165 (progn |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
166 (setq result (concat (make-temp-name prefix) extension)) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
167 (write-region |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
168 "" nil result nil 'silent nil |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
169 ;; 7th parameter is MUSTBENEW in Emacs, and |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
170 ;; CODING-SYSTEM in XEmacs. It is not a security |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
171 ;; hole in XEmacs if we cannot use this parameter, |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
172 ;; because XEmacs uses a user-specific subdirectory |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
173 ;; with 0700 permissions. |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
174 (when (not (featurep 'xemacs)) 'excl)) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
175 nil) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
176 (file-already-exists t)) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
177 ;; The file was somehow created by someone else between |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
178 ;; `make-temp-name' and `write-region', let's try again. |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
179 nil))) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
180 result)) |
a42b8750a992
* net/tramp.el (tramp-make-temp-file): Move to tramp-compat.el.
Michael Albinus <michael.albinus@gmx.de>
parents:
85024
diff
changeset
|
181 |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
182 ;; `most-positive-fixnum' arrived in Emacs 22. Before, and in XEmacs, |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
183 ;; it is a fixed value. |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
184 (defsubst tramp-compat-most-positive-fixnum () |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
185 "Return largest positive integer value (compat function)." |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
186 (cond |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
187 ((boundp 'most-positive-fixnum) (symbol-value 'most-positive-fixnum)) |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
188 ;; Default value in XEmacs and Emacs 21. |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
189 (t 134217727))) |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
190 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
191 ;; ID-FORMAT exists since Emacs 22. |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
192 (defun tramp-compat-file-attributes (filename &optional id-format) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
193 "Like `file-attributes' for Tramp files (compat function)." |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
194 (cond |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
195 ((or (null id-format) (eq id-format 'integer)) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
196 (file-attributes filename)) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
197 ((file-remote-p filename) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
198 (funcall (symbol-function 'tramp-handle-file-attributes) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
199 filename id-format)) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
200 (t (condition-case nil |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
201 (funcall (symbol-function 'file-attributes) filename id-format) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
202 (error (file-attributes filename)))))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
203 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
204 ;; PRESERVE-UID-GID has been introduced with Emacs 23. It does not |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
205 ;; hurt to ignore it for other (X)Emacs versions. |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
206 (defun tramp-compat-copy-file |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
207 (filename newname &optional ok-if-already-exists keep-date preserve-uid-gid) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
208 "Like `copy-file' for Tramp files (compat function)." |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
209 (if preserve-uid-gid |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
210 (funcall |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
211 (symbol-function 'copy-file) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
212 filename newname ok-if-already-exists keep-date preserve-uid-gid) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
213 (copy-file filename newname ok-if-already-exists keep-date))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
214 |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
215 ;; `copy-tree' is a built-in function in XEmacs. In Emacs 21, it is |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
216 ;; an auoloaded function in cl-extra.el. Since Emacs 22, it is part |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
217 ;; of subr.el. There are problems when autoloading, therefore we test |
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
218 ;; for for `subrp' and `symbol-file'. Implementation is taken from Emacs23. |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
219 (defun tramp-compat-copy-tree (tree) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
220 "Make a copy of TREE (compat function)." |
85024
ef71cdab0d5c
* net/tramp.el (top): Add tramp-compat to `tramp-unload-hook'.
Michael Albinus <michael.albinus@gmx.de>
parents:
84992
diff
changeset
|
221 (if (or (subrp 'copy-tree) (symbol-file 'copy-tree)) |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
222 (funcall (symbol-function 'copy-tree) tree) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
223 (let (result) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
224 (while (consp tree) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
225 (let ((newcar (car tree))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
226 (if (consp (car tree)) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
227 (setq newcar (tramp-compat-copy-tree (car tree)))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
228 (push newcar result)) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
229 (setq tree (cdr tree))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
230 (nconc (nreverse result) tree)))) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
231 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
232 (provide 'tramp-compat) |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
233 |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
234 ;;; TODO: |
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
235 |
84992 | 236 ;; arch-tag: 0e724b18-6699-4f87-ad96-640b272e5c85 |
84985
f7642749252b
* net/tramp-compat.el: New file.
Michael Albinus <michael.albinus@gmx.de>
parents:
diff
changeset
|
237 ;;; tramp-compat.el ends here |