diff options
| author | Lars Magne Ingebrigtsen | 2015-01-11 15:58:10 +0100 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2015-01-11 15:58:10 +0100 |
| commit | 4113ac253456027c4b54b92a617e0c2b3003a049 (patch) | |
| tree | efe91162e4110e8c28ffa4d6e24580ddccd2e94c | |
| parent | 9a57bda31569294ecaf8138a06e5edda9c0d87e3 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/eww.el | 4 |
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 @@ | |||
| 1 | 2015-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 | |||
| 1 | 2015-01-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2015-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) |