]> git.eshelyaron.com Git - emacs.git/commitdiff
Bind `M-s M-s' globally to `eww-search-words'
authorKenjiro NAKAYAMA <nakayamakenjiro@gmail.com>
Fri, 14 Nov 2014 03:46:11 +0000 (04:46 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 14 Nov 2014 03:46:11 +0000 (04:46 +0100)
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.

etc/ChangeLog
etc/NEWS
lisp/ChangeLog
lisp/bindings.el
lisp/net/eww.el

index b3f4afa93a0095d89dfba2a8e88bd993cb25786c..983fcaa28eb9ca92afd20e60cf3a339590be1838 100644 (file)
@@ -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.
index 911fe6a838093ecb9678e4e5478e52811f5d19e3..2172d078c44dd18946891a477c8ded6229b4977f 100644 (file)
--- 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.
index 5c0ec99f04f2448f677edfa8fb5fe5c1941eb8f0..8238dc5a36d1e21d5990497ca0cc8fec2b52437c 100644 (file)
@@ -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.
index ac31723e02d083e1750cfbb20377c808341ec826..5864581d3cc36f68dd3a8fff7c63d63467156078 100644 (file)
@@ -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)
index 61504e91465be9c2636e842c267abf9740f11e68..9462d03d54ae7de3ec76738d7f04879b27142231 100644 (file)
@@ -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