Commits

Ken Brown  committed 24d6e17

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.

  • Participants
  • Parent commits df6273e

Comments (0)

Files changed (2)

File lisp/ChangeLog

+2012-04-13  Ken Brown  <kbrown@cornell.edu>
+
+	* 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  <monnier@iro.umontreal.ca>
 
 	* emulation/cua-base.el (cua--pre-command-handler-1): Don't activate

File lisp/net/browse-url.el

     ;; 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:///"))
 (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))))