From 70e74021ee9361a00aa3ad5349a20262876f02e7 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Fri, 13 Apr 2012 11:15:42 -0400 Subject: [PATCH] Adapt browse-url.el to improvements in Cygwin's cygstart utility. * lisp/net/browse-url.el (browse-url-file-url): Remove Cygwin hack; this is no longer needed now that cygstart understands file:// URLs. (browse-url-filename-alist): For the same reason, don't modify file:// URLs on Cygwin. --- lisp/ChangeLog | 8 ++++++++ lisp/net/browse-url.el | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0a3f3b8f855..b820ef5a056 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-04-13 Ken Brown + + * net/browse-url.el (browse-url-file-url): Remove Cygwin hack; + this is no longer needed now that cygstart understands file:// + URLs. + (browse-url-filename-alist): For the same reason, don't modify + file:// URLs on Cygwin. + 2012-04-13 Stefan Monnier * emulation/cua-base.el (cua--pre-command-handler-1): Don't activate diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 0bfc8eda3b1..62c0e317a81 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -467,7 +467,7 @@ commands reverses the effect of this variable. Requires Netscape version ;; it in anonymous cases. If it's not anonymous the next regexp ;; applies. ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/") - ,@(if (memq system-type '(windows-nt ms-dos cygwin)) + ,@(if (memq system-type '(windows-nt ms-dos)) '(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/") ("^[\\/][\\/]+" . "file://"))) ("^/+" . "file:///")) @@ -724,12 +724,6 @@ interactively. Turn the filename into a URL with function (defun browse-url-file-url (file) "Return the URL corresponding to FILE. 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) (or file-name-coding-system default-file-name-coding-system)))) -- 2.39.2