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

patch: w3m-view-url-with-external-browser work better



Hi,

emacs-w3m uses 'browse-url-default-browser' to open external browser.
Unfortunately, that function is NOT meant to open a good external
browser, in fact it looks more like a fallback. For example, on OS X, it
launches X11 and then opens xterm just to say there's no lynx.

The following patch will make w3m-view-url-with-external-browser work
better on both OS X and Windows.
diff -c -L /Users/admin/lisp/site-lisp/w3m/w3m.el.gz -L /tmp/buffer-content-935575Ct /tmp/jka-com93557GNz /tmp/buffer-content-935575Ct
*** /Users/admin/lisp/site-lisp/w3m/w3m.el.gz
--- /tmp/buffer-content-935575Ct
***************
*** 1104,1109 ****
--- 1104,1113 ----
  			  (eq 'w3m-browse-url
  			      (symbol-value 'browse-url-browser-function)))
  		      (cond
+                        ((memq system-type '(windows-nt ms-dos cygwin))
+                         'browse-url-default-windows-browser)
+                        ((memq system-type '(darwin))
+                         'browse-url-default-macosx-browser)
  		       ((fboundp 'browse-url-default-browser)
  			'browse-url-default-browser)
  		       ((fboundp 'browse-url-netscape)

Diff finished.  Mon Aug 31 18:28:37 2009
Best,

Leo

-- 
Leo's Emacs uptime: 8 days, 23 hours, 3 minutes, 23 seconds