emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115099: * net/tramp-gvfs.el (top): Run init code on


From: Michael Albinus
Subject: [Emacs-diffs] trunk r115099: * net/tramp-gvfs.el (top): Run init code only when
Date: Thu, 14 Nov 2013 07:36:52 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115099
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Thu 2013-11-14 08:36:39 +0100
message:
  * net/tramp-gvfs.el (top): Run init code only when
  `tramp-gvfs-enabled' is not nil.
  (tramp-gvfs-enabled): Check also :system bus.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/tramp-gvfs.el         
trampgvfs.el-20091113204419-o5vbwnq5f7feedwu-10898
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-11-14 02:58:51 +0000
+++ b/lisp/ChangeLog    2013-11-14 07:36:39 +0000
@@ -1,3 +1,9 @@
+2013-11-14  Michael Albinus  <address@hidden>
+
+       * net/tramp-gvfs.el (top): Run init code only when
+       `tramp-gvfs-enabled' is not nil.
+       (tramp-gvfs-enabled): Check also :system bus.
+
 2013-11-14  Stefan Monnier  <address@hidden>
 
        Sync with upstream verilog-mode revision 78e66ba.

=== modified file 'lisp/net/tramp-gvfs.el'
--- a/lisp/net/tramp-gvfs.el    2013-11-13 15:28:06 +0000
+++ b/lisp/net/tramp-gvfs.el    2013-11-14 07:36:39 +0000
@@ -153,6 +153,7 @@
 (defconst tramp-gvfs-enabled
   (ignore-errors
     (and (featurep 'dbusbind)
+        (tramp-compat-funcall 'dbus-get-unique-name :system)
         (tramp-compat-funcall 'dbus-get-unique-name :session)
         (or (tramp-compat-process-running-p "gvfs-fuse-daemon")
             (tramp-compat-process-running-p "gvfsd-fuse"))))
@@ -1621,9 +1622,10 @@
        :system tramp-bluez-service (dbus-event-path-name last-input-event)
        tramp-bluez-interface-adapter "StopDiscovery")))))
 
-(dbus-register-signal
- :system nil nil tramp-bluez-interface-adapter "PropertyChanged"
- 'tramp-bluez-property-changed)
+(when tramp-gvfs-enabled
+  (dbus-register-signal
+   :system nil nil tramp-bluez-interface-adapter "PropertyChanged"
+   'tramp-bluez-property-changed))
 
 (defun tramp-bluez-device-found (device args)
   "Signal handler for the \"org.bluez.Adapter.DeviceFound\" signal."
@@ -1634,9 +1636,10 @@
     ;; device, and call also SDP in order to find the obex service.
     (add-to-list 'tramp-bluez-devices (list alias address))))
 
-(dbus-register-signal
- :system nil nil tramp-bluez-interface-adapter "DeviceFound"
- 'tramp-bluez-device-found)
+(when tramp-gvfs-enabled
+  (dbus-register-signal
+   :system nil nil tramp-bluez-interface-adapter "DeviceFound"
+   'tramp-bluez-device-found))
 
 (defun tramp-bluez-parse-device-names (_ignore)
   "Return a list of (nil host) tuples allowed to access."
@@ -1645,7 +1648,8 @@
    (tramp-bluez-list-devices)))
 
 ;; Add completion function for OBEX method.
-(when (member tramp-bluez-service (dbus-list-known-names :system))
+(when (and tramp-gvfs-enabled
+          (member tramp-bluez-service (dbus-list-known-names :system)))
   (tramp-set-completion-function
    "obex" '((tramp-bluez-parse-device-names ""))))
 
@@ -1678,7 +1682,8 @@
    (zeroconf-list-services "_webdav._tcp")))
 
 ;; Add completion function for DAV and DAVS methods.
-(when (member zeroconf-service-avahi (dbus-list-known-names :system))
+(when (and tramp-gvfs-enabled
+          (member zeroconf-service-avahi (dbus-list-known-names :system)))
   (zeroconf-init tramp-gvfs-zeroconf-domain)
   (tramp-set-completion-function
    "sftp" '((tramp-zeroconf-parse-workstation-device-names "")))
@@ -1718,8 +1723,9 @@
    (tramp-synce-list-devices)))
 
 ;; Add completion function for SYNCE method.
-(tramp-set-completion-function
- "synce" '((tramp-synce-parse-device-names "")))
+(when tramp-gvfs-enabled
+  (tramp-set-completion-function
+   "synce" '((tramp-synce-parse-device-names ""))))
 
 (add-hook 'tramp-unload-hook
          (lambda ()


reply via email to

[Prev in Thread] Current Thread [Next in Thread]