aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2015-01-11 15:58:10 +0100
committerLars Magne Ingebrigtsen2015-01-11 15:58:10 +0100
commit4113ac253456027c4b54b92a617e0c2b3003a049 (patch)
treeefe91162e4110e8c28ffa4d6e24580ddccd2e94c
parent9a57bda31569294ecaf8138a06e5edda9c0d87e3 (diff)
downloademacs-4113ac253456027c4b54b92a617e0c2b3003a049.tar.gz
emacs-4113ac253456027c4b54b92a617e0c2b3003a049.zip
Further eww URL DWIM tweaks
* net/eww.el (eww): Interpret anything that looks like a protocol designator as a full URL.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/eww.el4
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 674b26716a4..679de0ce6aa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12015-01-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * net/eww.el (eww): Interpret anything that looks like a protocol
4 designator as a full URL.
5
12015-01-10 Lars Magne Ingebrigtsen <larsi@gnus.org> 62015-01-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 7
3 * net/shr.el (shr-urlify): Don't bother the user about 8 * 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'."
255 ((string-match-p "\\`ftp://" url) 255 ((string-match-p "\\`ftp://" url)
256 (user-error "FTP is not supported.")) 256 (user-error "FTP is not supported."))
257 (t 257 (t
258 (if (or (string-match "\\`https?:" url) 258 ;; Anything that starts with something that vaguely looks
259 ;; like a protocol designator is interpreted as a full URL.
260 (if (or (string-match "\\`[A-Za-z]+:" url)
259 ;; Also try to match "naked" URLs like 261 ;; Also try to match "naked" URLs like
260 ;; en.wikipedia.org/wiki/Free software 262 ;; en.wikipedia.org/wiki/Free software
261 (string-match "\\`[A-Za-z_]+\\.[A-Za-z._]+/" url) 263 (string-match "\\`[A-Za-z_]+\\.[A-Za-z._]+/" url)