aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenjiro NAKAYAMA2014-11-14 04:46:11 +0100
committerLars Magne Ingebrigtsen2014-11-14 04:46:11 +0100
commit3bdc6ce7e34705dc09a938d07296230436ea089c (patch)
tree1faf71a350f127c3aa529c5f877a4a248735062b
parentba88f195330c513423feed4e5db4122c0e674e22 (diff)
downloademacs-3bdc6ce7e34705dc09a938d07296230436ea089c.tar.gz
emacs-3bdc6ce7e34705dc09a938d07296230436ea089c.zip
Bind `M-s M-s' globally to `eww-search-words'
Fixes: debbugs:16258 * etc/NEWS: Mention the new `M-s M-s' keystroke. * lisp/bindings.el (search-map): Bind M-s M-s to `eww-search-words'. * net/eww.el (eww-search-words): New command.
-rw-r--r--etc/ChangeLog4
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/bindings.el1
-rw-r--r--lisp/net/eww.el6
5 files changed, 22 insertions, 0 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog
index b3f4afa93a0..983fcaa28eb 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
12014-11-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * NEWS: Mention the new `M-s M-s' keystroke.
4
12014-11-13 Paul Eggert <eggert@cs.ucla.edu> 52014-11-13 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 Fix minor Bazaar leftovers. 7 Fix minor Bazaar leftovers.
diff --git a/etc/NEWS b/etc/NEWS
index 911fe6a8380..2172d078c44 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -51,6 +51,9 @@ Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to.
51 51
52** C-h l now also lists the commands that were run. 52** C-h l now also lists the commands that were run.
53 53
54** The new M-s M-s key binding uses eww to search the web for the
55text in the region.
56
54** M-x suggests shorthands and ignores obsolete commands for completion. 57** M-x suggests shorthands and ignores obsolete commands for completion.
55** x-select-enable-clipboard is renamed select-enable-clipboard. 58** x-select-enable-clipboard is renamed select-enable-clipboard.
56x-select-enable-primary and renamed select-enable-primary. 59x-select-enable-primary and renamed select-enable-primary.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5c0ec99f04f..8238dc5a36d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12014-11-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * bindings.el (search-map): Bind M-s M-s to `eww-search-words'.
4
52014-11-14 Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com>
6
7 * net/eww.el (eww-search-words): New command (bug#16258).
8
12014-11-13 Lars Magne Ingebrigtsen <larsi@gnus.org> 92014-11-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 10
3 * net/shr.el (shr-inhibit-images): Add a doc string. 11 * net/shr.el (shr-inhibit-images): Add a doc string.
diff --git a/lisp/bindings.el b/lisp/bindings.el
index ac31723e02d..5864581d3cc 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -926,6 +926,7 @@ if `inhibit-field-text-motion' is non-nil."
926(define-key esc-map "s" search-map) 926(define-key esc-map "s" search-map)
927 927
928(define-key search-map "o" 'occur) 928(define-key search-map "o" 'occur)
929(define-key search-map (kbd "M-s") 'eww-search-words)
929(define-key search-map "hr" 'highlight-regexp) 930(define-key search-map "hr" 'highlight-regexp)
930(define-key search-map "hp" 'highlight-phrase) 931(define-key search-map "hp" 'highlight-phrase)
931(define-key search-map "hl" 'highlight-lines-matching-regexp) 932(define-key search-map "hl" 'highlight-lines-matching-regexp)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 61504e91465..9462d03d54a 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -198,6 +198,12 @@ word(s) will be searched for via `eww-search-prefix'."
198 "/") 198 "/")
199 (expand-file-name file)))) 199 (expand-file-name file))))
200 200
201;;;###autoload
202(defun eww-search-words (&optional beg end)
203 "Search the web for the text between the point and marker."
204 (interactive "r")
205 (eww (buffer-substring beg end)))
206
201(defun eww-render (status url &optional point buffer) 207(defun eww-render (status url &optional point buffer)
202 (let ((redirect (plist-get status :redirect))) 208 (let ((redirect (plist-get status :redirect)))
203 (when redirect 209 (when redirect