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

browse-url.el



GNU EmacsのCVSのHEADに以下のパッチを入れてくれとemacs-develで言おう
と思っているのですが、どんなもんでしょうか。

browse-url-emacs-w3mはw3m-browse-urlからコピーしてきてます。

Index: lisp/net/browse-url.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/net/browse-url.el,v
retrieving revision 1.32
diff -u -r1.32 browse-url.el
--- lisp/net/browse-url.el	1 Sep 2003 15:45:33 -0000	1.32
+++ lisp/net/browse-url.el	26 Sep 2003 07:57:25 -0000
@@ -45,6 +45,7 @@
 ;; browse-url-cci                     XMosaic     2.5
 ;; browse-url-w3                      w3          0
 ;; browse-url-w3-gnudoit              w3 remotely
+;; browse-url-emacs-w3m               emacs-w3m   1.3?
 ;; browse-url-iximosaic               IXI Mosaic  ?
 ;; browse-url-lynx-*	              Lynx	     0
 ;; browse-url-grail                   Grail       0.3b1
@@ -78,6 +79,14 @@
 ;; Emacs process is available from
 ;; <URL:ftp://ftp.splode.com/pub/users/friedman/packages/>.
 
+;; emacs-w3m is written by TSUCHIYA Masatoshi <tsuchiya@namazu.org> 
+;; and others. emacs-w3m is an Emacs interface to w3m. w3m is a 
+;; text-based web browser as well as a pager like `more' or `less'.
+;; For more information on emacs-w3m see
+;; <URL:http://emacs-w3m.namazu.org/index-en.html> and for more 
+;; information on w3m see
+;; <URL:http://w3m.sourceforge.net/index.en.html>.
+
 ;; Grail is the freely available WWW browser implemented in Python, a
 ;; cool object-oriented freely available interpreted language.  Grail
 ;; 0.3b1 was the first version to have remote control as distributed.
@@ -247,6 +256,7 @@
 	  (function-item :tag "Emacs W3" :value  browse-url-w3)
 	  (function-item :tag "W3 in another Emacs via `gnudoit'"
 			 :value  browse-url-w3-gnudoit)
+	  (function-item :tag "Emacs-w3m" :value browse-url-emacs-w3m)
 	  (function-item :tag "Mozilla" :value  browse-url-mozilla)
 	  (function-item :tag "Galeon" :value  browse-url-galeon)
 	  (function-item :tag "Epiphany" :value  browse-url-epiphany)
@@ -800,6 +810,7 @@
      ((executable-find "tellw3b") 'browse-url-iximosaic)
      ((executable-find browse-url-xterm-program) 'browse-url-lynx-xterm)
      ((executable-find "mmm") 'browse-url-mmm)
+     ((functionp 'w3m)  'browse-url-emacs-w3m)
      (t 'browse-url-w3))
      url args))
 
@@ -1326,6 +1337,23 @@
 				     (list 'insert-buffer (current-buffer)))
 	(compose-mail to nil nil nil nil
 		      (list 'insert-buffer (current-buffer)))))))
+
+;; --- Emacs-w3m ---
+;;;###autoload
+(defun browse-url-emacs-w3m (url &optional new-window)
+  "Ask the emacs-w3m WWW browser to load URL.
+Default to the URL around or before point.
+
+When called interactively, if variable `browse-url-new-window-flag' is
+non-nil, load the document in a new window.  A non-nil interactive
+prefix argument reverses the effect of `browse-url-new-window-flag'.
+
+When called non-interactively, optional second argument NEW-WINDOW is
+used instead of `browse-url-new-window-flag'."
+  (interactive (browse-url-interactive-arg "w3m URL: "))
+  (when (stringp url)
+    (if (browse-url-maybe-new-window new-window) (split-window))
+    (w3m-goto-url url)))
 
 ;; --- Random browser ---