[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v |
Date: |
Tue, 29 Aug 2006 05:48:42 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Michael Albinus <albinus> 06/08/29 05:48:40
Index: lisp/net/tramp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -b -r1.100 -r1.101
--- lisp/net/tramp.el 2 Jul 2006 20:29:20 -0000 1.100
+++ lisp/net/tramp.el 29 Aug 2006 05:48:40 -0000 1.101
@@ -3888,6 +3888,19 @@
(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."
+ (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)))
@@ -3918,7 +3931,7 @@
(prog1
(tramp-run-real-handler
'make-auto-save-file-name nil)
- (ad-activate 'make-auto-save-file-name)))))
+ (ad-activate 'make-auto-save-file-name))))))
;; CCC grok APPEND, LOCKNAME, CONFIRM
@@ -4333,7 +4346,12 @@
"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,7 +6767,7 @@
;; 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)
+ (not (eql (nth 3 attr)
(tramp-get-remote-gid multi-method method user host)))))
;; Set virtual device number.
(setcar (nthcdr 11 attr)
@@ -7200,10 +7218,7 @@
(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 @@
(funcall (symbol-function 'time-to-seconds)
(funcall (symbol-function 'subtract-time) t1 t2)))
((fboundp 'itimer-time-difference)
- (floor (funcall
- (symbol-function 'itimer-time-difference)
+ (funcall (symbol-function 'itimer-time-difference)
(if (< (length t1) 3) (append t1 '(0)) t1)
- (if (< (length t2) 3) (append t2 '(0)) t2))))
+ (if (< (length t2) 3) (append t2 '(0)) t2)))
(t
;; snarfed from Emacs 21 time-date.el; combining
;; time-to-seconds and subtract-time
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/net/tramp.el,v,
Michael Albinus <=