emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-25 490dcf2: Don't treat /foo/bar:mumble as ange-ftp


From: Andreas Schwab
Subject: [Emacs-diffs] emacs-25 490dcf2: Don't treat /foo/bar:mumble as ange-ftp address
Date: Fri, 25 Dec 2015 22:42:28 +0000

branch: emacs-25
commit 490dcf2ae3f05baf201a451e701bc08d227ddc29
Author: Andreas Schwab <address@hidden>
Commit: Andreas Schwab <address@hidden>

    Don't treat /foo/bar:mumble as ange-ftp address
    
        * lisp/net/browse-url.el (browse-url-filename-alist): Match colons
        only in the first component.  (bug#5362)
---
 lisp/net/browse-url.el |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 757e368..feb0788 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -419,11 +419,11 @@ commands reverses the effect of this variable."
   :group 'browse-url)
 
 (defcustom browse-url-filename-alist
-  `(("^/\\(address@hidden|address@hidden)?\\([^:]+\\):/*" . "ftp://\\2/";)
+  `(("^/\\(address@hidden|address@hidden)?\\([^:/]+\\):/*" . "ftp://\\2/";)
     ;; The above loses the username to avoid the browser prompting for
     ;; it in anonymous cases.  If it's not anonymous the next regexp
     ;; applies.
-    ("^/\\([^:@address@hidden)?\\([^:]+\\):/*" . "ftp://\\1\\2/";)
+    ("^/\\([^:@/address@hidden)?\\([^:/]+\\):/*" . "ftp://\\1\\2/";)
     ,@(if (memq system-type '(windows-nt ms-dos))
           '(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/")
             ("^[\\/][\\/]+" . "file://")))
@@ -441,13 +441,13 @@ address to an HTTP URL:
     (setq browse-url-filename-alist
          \\='((\"/address@hidden:/home/www/html/\" .
             \"http://www.acme.co.uk/\";)
-            (\"^/\\(address@hidden|address@hidden)?\\([^:]+\\):/*\" . 
\"ftp://\\2/\";)
-            (\"^/\\([^:@address@hidden)?\\([^:]+\\):/*\" . \"ftp://\\1\\2/\";)
+            (\"^/\\(address@hidden|address@hidden)?\\([^:/]+\\):/*\" . 
\"ftp://\\2/\";)
+            (\"^/\\([^:@/address@hidden)?\\([^:/]+\\):/*\" . \"ftp://\\1\\2/\";)
            (\"^/+\" . \"file:/\")))"
   :type '(repeat (cons :format "%v"
                        (regexp :tag "Regexp")
                        (string :tag "Replacement")))
-  :version "23.1"
+  :version "25.1"
   :group 'browse-url)
 
 (defcustom browse-url-save-file nil



reply via email to

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