aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/eww.el12
2 files changed, 15 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 784415fb9b8..03a03e1d8c3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12013-06-24 Ivan Kanis <ivan@kanis.fr>
2
3 * net/eww.el (eww): Work more correctly for file: URLs.
4 (eww-detect-charset): Allow quoted charsets.
5 (eww-yank-page-url): New command and keystroke.
6
12013-06-24 Daiki Ueno <ueno@gnu.org> 72013-06-24 Daiki Ueno <ueno@gnu.org>
2 8
3 * epg.el (epg-make-context): Check if PROTOCOL is valid; embed the 9 * epg.el (epg-make-context): Check if PROTOCOL is valid; embed the
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 5aff8f533ef..2aab8e40deb 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -116,8 +116,9 @@ word(s) will be searched for via `eww-search-prefix'."
116 (> (length (split-string url "\\.")) 1)) 116 (> (length (split-string url "\\.")) 1))
117 (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url) 117 (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
118 (setq url (concat "http://" url))) 118 (setq url (concat "http://" url)))
119 (setq url (concat eww-search-prefix 119 (unless (string-match-p "^file:" url)
120 (replace-regexp-in-string " " "+" url)))) 120 (setq url (concat eww-search-prefix
121 (replace-regexp-in-string " " "+" url)))))
121 (url-retrieve url 'eww-render (list url))) 122 (url-retrieve url 'eww-render (list url)))
122 123
123;;;###autoload 124;;;###autoload
@@ -189,7 +190,7 @@ word(s) will be searched for via `eww-search-prefix'."
189 (pt (point))) 190 (pt (point)))
190 (or (and html-p 191 (or (and html-p
191 (re-search-forward 192 (re-search-forward
192 "<meta[\t\n\r ]+[^>]*charset=\"?\\([^\t\n\r \"/>]+\\)" nil t) 193 "<meta[\t\n\r ]+[^>]*charset=\"?\\([^\t\n\r \"/>]+\\)[\\\"'.*]" nil t)
193 (goto-char pt) 194 (goto-char pt)
194 (match-string 1)) 195 (match-string 1))
195 (and (looking-at 196 (and (looking-at
@@ -330,6 +331,7 @@ word(s) will be searched for via `eww-search-prefix'."
330 (define-key map "u" 'eww-up-url) 331 (define-key map "u" 'eww-up-url)
331 (define-key map "t" 'eww-top-url) 332 (define-key map "t" 'eww-top-url)
332 (define-key map "w" 'eww-browse-with-external-browser) 333 (define-key map "w" 'eww-browse-with-external-browser)
334 (define-key map "y" 'eww-yank-page-url)
333 map)) 335 map))
334 336
335(define-derived-mode eww-mode nil "eww" 337(define-derived-mode eww-mode nil "eww"
@@ -847,6 +849,10 @@ The browser to used is specified by the `eww-external-browser' variable."
847 (interactive) 849 (interactive)
848 (funcall eww-external-browser eww-current-url)) 850 (funcall eww-external-browser eww-current-url))
849 851
852(defun eww-yank-page-url ()
853 (interactive)
854 (message eww-current-url)
855 (kill-new eww-current-url))
850(provide 'eww) 856(provide 'eww)
851 857
852;;; eww.el ends here 858;;; eww.el ends here