changeset 37803:ae3f8f955b05

(browse-url-browser-function): Add kde. (browse-url-kde-program, browse-url-kde-args): New variables. (browse-url-kde): New function.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 18 May 2001 11:27:38 +0000
parents 953a442c9130
children 6dd68b0155bc
files lisp/net/browse-url.el
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/browse-url.el	Fri May 18 11:26:06 2001 +0000
+++ b/lisp/net/browse-url.el	Fri May 18 11:27:38 2001 +0000
@@ -49,6 +49,7 @@
 ;; browse-url-generic                 arbitrary
 ;; browse-url-default-windows-browser MS-Windows browser
 ;; browse-url-gnome-moz               GNOME interface to Mozilla
+;; browse-url-kde                     KDE konqueror (kfm)
 
 ;; [A version of the Netscape browser is now free software
 ;; <URL:http://www.mozilla.org/>, albeit not GPLed, so it is
@@ -261,6 +262,7 @@
 			 :value browse-url-lynx-emacs)
 	  (function-item :tag "Grail" :value  browse-url-grail)
 	  (function-item :tag "MMM" :value  browse-url-mmm)
+	  (function-item :tag "KDE" :value browse-url-kde)
 	  (function-item :tag "Specified by `Browse Url Generic Program'"
 			 :value browse-url-generic)
 	  (function-item :tag "Default Windows browser"
@@ -480,6 +482,17 @@
 (defcustom browse-url-lynx-input-delay 0.2
   "How many seconds to wait for lynx between moves down from an input field.")
 
+(defcustom browse-url-kde-program "kfmclient"
+  "The name by which to invoke the KDE web browser."
+  :type 'string
+  :version "21.1"
+  :group 'browse-url)
+
+(defcustom browse-url-kde-args '("openURL")
+  "*A list of strings defining options for `browse-url-kde-program'."
+  :type '(repeat (string :tag "Argument"))
+  :group 'browse-url)
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; URL input
 
@@ -1071,6 +1084,15 @@
 	 browse-url-generic-program
 	 (append browse-url-generic-args (list url))))
 
+;;;###autoload
+(defun browse-url-kde (url &optional new-window)
+  "Ask the KDE WWW browser to load URL.
+Default to the URL around or before point."
+  (interactive (browse-url-interactive-arg "KDE URL: "))
+  (message "Sending URL to KDE...")
+  (apply #'start-process `(,(concat "KDE" url) nil ,browse-url-kde-program
+			   ,@browse-url-kde-args ,url)))
+
 (provide 'browse-url)
 
 ;;; browse-url.el ends here