mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-18 02:47:36 +00:00
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)
This commit is contained in:
parent
ba82d68819
commit
490dcf2ae3
1 changed files with 5 additions and 5 deletions
|
|
@ -419,11 +419,11 @@ commands reverses the effect of this variable."
|
|||
:group 'browse-url)
|
||||
|
||||
(defcustom browse-url-filename-alist
|
||||
`(("^/\\(ftp@\\|anonymous@\\)?\\([^:]+\\):/*" . "ftp://\\2/")
|
||||
`(("^/\\(ftp@\\|anonymous@\\)?\\([^:/]+\\):/*" . "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.
|
||||
("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/")
|
||||
("^/\\([^:@/]+@\\)?\\([^:/]+\\):/*" . "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
|
||||
\\='((\"/webmaster@webserver:/home/www/html/\" .
|
||||
\"http://www.acme.co.uk/\")
|
||||
(\"^/\\(ftp@\\|anonymous@\\)?\\([^:]+\\):/*\" . \"ftp://\\2/\")
|
||||
(\"^/\\([^:@]+@\\)?\\([^:]+\\):/*\" . \"ftp://\\1\\2/\")
|
||||
(\"^/\\(ftp@\\|anonymous@\\)?\\([^:/]+\\):/*\" . \"ftp://\\2/\")
|
||||
(\"^/\\([^:@/]+@\\)?\\([^:/]+\\):/*\" . \"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
|
||||
|
|
|
|||
Loading…
Reference in a new issue