aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-11-23 20:58:55 +0000
committerChong Yidong2009-11-23 20:58:55 +0000
commit5241b291dd078aea93fb622a4de1c20c8278e1df (patch)
tree64aa559242da3e7f139e31b46c1f8b58553fe77d
parentaefcadb650ddaa4d2ad1737baadf4400c99ba405 (diff)
downloademacs-5241b291dd078aea93fb622a4de1c20c8278e1df.tar.gz
emacs-5241b291dd078aea93fb622a4de1c20c8278e1df.zip
* net/browse-url.el (browse-url-filename-alist): On Windows, add
two slashes to the "file:" prefix. (browse-url-file-url): De-munge Cygwin filenames before passing them to Windows browser. (browse-url-default-windows-browser): Use call-process.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/net/browse-url.el10
2 files changed, 16 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1ab6ac35ebc..2c6dacc9f78 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12009-11-23 Ken Brown <kbrown@cornell.edu> (tiny change)
2
3 * net/browse-url.el (browse-url-filename-alist): On Windows, add
4 two slashes to the "file:" prefix.
5 (browse-url-file-url): De-munge Cygwin filenames before passing
6 them to Windows browser.
7 (browse-url-default-windows-browser): Use call-process.
8
12009-11-23 Juri Linkov <juri@jurta.org> 92009-11-23 Juri Linkov <juri@jurta.org>
2 10
3 Implement DocView Continuous mode. (Bug#4896) 11 Implement DocView Continuous mode. (Bug#4896)
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index ddfaa91d953..e52f4cb924a 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -444,7 +444,7 @@ commands reverses the effect of this variable. Requires Netscape version
444 ;; applies. 444 ;; applies.
445 ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/") 445 ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/")
446 ,@(if (memq system-type '(windows-nt ms-dos cygwin)) 446 ,@(if (memq system-type '(windows-nt ms-dos cygwin))
447 '(("^\\([a-zA-Z]:\\)[\\/]" . "file:\\1/") 447 '(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/")
448 ("^[\\/][\\/]+" . "file://"))) 448 ("^[\\/][\\/]+" . "file://")))
449 ("^/+" . "file:///")) 449 ("^/+" . "file:///"))
450 "An alist of (REGEXP . STRING) pairs used by `browse-url-of-file'. 450 "An alist of (REGEXP . STRING) pairs used by `browse-url-of-file'.
@@ -699,6 +699,12 @@ interactively. Turn the filename into a URL with function
699(defun browse-url-file-url (file) 699(defun browse-url-file-url (file)
700 "Return the URL corresponding to FILE. 700 "Return the URL corresponding to FILE.
701Use variable `browse-url-filename-alist' to map filenames to URLs." 701Use variable `browse-url-filename-alist' to map filenames to URLs."
702 ;; De-munge Cygwin filenames before passing them to Windows browser.
703 (if (eq system-type 'cygwin)
704 (let ((winfile (with-output-to-string
705 (call-process "cygpath" nil standard-output
706 nil "-m" file))))
707 (setq file (substring winfile 0 -1))))
702 (let ((coding (and (default-value 'enable-multibyte-characters) 708 (let ((coding (and (default-value 'enable-multibyte-characters)
703 (or file-name-coding-system 709 (or file-name-coding-system
704 default-file-name-coding-system)))) 710 default-file-name-coding-system))))
@@ -835,7 +841,7 @@ to use."
835 (shell-command (concat "start " (shell-quote-argument url))) 841 (shell-command (concat "start " (shell-quote-argument url)))
836 (error "Browsing URLs is not supported on this system"))) 842 (error "Browsing URLs is not supported on this system")))
837 ((eq system-type 'cygwin) 843 ((eq system-type 'cygwin)
838 (shell-command (concat "cygstart " (shell-quote-argument url)))) 844 (call-process "cygstart" nil nil nil url))
839 (t (w32-shell-execute "open" url)))) 845 (t (w32-shell-execute "open" url))))
840 846
841(defun browse-url-default-macosx-browser (url &optional new-window) 847(defun browse-url-default-macosx-browser (url &optional new-window)