From 4113ac253456027c4b54b92a617e0c2b3003a049 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 11 Jan 2015 15:58:10 +0100 Subject: [PATCH] Further eww URL DWIM tweaks * net/eww.el (eww): Interpret anything that looks like a protocol designator as a full URL. --- lisp/ChangeLog | 5 +++++ lisp/net/eww.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) 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) -- 2.39.2