aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2013-11-14 08:36:39 +0100
committerMichael Albinus2013-11-14 08:36:39 +0100
commit2f7e72f83dbfb3edb6add0cc81b09e5a70167faa (patch)
treea7f65c39c54f9a5e48fa26fb51abff81834d31d1 /lisp
parent0f137a73cd7f238e6e3da4bf8f42252bcbe731e4 (diff)
downloademacs-2f7e72f83dbfb3edb6add0cc81b09e5a70167faa.tar.gz
emacs-2f7e72f83dbfb3edb6add0cc81b09e5a70167faa.zip
* net/tramp-gvfs.el (top): Run init code only when
`tramp-gvfs-enabled' is not nil. (tramp-gvfs-enabled): Check also :system bus.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/tramp-gvfs.el26
2 files changed, 22 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 66da03f4b72..55d12e69fc0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12013-11-14 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp-gvfs.el (top): Run init code only when
4 `tramp-gvfs-enabled' is not nil.
5 (tramp-gvfs-enabled): Check also :system bus.
6
12013-11-14 Stefan Monnier <monnier@iro.umontreal.ca> 72013-11-14 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 Sync with upstream verilog-mode revision 78e66ba. 9 Sync with upstream verilog-mode revision 78e66ba.
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index ba399284257..9bb142bd50a 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -153,6 +153,7 @@
153(defconst tramp-gvfs-enabled 153(defconst tramp-gvfs-enabled
154 (ignore-errors 154 (ignore-errors
155 (and (featurep 'dbusbind) 155 (and (featurep 'dbusbind)
156 (tramp-compat-funcall 'dbus-get-unique-name :system)
156 (tramp-compat-funcall 'dbus-get-unique-name :session) 157 (tramp-compat-funcall 'dbus-get-unique-name :session)
157 (or (tramp-compat-process-running-p "gvfs-fuse-daemon") 158 (or (tramp-compat-process-running-p "gvfs-fuse-daemon")
158 (tramp-compat-process-running-p "gvfsd-fuse")))) 159 (tramp-compat-process-running-p "gvfsd-fuse"))))
@@ -1621,9 +1622,10 @@ be used."
1621 :system tramp-bluez-service (dbus-event-path-name last-input-event) 1622 :system tramp-bluez-service (dbus-event-path-name last-input-event)
1622 tramp-bluez-interface-adapter "StopDiscovery"))))) 1623 tramp-bluez-interface-adapter "StopDiscovery")))))
1623 1624
1624(dbus-register-signal 1625(when tramp-gvfs-enabled
1625 :system nil nil tramp-bluez-interface-adapter "PropertyChanged" 1626 (dbus-register-signal
1626 'tramp-bluez-property-changed) 1627 :system nil nil tramp-bluez-interface-adapter "PropertyChanged"
1628 'tramp-bluez-property-changed))
1627 1629
1628(defun tramp-bluez-device-found (device args) 1630(defun tramp-bluez-device-found (device args)
1629 "Signal handler for the \"org.bluez.Adapter.DeviceFound\" signal." 1631 "Signal handler for the \"org.bluez.Adapter.DeviceFound\" signal."
@@ -1634,9 +1636,10 @@ be used."
1634 ;; device, and call also SDP in order to find the obex service. 1636 ;; device, and call also SDP in order to find the obex service.
1635 (add-to-list 'tramp-bluez-devices (list alias address)))) 1637 (add-to-list 'tramp-bluez-devices (list alias address))))
1636 1638
1637(dbus-register-signal 1639(when tramp-gvfs-enabled
1638 :system nil nil tramp-bluez-interface-adapter "DeviceFound" 1640 (dbus-register-signal
1639 'tramp-bluez-device-found) 1641 :system nil nil tramp-bluez-interface-adapter "DeviceFound"
1642 'tramp-bluez-device-found))
1640 1643
1641(defun tramp-bluez-parse-device-names (_ignore) 1644(defun tramp-bluez-parse-device-names (_ignore)
1642 "Return a list of (nil host) tuples allowed to access." 1645 "Return a list of (nil host) tuples allowed to access."
@@ -1645,7 +1648,8 @@ be used."
1645 (tramp-bluez-list-devices))) 1648 (tramp-bluez-list-devices)))
1646 1649
1647;; Add completion function for OBEX method. 1650;; Add completion function for OBEX method.
1648(when (member tramp-bluez-service (dbus-list-known-names :system)) 1651(when (and tramp-gvfs-enabled
1652 (member tramp-bluez-service (dbus-list-known-names :system)))
1649 (tramp-set-completion-function 1653 (tramp-set-completion-function
1650 "obex" '((tramp-bluez-parse-device-names "")))) 1654 "obex" '((tramp-bluez-parse-device-names ""))))
1651 1655
@@ -1678,7 +1682,8 @@ be used."
1678 (zeroconf-list-services "_webdav._tcp"))) 1682 (zeroconf-list-services "_webdav._tcp")))
1679 1683
1680;; Add completion function for DAV and DAVS methods. 1684;; Add completion function for DAV and DAVS methods.
1681(when (member zeroconf-service-avahi (dbus-list-known-names :system)) 1685(when (and tramp-gvfs-enabled
1686 (member zeroconf-service-avahi (dbus-list-known-names :system)))
1682 (zeroconf-init tramp-gvfs-zeroconf-domain) 1687 (zeroconf-init tramp-gvfs-zeroconf-domain)
1683 (tramp-set-completion-function 1688 (tramp-set-completion-function
1684 "sftp" '((tramp-zeroconf-parse-workstation-device-names ""))) 1689 "sftp" '((tramp-zeroconf-parse-workstation-device-names "")))
@@ -1718,8 +1723,9 @@ They are retrieved from the hal daemon."
1718 (tramp-synce-list-devices))) 1723 (tramp-synce-list-devices)))
1719 1724
1720;; Add completion function for SYNCE method. 1725;; Add completion function for SYNCE method.
1721(tramp-set-completion-function 1726(when tramp-gvfs-enabled
1722 "synce" '((tramp-synce-parse-device-names ""))) 1727 (tramp-set-completion-function
1728 "synce" '((tramp-synce-parse-device-names ""))))
1723 1729
1724(add-hook 'tramp-unload-hook 1730(add-hook 'tramp-unload-hook
1725 (lambda () 1731 (lambda ()