diff options
Diffstat (limited to 'lisp/net/browse-url.el')
-rw-r--r-- | lisp/net/browse-url.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index b269c165ffa..89b1b03e264 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -953,7 +953,9 @@ used instead of `browse-url-new-window-flag'." url args)) (defun browse-url-can-use-xdg-open () - "Check if xdg-open can be used, i.e. we are on Gnome, KDE, Xfce4 or LXDE." + "Return non-nil if the \"xdg-open\" program can be used. +xdg-open is a desktop utility that calls your preferred web browser. +This requires you to be running either Gnome, KDE, Xfce4 or LXDE." (and (getenv "DISPLAY") (executable-find "xdg-open") ;; xdg-open may call gnome-open and that does not wait for its child @@ -976,6 +978,7 @@ used instead of `browse-url-new-window-flag'." (eq 0 (call-process "/bin/sh" nil nil nil "-c" + ;; FIXME use string-match rather than grep. "xprop -root _DT_SAVE_MODE|grep xfce4")) (error nil)) (member (getenv "DESKTOP_SESSION") '("LXDE" "Lubuntu")) @@ -983,7 +986,10 @@ used instead of `browse-url-new-window-flag'." ;;;###autoload -(defun browse-url-xdg-open (url &optional new-window) +(defun browse-url-xdg-open (url &optional ignored) + "Pass the specified URL to the \"xdg-open\" command. +xdg-open is a desktop utility that calls your preferred web browser. +The optional argument IGNORED is not used." (interactive (browse-url-interactive-arg "URL: ")) (call-process "xdg-open" nil 0 nil url)) |