[Top][All Lists]

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

Patch for browse-url-filename-alist - adding file://

From: Lennart Borgman
Subject: Patch for browse-url-filename-alist - adding file://
Date: Sat, 24 Jun 2006 16:58:35 +0200
User-agent: Thunderbird (Windows/20060516)

I have previously sent a patch for `browse-url-filename-alist' that never got installed:


I believe the attached patch does the same thing maybe a bit better, but unfortunately I have forgotten the exact reason I changed it. I believe I saw some relative file names where translated by `browse-url-file-url' but that may be incorrect.

This patch is a bit mysterious since it does not take care of the case where a file name begins with for example "C:/path" explicitly. Anyway I am sending this just to get some feedback so we can get the problem in the message above fixed.

Please do not waste this patch again! I tend to forget the patches if they do not get installed. This patch has been with EmacsW32 for about half a year now.

Index: lisp/net/browse-url.el
RCS file: /cvsroot/emacs/emacs/lisp/net/browse-url.el,v
retrieving revision 1.54
diff -u -r1.54 browse-url.el
--- lisp/net/browse-url.el    20 May 2006 04:29:38 -0000    1.54
+++ lisp/net/browse-url.el    20 May 2006 08:19:06 -0000
@@ -457,9 +457,9 @@
    ;; it in anonymous cases.  If it's not anonymous the next regexp
    ;; applies.
    ("^/\\([^:@address@hidden)?\\([^:]+\\):/*" . "ftp://\\1\\2/";)
+    ("^\\([^/]\\)" . "file:///\\1")
    (,@ (if (memq system-type '(windows-nt ms-dos cygwin))
-        '(("^\\([a-zA-Z]:\\)[\\/]" . "file:\\1/")
-              ("^[\\/][\\/]+" . "file://"))))
+            '(("^[\\/][\\/]+" . "file://"))))
    ("^/+" . "file:/")))
  "*An alist of (REGEXP . STRING) pairs used by `browse-url-of-file'.
Any substring of a filename matching one of the REGEXPs is replaced by

reply via email to

[Prev in Thread] Current Thread [Next in Thread]