summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 @@
+2014-11-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * NEWS: Mention the new `M-s M-s' keystroke.
+
2014-11-13 Paul Eggert <eggert@cs.ucla.edu>
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.
** C-h l now also lists the commands that were run.
+** The new M-s M-s key binding uses eww to search the web for the
+text in the region.
+
** M-x suggests shorthands and ignores obsolete commands for completion.
** x-select-enable-clipboard is renamed select-enable-clipboard.
x-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 @@
+2014-11-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * bindings.el (search-map): Bind M-s M-s to `eww-search-words'.
+
+2014-11-14 Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com>
+
+ * net/eww.el (eww-search-words): New command (bug#16258).
+
2014-11-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
* 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."
(define-key esc-map "s" search-map)
(define-key search-map "o" 'occur)
+(define-key search-map (kbd "M-s") 'eww-search-words)
(define-key search-map "hr" 'highlight-regexp)
(define-key search-map "hp" 'highlight-phrase)
(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'."
"/")
(expand-file-name file))))
+;;;###autoload
+(defun eww-search-words (&optional beg end)
+ "Search the web for the text between the point and marker."
+ (interactive "r")
+ (eww (buffer-substring beg end)))
+
(defun eww-render (status url &optional point buffer)
(let ((redirect (plist-get status :redirect)))
(when redirect