aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2015-12-25 23:32:55 +0100
committerAndreas Schwab2015-12-25 23:36:45 +0100
commit490dcf2ae3f05baf201a451e701bc08d227ddc29 (patch)
tree08e2e46d73975c3332285dab4fc4ee8bb9f70bb5
parentba82d68819f2bc2b666f548fb76825f13b093dfa (diff)
downloademacs-490dcf2ae3f05baf201a451e701bc08d227ddc29.tar.gz
emacs-490dcf2ae3f05baf201a451e701bc08d227ddc29.zip
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)
-rw-r--r--lisp/net/browse-url.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 757e368317a..feb0788db92 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -419,11 +419,11 @@ commands reverses the effect of this variable."
419 :group 'browse-url) 419 :group 'browse-url)
420 420
421(defcustom browse-url-filename-alist 421(defcustom browse-url-filename-alist
422 `(("^/\\(ftp@\\|anonymous@\\)?\\([^:]+\\):/*" . "ftp://\\2/") 422 `(("^/\\(ftp@\\|anonymous@\\)?\\([^:/]+\\):/*" . "ftp://\\2/")
423 ;; The above loses the username to avoid the browser prompting for 423 ;; The above loses the username to avoid the browser prompting for
424 ;; it in anonymous cases. If it's not anonymous the next regexp 424 ;; it in anonymous cases. If it's not anonymous the next regexp
425 ;; applies. 425 ;; applies.
426 ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/") 426 ("^/\\([^:@/]+@\\)?\\([^:/]+\\):/*" . "ftp://\\1\\2/")
427 ,@(if (memq system-type '(windows-nt ms-dos)) 427 ,@(if (memq system-type '(windows-nt ms-dos))
428 '(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/") 428 '(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/")
429 ("^[\\/][\\/]+" . "file://"))) 429 ("^[\\/][\\/]+" . "file://")))
@@ -441,13 +441,13 @@ address to an HTTP URL:
441 (setq browse-url-filename-alist 441 (setq browse-url-filename-alist
442 \\='((\"/webmaster@webserver:/home/www/html/\" . 442 \\='((\"/webmaster@webserver:/home/www/html/\" .
443 \"http://www.acme.co.uk/\") 443 \"http://www.acme.co.uk/\")
444 (\"^/\\(ftp@\\|anonymous@\\)?\\([^:]+\\):/*\" . \"ftp://\\2/\") 444 (\"^/\\(ftp@\\|anonymous@\\)?\\([^:/]+\\):/*\" . \"ftp://\\2/\")
445 (\"^/\\([^:@]+@\\)?\\([^:]+\\):/*\" . \"ftp://\\1\\2/\") 445 (\"^/\\([^:@/]+@\\)?\\([^:/]+\\):/*\" . \"ftp://\\1\\2/\")
446 (\"^/+\" . \"file:/\")))" 446 (\"^/+\" . \"file:/\")))"
447 :type '(repeat (cons :format "%v" 447 :type '(repeat (cons :format "%v"
448 (regexp :tag "Regexp") 448 (regexp :tag "Regexp")
449 (string :tag "Replacement"))) 449 (string :tag "Replacement")))
450 :version "23.1" 450 :version "25.1"
451 :group 'browse-url) 451 :group 'browse-url)
452 452
453(defcustom browse-url-save-file nil 453(defcustom browse-url-save-file nil