]> git.eshelyaron.com Git - emacs.git/commitdiff
Sync with Tramp 2.0.54.
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 29 Aug 2006 05:48:40 +0000 (05:48 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 29 Aug 2006 05:48:40 +0000 (05:48 +0000)
lisp/ChangeLog
lisp/net/tramp.el
lisp/net/trampver.el
man/ChangeLog
man/tramp.texi
man/trampver.texi

index b857f9e85ec0af6b70d9d226f01e0dcc9326c7e6..1aeaf174e37593e83ac8be9fe28635519a198b1e 100644 (file)
@@ -1,3 +1,18 @@
+2006-08-29  Michael Albinus  <michael.albinus@gmx.de>
+
+       Sync with Tramp 2.0.54.
+
+       * net/tramp.el (tramp-convert-file-attributes): Call `eql' instead
+       of `=', because `tramp-get-remote-gid' might not always return an
+       integer when expected.
+       (tramp-register-file-name-handlers): `partial-completion-mode' is
+       unknown to XEmacs.
+       (tramp-time-diff): Don't use `floor', it might fail for large
+       differences.
+       (tramp-handle-make-auto-save-file-name): For Emacs 21, set
+       `tramp-auto-save-directory' if unset in order to guarantee unique
+       auto-save file names.
+
 2006-08-28  Chong Yidong  <cyd@stupidchicken.com>
 
        * image-mode.el (image-mode): Display image as text on a terminal.
index cb5a6d753310c51c7caffe526201e19c54d2deba..97b08e7e704ae8ef79e7813fbf8ae87873898714 100644 (file)
@@ -3888,37 +3888,50 @@ This will break if COMMAND prints a newline, followed by the value of
 (defun tramp-handle-make-auto-save-file-name ()
   "Like `make-auto-save-file-name' for tramp files.
 Returns a file name in `tramp-auto-save-directory' for autosaving this file."
-  (when tramp-auto-save-directory
-    (unless (file-exists-p tramp-auto-save-directory)
-      (make-directory tramp-auto-save-directory t)))
-  ;; jka-compr doesn't like auto-saving, so by appending "~" to the
-  ;; file name we make sure that jka-compr isn't used for the
-  ;; auto-save file.
-  (let ((buffer-file-name
-        (if tramp-auto-save-directory
-            (expand-file-name
-             (tramp-subst-strs-in-string
-              '(("_" . "|")
-                ("/" . "_a")
-                (":" . "_b")
-                ("|" . "__")
-                ("[" . "_l")
-                ("]" . "_r"))
-              (buffer-file-name))
-             tramp-auto-save-directory)
-          (buffer-file-name))))
-    ;; Run plain `make-auto-save-file-name'.  There might be an advice when
-    ;; it is not a magic file name operation (since Emacs 22).
-    ;; We must deactivate it temporarily.
-    (if (not (ad-is-active 'make-auto-save-file-name))
-       (tramp-run-real-handler
-        'make-auto-save-file-name nil)
-      ;; else
-      (ad-deactivate 'make-auto-save-file-name)
-      (prog1
-       (tramp-run-real-handler
-       'make-auto-save-file-name nil)
-       (ad-activate 'make-auto-save-file-name)))))
+  (let ((tramp-auto-save-directory tramp-auto-save-directory))
+    ;; File name must be unique.  This is ensured with Emacs 22 (see
+    ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for
+    ;; all other cases we must do it ourselves.
+    (when (boundp 'auto-save-file-name-transforms)
+      (mapcar
+       '(lambda (x)
+         (when (and (string-match (car x) buffer-file-name)
+                    (not (car (cddr x))))
+           (setq tramp-auto-save-directory
+                 (or tramp-auto-save-directory temporary-file-directory))))
+       (symbol-value 'auto-save-file-name-transforms)))
+    ;; Create directory.
+    (when tramp-auto-save-directory
+      (unless (file-exists-p tramp-auto-save-directory)
+       (make-directory tramp-auto-save-directory t)))
+    ;; jka-compr doesn't like auto-saving, so by appending "~" to the
+    ;; file name we make sure that jka-compr isn't used for the
+    ;; auto-save file.
+    (let ((buffer-file-name
+          (if tramp-auto-save-directory
+              (expand-file-name
+               (tramp-subst-strs-in-string
+                '(("_" . "|")
+                  ("/" . "_a")
+                  (":" . "_b")
+                  ("|" . "__")
+                  ("[" . "_l")
+                  ("]" . "_r"))
+                (buffer-file-name))
+               tramp-auto-save-directory)
+            (buffer-file-name))))
+      ;; Run plain `make-auto-save-file-name'.  There might be an advice when
+      ;; it is not a magic file name operation (since Emacs 22).
+      ;; We must deactivate it temporarily.
+      (if (not (ad-is-active 'make-auto-save-file-name))
+         (tramp-run-real-handler
+          'make-auto-save-file-name nil)
+       ;; else
+       (ad-deactivate 'make-auto-save-file-name)
+       (prog1
+           (tramp-run-real-handler
+            'make-auto-save-file-name nil)
+         (ad-activate 'make-auto-save-file-name))))))
 
 
 ;; CCC grok APPEND, LOCKNAME, CONFIRM
@@ -4333,7 +4346,12 @@ Falls back to normal file name handler if no tramp file name handler exists."
   "Add tramp file name handlers to `file-name-handler-alist'."
   (add-to-list 'file-name-handler-alist
               (cons tramp-file-name-regexp 'tramp-file-name-handler))
-  (when (or partial-completion-mode (featurep 'ido))
+  ;; `partial-completion-mode' is unknown in XEmacs.  So we should
+  ;; load it unconditionally there.  In the GNU Emacs case, method/
+  ;; user/host name completion shall be bound to `partial-completion-mode'.
+  (when (or (not (boundp 'partial-completion-mode))
+           (symbol-value 'partial-completion-mode)
+           (featurep 'ido))
     (add-to-list 'file-name-handler-alist
                 (cons tramp-completion-file-name-regexp
                       'tramp-completion-file-name-handler))
@@ -6749,8 +6767,8 @@ Return ATTR."
   ;; Set file's gid change bit.  Possible only when id-format is 'integer.
   (when (numberp (nth 3 attr))
     (setcar (nthcdr 9 attr)
-           (not (= (nth 3 attr)
-                   (tramp-get-remote-gid multi-method method user host)))))
+           (not (eql (nth 3 attr)
+                     (tramp-get-remote-gid multi-method method user host)))))
   ;; Set virtual device number.
   (setcar (nthcdr 11 attr)
           (tramp-get-device multi-method method user host))
@@ -7200,10 +7218,7 @@ Invokes `password-read' if available, `read-passwd' else."
 
 (defun tramp-time-diff (t1 t2)
   "Return the difference between the two times, in seconds.
-T1 and T2 are time values (as returned by `current-time' for example).
-
-NOTE: This function will fail if the time difference is too large to
-fit in an integer."
+T1 and T2 are time values (as returned by `current-time' for example)."
   ;; Pacify byte-compiler with `symbol-function'.
   (cond ((and (fboundp 'subtract-time)
              (fboundp 'float-time))
@@ -7214,10 +7229,9 @@ fit in an integer."
          (funcall (symbol-function 'time-to-seconds)
                  (funcall (symbol-function 'subtract-time) t1 t2)))
         ((fboundp 'itimer-time-difference)
-         (floor (funcall
-                (symbol-function 'itimer-time-difference)
-                (if (< (length t1) 3) (append t1 '(0)) t1)
-                (if (< (length t2) 3) (append t2 '(0)) t2))))
+        (funcall (symbol-function 'itimer-time-difference)
+                 (if (< (length t1) 3) (append t1 '(0)) t1)
+                 (if (< (length t2) 3) (append t2 '(0)) t2)))
         (t
          ;; snarfed from Emacs 21 time-date.el; combining
         ;; time-to-seconds and subtract-time
index c7edf9a4cdca8cc6b2f14554f7498a6c5e2af548..710022f885b4b3eac29517dcc42387ef91b3868a 100644 (file)
@@ -30,7 +30,7 @@
 ;; are auto-frobbed from configure.ac, so you should edit that file and run
 ;; "autoconf && ./configure" to change them.
 
-(defconst tramp-version "2.0.53"
+(defconst tramp-version "2.0.54"
   "This version of Tramp.")
 
 (defconst tramp-bug-report-address "tramp-devel@gnu.org"
index c43e6cf55ae20f573e32b2b5792653a6ce8a9e64..d4784911c0c9cd32409cf7ca7fd24c1f34278a21 100644 (file)
@@ -1,3 +1,10 @@
+2006-08-29  Michael Albinus  <michael.albinus@gmx.de>
+
+       Sync with Tramp 2.0.54.
+
+       * tramp.texi (Bug Reports): The Tramp mailing list is moderated
+       now.  Suggested by Adrian Phillips <a.phillips@met.no>.
+
 2006-08-28  Richard Stallman  <rms@gnu.org>
 
        * windows.texi (Split Window): Update xref.
index e7d7b3d6b8de73e211c83123ea7d3cfff381beac..b85347461ca4a26ee07aeb8cd782046a933d8265 100644 (file)
@@ -1931,12 +1931,16 @@ navigation in the @file{*Compilation*} buffer.
 @chapter Reporting Bugs and Problems
 @cindex bug reports
 
-Bugs and problems with @value{tramp} are actively worked on by the development
-team. Feature requests and suggestions are also more than welcome.
-
-The @value{tramp} mailing list is a great place to get information on working
-with @value{tramp}, solving problems and general discussion and advice on topics
-relating to the package.
+Bugs and problems with @value{tramp} are actively worked on by the
+development team. Feature requests and suggestions are also more than
+welcome.
+
+The @value{tramp} mailing list is a great place to get information on
+working with @value{tramp}, solving problems and general discussion
+and advice on topics relating to the package.  It is moderated so
+non-subscribers can post but messages will be delayed, possibly up to
+48 hours (or longer in case of holidays), until the moderator approves
+your message.
 
 The mailing list is at @email{tramp-devel@@gnu.org}.  Messages sent to
 this address go to all the subscribers. This is @emph{not} the address
index 4fc3958b2f22accb19628d75484ff825281361d6..bf220f4b195b63f07e61f4dbb2e0579fec359dee 100644 (file)
@@ -4,7 +4,7 @@
 @c In the Tramp CVS, the version number is auto-frobbed from
 @c configure.ac, so you should edit that file and run
 @c "autoconf && ./configure" to change the version number.
-@set trampver 2.0.53
+@set trampver 2.0.54
 
 @c Other flags from configuration
 @set prefix /usr/local