This patch extends yesterdays patch to allow psgml-html to preview
html using kfm.
Note that it is not necessary to check whether kfm is running. If you
use kde then kfm has to be running.
--- mail-lib/browse-url.el 1999/02/15 18:59:56 1.1
+++ mail-lib/browse-url.el 1999/02/15 19:02:30
@@ -48,6 +48,7 @@
;; browse-url-iximosaic IXI Mosaic ?
;; browse-url-lynx-* Lynx 0
;; browse-url-grail Grail 0.3b1
+;; browse-url-kfm kde
;; Note that versions of Netscape before 1.1b1 did not have remote
;; control. <
URL:http://www.netscape.com/newsref/std/x-remote.html>
@@ -341,6 +342,9 @@
;; b-u-file-url encodes fewer chars. Multi-display support for
;; Netscape. Thanks Richard Mlynarik <mly(a)adoc.xerox.com>
+;; 0.39 15 Feb 1999
+;; Add kfm <nbecker(a)fred.net>
+
;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -384,6 +388,7 @@
(function-item browse-url-lynx-xterm)
(function-item browse-url-lynx-emacs)
(function-item browse-url-grail)
+ (function-item browse-url-kfm)
(function :tag "Other" nil))
:group 'browse-url)
@@ -869,6 +874,15 @@
((fboundp 'terminal-emulator)
(terminal-emulator "*browse-url*" "lynx" (list url)))
(t (error "No terminal emulation in this XEmacs")))))
+
+;;;###autoload
+(defun browse-url-kfm (url &optional new-window)
+ ;; new-window ignored
+ "Ask the kfm WWW browser to load URL.
+Default to the URL around or before point."
+ (interactive (browse-url-interactive-arg "kfm URL: "))
+ (message "Sending URL to kfm...")
+ (start-process "kfmclient" nil "kfmclient" "openURL"
url))
(provide 'browse-url)
--- mail-lib/highlight-headers.el 1999/02/16 15:29:01 1.1
+++ mail-lib/highlight-headers.el 1999/02/16 15:32:14
@@ -468,7 +468,8 @@
'w3-fetch == Use emacs-w3
'highlight-headers-follow-url-netscape == Use Netscape
-'highlight-headers-follow-url-mosaic == Use Mosaic")
+'highlight-headers-follow-url-mosaic == Use Mosaic
+'highlight-headers-follow-url-kfm == Use kfm")
(defvar highlight-headers-follow-url-netscape-auto-raise t
"*Whether to make Netscape auto-raise when a URL is sent to it.")
@@ -498,6 +499,11 @@
;; it didn't work, so start a new Netscape process.
(call-process "netscape" nil 0 nil url)))
(message "Sending %s to Netscape... done" url))
+
+;;;###autoload
+(defun highlight-headers-follow-url-kfm (url)
+ (message "Sending %s to kfm..." url)
+ (start-process "kfmclient" nil "kfmclient" "openURL"
url))
;;;###autoload
(defun highlight-headers-follow-url-mosaic (url)
--- psgml/psgml-html.el 1999/02/16 15:35:47 1.1
+++ psgml/psgml-html.el 1999/02/16 15:39:57
@@ -781,6 +781,9 @@
(buffer-file-name
(current-buffer))]
["View in W3" w3-preview-this-buffer t]
+ ["View in kfm" sgml-html-kfm-file
+ (buffer-file-name
+ (current-buffer))]
"---"
["HTML-Quote Region" html-quote-region t]
"---")
@@ -790,6 +793,12 @@
"Preview the file for the current buffer in Netscape."
(interactive)
(highlight-headers-follow-url-netscape
+ (concat "file:" (buffer-file-name (current-buffer)))))
+
+(defun sgml-html-kfm-file ()
+ "Preview the file for the current buffer in kfm."
+ (interactive)
+ (highlight-headers-follow-url-kfm
(concat "file:" (buffer-file-name (current-buffer)))))
(define-derived-mode html3-mode html-mode "HTML3"