diff options
| author | Michael Albinus | 2012-07-05 08:57:57 +0200 |
|---|---|---|
| committer | Michael Albinus | 2012-07-05 08:57:57 +0200 |
| commit | 957b3189e673ad7a9d2018411bbaf196338e145b (patch) | |
| tree | 43e1a031c73079f9b584fadacb0ec46639df6fe4 | |
| parent | 23f86fce48e1cc8118f0ea5cce49d1acfd4364c4 (diff) | |
| download | emacs-957b3189e673ad7a9d2018411bbaf196338e145b.tar.gz emacs-957b3189e673ad7a9d2018411bbaf196338e145b.zip | |
Sync with Tramp 2.2.6-pre.
* net/tramp.el (tramp-drop-volume-letter): Provide an XEmacs
compatible declaration.
* net/tramp-cmds.el (tramp-append-tramp-buffers): Protect
`list-load-path-shadows' call.
* net/tramp-compat.el (top): Require packages, which aren't
autoloaded anymore for XEmacs. Protect call of
`tramp-file-name-handler' by `tramp-compat-funcall', pacifying the
compiler. Do not require tramp-util.el and tramp-vc.el anymore,
it hurts at least for SXEmacs.
(tramp-compat-temporary-file-directory): In XEmacs, there is no
standard-value for `temporary-file-directory'.
* net/tramp-sh.el (tramp-do-directory-files-and-attributes-with-stat):
Redirect stderr to /dev/null.
(tramp-sh-handle-write-region): uid and gid can be floats.
Reported by Russell Sim <russell.sim@gmail.com>.
(tramp-sh-handle-vc-registered): Hide errors.
(tramp-vc-file-name-handler): Use dummy results for `process-file'
and `start-file-process'.
(tramp-maybe-open-connection): Check also whether `non-essential'
is bound.
| -rw-r--r-- | lisp/ChangeLog | 28 | ||||
| -rw-r--r-- | lisp/net/tramp-cmds.el | 5 | ||||
| -rw-r--r-- | lisp/net/tramp-compat.el | 36 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 23 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 3 |
5 files changed, 72 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4c9c604f816..adb14d5c75e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,31 @@ | |||
| 1 | 2012-07-05 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | Sync with Tramp 2.2.6-pre. | ||
| 4 | |||
| 5 | * net/tramp.el (tramp-drop-volume-letter): Provide an XEmacs | ||
| 6 | compatible declaration. | ||
| 7 | |||
| 8 | * net/tramp-cmds.el (tramp-append-tramp-buffers): Protect | ||
| 9 | `list-load-path-shadows' call. | ||
| 10 | |||
| 11 | * net/tramp-compat.el (top): Require packages, which aren't | ||
| 12 | autoloaded anymore for XEmacs. Protect call of | ||
| 13 | `tramp-file-name-handler' by `tramp-compat-funcall', pacifying the | ||
| 14 | compiler. Do not require tramp-util.el and tramp-vc.el anymore, | ||
| 15 | it hurts at least for SXEmacs. | ||
| 16 | (tramp-compat-temporary-file-directory): In XEmacs, there is no | ||
| 17 | standard-value for `temporary-file-directory'. | ||
| 18 | |||
| 19 | * net/tramp-sh.el (tramp-do-directory-files-and-attributes-with-stat): | ||
| 20 | Redirect stderr to /dev/null. | ||
| 21 | (tramp-sh-handle-write-region): uid and gid can be floats. | ||
| 22 | Reported by Russell Sim <russell.sim@gmail.com>. | ||
| 23 | (tramp-sh-handle-vc-registered): Hide errors. | ||
| 24 | (tramp-vc-file-name-handler): Use dummy results for `process-file' | ||
| 25 | and `start-file-process'. | ||
| 26 | (tramp-maybe-open-connection): Check also whether `non-essential' | ||
| 27 | is bound. | ||
| 28 | |||
| 1 | 2012-07-04 Chong Yidong <cyd@gnu.org> | 29 | 2012-07-04 Chong Yidong <cyd@gnu.org> |
| 2 | 30 | ||
| 3 | * xml.el (xml--parse-buffer): Use xml-syntax-table. | 31 | * xml.el (xml--parse-buffer): Use xml-syntax-table. |
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 042e51d5c9e..06aae1f6af2 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el | |||
| @@ -295,8 +295,9 @@ buffer in your bug report. | |||
| 295 | ;; Dump load-path shadows. | 295 | ;; Dump load-path shadows. |
| 296 | (insert "\nload-path shadows:\n==================\n") | 296 | (insert "\nload-path shadows:\n==================\n") |
| 297 | (ignore-errors | 297 | (ignore-errors |
| 298 | (mapc (lambda (x) (when (string-match "tramp" x) (insert x "\n"))) | 298 | (mapc |
| 299 | (split-string (list-load-path-shadows t) "\n"))) | 299 | (lambda (x) (when (string-match "tramp" x) (insert x "\n"))) |
| 300 | (split-string (tramp-compat-funcall 'list-load-path-shadows t) "\n"))) | ||
| 300 | 301 | ||
| 301 | ;; Append buffers only when we are in message mode. | 302 | ;; Append buffers only when we are in message mode. |
| 302 | (when (and | 303 | (when (and |
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 9984195627c..c3552ae023b 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el | |||
| @@ -29,8 +29,6 @@ | |||
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | 31 | ||
| 32 | (require 'tramp-loaddefs) | ||
| 33 | |||
| 34 | (eval-when-compile | 32 | (eval-when-compile |
| 35 | 33 | ||
| 36 | ;; Pacify byte-compiler. | 34 | ;; Pacify byte-compiler. |
| @@ -38,11 +36,24 @@ | |||
| 38 | 36 | ||
| 39 | (eval-and-compile | 37 | (eval-and-compile |
| 40 | 38 | ||
| 39 | ;; Some packages must be required for XEmacs, because we compile | ||
| 40 | ;; with -no-autoloads. | ||
| 41 | (when (featurep 'xemacs) | ||
| 42 | (require 'cus-edit) | ||
| 43 | (require 'env) | ||
| 44 | (require 'executable) | ||
| 45 | (require 'outline) | ||
| 46 | (require 'passwd) | ||
| 47 | (require 'pp) | ||
| 48 | (require 'regexp-opt)) | ||
| 49 | |||
| 41 | (require 'advice) | 50 | (require 'advice) |
| 42 | (require 'custom) | 51 | (require 'custom) |
| 43 | (require 'format-spec) | 52 | (require 'format-spec) |
| 44 | (require 'shell) | 53 | (require 'shell) |
| 45 | 54 | ||
| 55 | (require 'tramp-loaddefs) | ||
| 56 | |||
| 46 | ;; As long as password.el is not part of (X)Emacs, it shouldn't be | 57 | ;; As long as password.el is not part of (X)Emacs, it shouldn't be |
| 47 | ;; mandatory. | 58 | ;; mandatory. |
| 48 | (if (featurep 'xemacs) | 59 | (if (featurep 'xemacs) |
| @@ -61,7 +72,8 @@ | |||
| 61 | (require 'timer)) | 72 | (require 'timer)) |
| 62 | 73 | ||
| 63 | ;; We check whether `start-file-process' is bound. | 74 | ;; We check whether `start-file-process' is bound. |
| 64 | (unless (fboundp 'start-file-process) | 75 | ;; Note: we deactivate this. There are problems, at least in SXEmacs. |
| 76 | (unless t;(fboundp 'start-file-process) | ||
| 65 | 77 | ||
| 66 | ;; tramp-util offers integration into other (X)Emacs packages like | 78 | ;; tramp-util offers integration into other (X)Emacs packages like |
| 67 | ;; compile.el, gud.el etc. Not necessary in Emacs 23. | 79 | ;; compile.el, gud.el etc. Not necessary in Emacs 23. |
| @@ -127,7 +139,8 @@ | |||
| 127 | (defalias 'file-remote-p | 139 | (defalias 'file-remote-p |
| 128 | (lambda (file &optional identification connected) | 140 | (lambda (file &optional identification connected) |
| 129 | (when (tramp-tramp-file-p file) | 141 | (when (tramp-tramp-file-p file) |
| 130 | (tramp-file-name-handler | 142 | (tramp-compat-funcall |
| 143 | 'tramp-file-name-handler | ||
| 131 | 'file-remote-p file identification connected))))) | 144 | 'file-remote-p file identification connected))))) |
| 132 | 145 | ||
| 133 | ;; `process-file' does not exist in XEmacs. | 146 | ;; `process-file' does not exist in XEmacs. |
| @@ -153,8 +166,8 @@ | |||
| 153 | (defalias 'set-file-times | 166 | (defalias 'set-file-times |
| 154 | (lambda (filename &optional time) | 167 | (lambda (filename &optional time) |
| 155 | (when (tramp-tramp-file-p filename) | 168 | (when (tramp-tramp-file-p filename) |
| 156 | (tramp-file-name-handler | 169 | (tramp-compat-funcall |
| 157 | 'set-file-times filename time))))) | 170 | 'tramp-file-name-handler 'set-file-times filename time))))) |
| 158 | 171 | ||
| 159 | ;; We currently use "[" and "]" in the filename format for IPv6 | 172 | ;; We currently use "[" and "]" in the filename format for IPv6 |
| 160 | ;; hosts of GNU Emacs. This means that Emacs wants to expand | 173 | ;; hosts of GNU Emacs. This means that Emacs wants to expand |
| @@ -221,11 +234,11 @@ | |||
| 221 | For Emacs, this is the variable `temporary-file-directory', for XEmacs | 234 | For Emacs, this is the variable `temporary-file-directory', for XEmacs |
| 222 | this is the function `temp-directory'." | 235 | this is the function `temp-directory'." |
| 223 | (let (file-name-handler-alist) | 236 | (let (file-name-handler-alist) |
| 237 | ;; We must return a local directory. If it is remote, we could | ||
| 238 | ;; run into an infloop. | ||
| 224 | (cond | 239 | (cond |
| 225 | ;; We must return a local directory. If it is remote, we could | 240 | ((and (boundp 'temporary-file-directory) |
| 226 | ;; run into an infloop. | 241 | (eval (car (get 'temporary-file-directory 'standard-value))))) |
| 227 | ((boundp 'temporary-file-directory) | ||
| 228 | (eval (car (get 'temporary-file-directory 'standard-value)))) | ||
| 229 | ((fboundp 'temp-directory) (tramp-compat-funcall 'temp-directory)) | 242 | ((fboundp 'temp-directory) (tramp-compat-funcall 'temp-directory)) |
| 230 | ((let ((d (getenv "TEMP"))) (and d (file-directory-p d))) | 243 | ((let ((d (getenv "TEMP"))) (and d (file-directory-p d))) |
| 231 | (file-name-as-directory (getenv "TEMP"))) | 244 | (file-name-as-directory (getenv "TEMP"))) |
| @@ -302,7 +315,8 @@ Not actually used. Use `(format \"%o\" i)' instead?" | |||
| 302 | ((or (null id-format) (eq id-format 'integer)) | 315 | ((or (null id-format) (eq id-format 'integer)) |
| 303 | (file-attributes filename)) | 316 | (file-attributes filename)) |
| 304 | ((tramp-tramp-file-p filename) | 317 | ((tramp-tramp-file-p filename) |
| 305 | (tramp-file-name-handler 'file-attributes filename id-format)) | 318 | (tramp-compat-funcall |
| 319 | 'tramp-file-name-handler 'file-attributes filename id-format)) | ||
| 306 | (t (condition-case nil | 320 | (t (condition-case nil |
| 307 | (tramp-compat-funcall 'file-attributes filename id-format) | 321 | (tramp-compat-funcall 'file-attributes filename id-format) |
| 308 | (wrong-number-of-arguments (file-attributes filename)))))) | 322 | (wrong-number-of-arguments (file-attributes filename)))))) |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 1ef602cf6da..6716ef52148 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -1692,9 +1692,10 @@ and gid of the corresponding user is taken. Both parameters must be integers." | |||
| 1692 | ;; "-"; this would confuse xargs. "ls -aQ" might be a solution, | 1692 | ;; "-"; this would confuse xargs. "ls -aQ" might be a solution, |
| 1693 | ;; but it does not work on all remote systems. Therefore, we | 1693 | ;; but it does not work on all remote systems. Therefore, we |
| 1694 | ;; quote the filenames via sed. | 1694 | ;; quote the filenames via sed. |
| 1695 | "cd %s; echo \"(\"; (%s -a | sed -e s/\\$/\\\"/g -e s/^/\\\"/g | xargs " | 1695 | "cd %s; echo \"(\"; (%s -a | sed -e s/\\$/\\\"/g -e s/^/\\\"/g | " |
| 1696 | "%s -c '(\"%%n\" (\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 -1)'); " | 1696 | "xargs %s -c " |
| 1697 | "echo \")\"") | 1697 | "'(\"%%n\" (\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 -1)'" |
| 1698 | " 2>/dev/null); echo \")\"") | ||
| 1698 | (tramp-shell-quote-argument localname) | 1699 | (tramp-shell-quote-argument localname) |
| 1699 | (tramp-get-ls-command vec) | 1700 | (tramp-get-ls-command vec) |
| 1700 | (tramp-get-remote-stat vec) | 1701 | (tramp-get-remote-stat vec) |
| @@ -3284,14 +3285,14 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file." | |||
| 3284 | (let (last-coding-system-used (need-chown t)) | 3285 | (let (last-coding-system-used (need-chown t)) |
| 3285 | ;; Set file modification time. | 3286 | ;; Set file modification time. |
| 3286 | (when (or (eq visit t) (stringp visit)) | 3287 | (when (or (eq visit t) (stringp visit)) |
| 3287 | (let ((file-attr (file-attributes filename))) | 3288 | (let ((file-attr (tramp-compat-file-attributes filename 'integer))) |
| 3288 | (set-visited-file-modtime | 3289 | (set-visited-file-modtime |
| 3289 | ;; We must pass modtime explicitly, because filename can | 3290 | ;; We must pass modtime explicitly, because filename can |
| 3290 | ;; be different from (buffer-file-name), f.e. if | 3291 | ;; be different from (buffer-file-name), f.e. if |
| 3291 | ;; `file-precious-flag' is set. | 3292 | ;; `file-precious-flag' is set. |
| 3292 | (nth 5 file-attr)) | 3293 | (nth 5 file-attr)) |
| 3293 | (when (and (eq (nth 2 file-attr) uid) | 3294 | (when (and (= (nth 2 file-attr) uid) |
| 3294 | (eq (nth 3 file-attr) gid)) | 3295 | (= (nth 3 file-attr) gid)) |
| 3295 | (setq need-chown nil)))) | 3296 | (setq need-chown nil)))) |
| 3296 | 3297 | ||
| 3297 | ;; Set the ownership. | 3298 | ;; Set the ownership. |
| @@ -3332,7 +3333,7 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file." | |||
| 3332 | `((,tramp-file-name-regexp . tramp-vc-file-name-handler)))) | 3333 | `((,tramp-file-name-regexp . tramp-vc-file-name-handler)))) |
| 3333 | 3334 | ||
| 3334 | ;; Here we collect only file names, which need an operation. | 3335 | ;; Here we collect only file names, which need an operation. |
| 3335 | (tramp-run-real-handler 'vc-registered (list file)) | 3336 | (ignore-errors (tramp-run-real-handler 'vc-registered (list file))) |
| 3336 | (tramp-message v 10 "\n%s" tramp-vc-registered-file-names) | 3337 | (tramp-message v 10 "\n%s" tramp-vc-registered-file-names) |
| 3337 | 3338 | ||
| 3338 | ;; Send just one command, in order to fill the cache. | 3339 | ;; Send just one command, in order to fill the cache. |
| @@ -3400,10 +3401,12 @@ Fall back to normal file name handler if no Tramp handler exists." | |||
| 3400 | ((and fn (memq operation '(file-exists-p file-readable-p))) | 3401 | ((and fn (memq operation '(file-exists-p file-readable-p))) |
| 3401 | (add-to-list 'tramp-vc-registered-file-names localname 'append) | 3402 | (add-to-list 'tramp-vc-registered-file-names localname 'append) |
| 3402 | nil) | 3403 | nil) |
| 3404 | ;; `process-file' and `start-file-process' shall be ignored. | ||
| 3405 | ((and fn (eq operation 'process-file) 0)) | ||
| 3406 | ((and fn (eq operation 'start-file-process) nil)) | ||
| 3403 | ;; Tramp file name handlers like `expand-file-name'. They | 3407 | ;; Tramp file name handlers like `expand-file-name'. They |
| 3404 | ;; must still work. | 3408 | ;; must still work. |
| 3405 | (fn | 3409 | (fn (save-match-data (apply (cdr fn) args))) |
| 3406 | (save-match-data (apply (cdr fn) args))) | ||
| 3407 | ;; Default file name handlers, we don't care. | 3410 | ;; Default file name handlers, we don't care. |
| 3408 | (t (tramp-run-real-handler operation args))))))) | 3411 | (t (tramp-run-real-handler operation args))))))) |
| 3409 | 3412 | ||
| @@ -4294,7 +4297,7 @@ connection if a previous connection has died for some reason." | |||
| 4294 | (tramp-get-buffer vec) | 4297 | (tramp-get-buffer vec) |
| 4295 | 4298 | ||
| 4296 | ;; If `non-essential' is non-nil, don't reopen a new connection. | 4299 | ;; If `non-essential' is non-nil, don't reopen a new connection. |
| 4297 | (when non-essential | 4300 | (when (and (boundp 'non-essential) (symbol-value 'non-essential)) |
| 4298 | (throw 'non-essential 'non-essential)) | 4301 | (throw 'non-essential 'non-essential)) |
| 4299 | 4302 | ||
| 4300 | (tramp-with-progress-reporter | 4303 | (tramp-with-progress-reporter |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index d0e8b35d6ca..5e70bab24e9 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1531,6 +1531,9 @@ letter into the file name. This function removes it." | |||
| 1531 | 1531 | ||
| 1532 | 'identity)) | 1532 | 'identity)) |
| 1533 | 1533 | ||
| 1534 | (if (featurep 'xemacs) | ||
| 1535 | (defalias 'tramp-drop-volume-letter 'identity)) | ||
| 1536 | |||
| 1534 | (defun tramp-cleanup (vec) | 1537 | (defun tramp-cleanup (vec) |
| 1535 | "Cleanup connection VEC, but keep the debug buffer." | 1538 | "Cleanup connection VEC, but keep the debug buffer." |
| 1536 | (with-current-buffer (tramp-get-debug-buffer vec) | 1539 | (with-current-buffer (tramp-get-debug-buffer vec) |