mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-30 09:00:31 -08:00
* 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.
This commit is contained in:
parent
aefcadb650
commit
5241b291dd
2 changed files with 16 additions and 2 deletions
|
|
@ -1,3 +1,11 @@
|
||||||
|
2009-11-23 Ken Brown <kbrown@cornell.edu> (tiny change)
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2009-11-23 Juri Linkov <juri@jurta.org>
|
2009-11-23 Juri Linkov <juri@jurta.org>
|
||||||
|
|
||||||
Implement DocView Continuous mode. (Bug#4896)
|
Implement DocView Continuous mode. (Bug#4896)
|
||||||
|
|
|
||||||
|
|
@ -444,7 +444,7 @@ commands reverses the effect of this variable. Requires Netscape version
|
||||||
;; applies.
|
;; applies.
|
||||||
("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/")
|
("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/")
|
||||||
,@(if (memq system-type '(windows-nt ms-dos cygwin))
|
,@(if (memq system-type '(windows-nt ms-dos cygwin))
|
||||||
'(("^\\([a-zA-Z]:\\)[\\/]" . "file:\\1/")
|
'(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/")
|
||||||
("^[\\/][\\/]+" . "file://")))
|
("^[\\/][\\/]+" . "file://")))
|
||||||
("^/+" . "file:///"))
|
("^/+" . "file:///"))
|
||||||
"An alist of (REGEXP . STRING) pairs used by `browse-url-of-file'.
|
"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
|
||||||
(defun browse-url-file-url (file)
|
(defun browse-url-file-url (file)
|
||||||
"Return the URL corresponding to FILE.
|
"Return the URL corresponding to FILE.
|
||||||
Use variable `browse-url-filename-alist' to map filenames to URLs."
|
Use variable `browse-url-filename-alist' to map filenames to URLs."
|
||||||
|
;; De-munge Cygwin filenames before passing them to Windows browser.
|
||||||
|
(if (eq system-type 'cygwin)
|
||||||
|
(let ((winfile (with-output-to-string
|
||||||
|
(call-process "cygpath" nil standard-output
|
||||||
|
nil "-m" file))))
|
||||||
|
(setq file (substring winfile 0 -1))))
|
||||||
(let ((coding (and (default-value 'enable-multibyte-characters)
|
(let ((coding (and (default-value 'enable-multibyte-characters)
|
||||||
(or file-name-coding-system
|
(or file-name-coding-system
|
||||||
default-file-name-coding-system))))
|
default-file-name-coding-system))))
|
||||||
|
|
@ -835,7 +841,7 @@ to use."
|
||||||
(shell-command (concat "start " (shell-quote-argument url)))
|
(shell-command (concat "start " (shell-quote-argument url)))
|
||||||
(error "Browsing URLs is not supported on this system")))
|
(error "Browsing URLs is not supported on this system")))
|
||||||
((eq system-type 'cygwin)
|
((eq system-type 'cygwin)
|
||||||
(shell-command (concat "cygstart " (shell-quote-argument url))))
|
(call-process "cygstart" nil nil nil url))
|
||||||
(t (w32-shell-execute "open" url))))
|
(t (w32-shell-execute "open" url))))
|
||||||
|
|
||||||
(defun browse-url-default-macosx-browser (url &optional new-window)
|
(defun browse-url-default-macosx-browser (url &optional new-window)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue