]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (top): Make check for tramp-gvfs loading more
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 4 Aug 2009 03:32:33 +0000 (03:32 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 4 Aug 2009 03:32:33 +0000 (03:32 +0000)
robust.
(tramp-handle-insert-file-contents): `unwind-protect' must be
inside `with-parsed-tramp-file-name'.

lisp/ChangeLog
lisp/net/tramp.el

index d451a9620b65cb3b1dd1e6b7b450d46c7ccaffa9..2d55c0bb457d6cc753fabfad811ab0fb8c60e760 100644 (file)
@@ -1,3 +1,13 @@
+2009-08-04  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (top): Make check for tramp-gvfs loading more
+       robust.
+       (tramp-handle-insert-file-contents): `unwind-protect' must be
+       inside `with-parsed-tramp-file-name'.
+
+       * net/tramp-gvfs.el (top): Remove superfluous message when loading
+       fails.
+
 2009-08-03  Nick Roberts  <nickrob@snap.net.nz>
 
        * progmodes/gud.el (jdb): Set gud-jdb-classpath-string to current
index df2f10ba5dd5f2254199b2450c7fc6ed4d7d84ec..4ccf2ab6e58e68792f0c30485a47f7038a1c18f0 100644 (file)
         ;; tramp-gvfs needs D-Bus messages.  Available since Emacs 23
         ;; on some system types.
         (when (and (featurep 'dbusbind)
+                   (condition-case nil
+                       (funcall 'dbus-get-unique-name :session)
+                     (error nil))
                    (tramp-compat-process-running-p "gvfs-fuse-daemon"))
           'tramp-gvfs)
 
@@ -4213,9 +4216,8 @@ coding system might not be determined.  This function repairs it."
   (barf-if-buffer-read-only)
   (setq filename (expand-file-name filename))
   (let (coding-system-used result local-copy remote-copy)
-    (unwind-protect
-       (with-parsed-tramp-file-name filename nil
-
+    (with-parsed-tramp-file-name filename nil
+      (unwind-protect
          (if (not (file-exists-p filename))
              ;; We don't raise a Tramp error, because it might be
              ;; suppressed, like in `find-file-noselect-1'.
@@ -4286,20 +4288,20 @@ coding system might not be determined.  This function repairs it."
              (tramp-message
               v 4 "Inserting local temp file `%s'...done" local-copy)
              (when (boundp 'last-coding-system-used)
-               (set 'last-coding-system-used coding-system-used)))))
+               (set 'last-coding-system-used coding-system-used))))
 
-      ;; Save exit.
-      (progn
-       (when visit
-         (setq buffer-file-name filename)
-         (setq buffer-read-only (not (file-writable-p filename)))
-         (set-visited-file-modtime)
-         (set-buffer-modified-p nil))
-       (when (stringp local-copy)
-         (delete-file local-copy))
-       (when (stringp remote-copy)
-         (delete-file
-          (tramp-make-tramp-file-name method user host remote-copy)))))
+       ;; Save exit.
+       (progn
+         (when visit
+           (setq buffer-file-name filename)
+           (setq buffer-read-only (not (file-writable-p filename)))
+           (set-visited-file-modtime)
+           (set-buffer-modified-p nil))
+         (when (stringp local-copy)
+           (delete-file local-copy))
+         (when (stringp remote-copy)
+           (delete-file
+            (tramp-make-tramp-file-name method user host remote-copy))))))
 
     ;; Result.
     (list (expand-file-name filename)
@@ -4919,7 +4921,7 @@ Falls back to normal file name handler if no Tramp file name handler exists."
            (cons jka (delete jka file-name-handler-alist))))))
 
 ;; During autoload, it shall be checked whether
-;; `partial-completion-mode' is active.  Therefore registering of
+;; `partial-completion-mode' is active.  Therefore, registering of
 ;; `tramp-completion-file-name-handler' will be delayed.
 ;;;###autoload(add-hook
 ;;;###autoload 'after-init-hook