From: Lars Magne Ingebrigtsen Date: Sun, 11 Jan 2015 14:58:10 +0000 (+0100) Subject: Further eww URL DWIM tweaks X-Git-Tag: emacs-25.0.90~2603^2~31^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4113ac253456027c4b54b92a617e0c2b3003a049;p=emacs.git Further eww URL DWIM tweaks * net/eww.el (eww): Interpret anything that looks like a protocol designator as a full URL. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 674b26716a4..679de0ce6aa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-01-11 Lars Magne Ingebrigtsen + + * net/eww.el (eww): Interpret anything that looks like a protocol + designator as a full URL. + 2015-01-10 Lars Magne Ingebrigtsen * net/shr.el (shr-urlify): Don't bother the user about diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 6a6da17d1ce..71094b1b66d 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -255,7 +255,9 @@ word(s) will be searched for via `eww-search-prefix'." ((string-match-p "\\`ftp://" url) (user-error "FTP is not supported.")) (t - (if (or (string-match "\\`https?:" url) + ;; Anything that starts with something that vaguely looks + ;; like a protocol designator is interpreted as a full URL. + (if (or (string-match "\\`[A-Za-z]+:" url) ;; Also try to match "naked" URLs like ;; en.wikipedia.org/wiki/Free software (string-match "\\`[A-Za-z_]+\\.[A-Za-z._]+/" url)