emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 4113ac2: Further eww URL DWIM tweaks


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 4113ac2: Further eww URL DWIM tweaks
Date: Sun, 11 Jan 2015 14:58:15 +0000

branch: master
commit 4113ac253456027c4b54b92a617e0c2b3003a049
Author: Lars Magne Ingebrigtsen <address@hidden>
Commit: Lars Magne Ingebrigtsen <address@hidden>

    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 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 674b267..679de0c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-11  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * net/eww.el (eww): Interpret anything that looks like a protocol
+       designator as a full URL.
+
 2015-01-10  Lars Magne Ingebrigtsen  <address@hidden>
 
        * net/shr.el (shr-urlify): Don't bother the user about
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 6a6da17..71094b1 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]