Subject: updated patch to fix docstring

From: Alex Branham <[email-masked]>
Date: Tue, 13 Jun 2017 11:24:25 +0200

Hi -

I realized I forgot to update the docstring; this patch incorporates that change as well

Alex

>From 4545b2fb1d6f047b05cbb1e19a50fb09809d5a31 Mon Sep 17 00:00:00 2001
From: Alex Branham <[email-masked]>
Date: Tue, 13 Jun 2017 11:21:35 +0200
Subject: [PATCH] eww-search-words prompts user for search if region inactive

---
 lisp/net/eww.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index fe31657914..aa358dce0f 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -313,10 +313,13 @@ word(s) will be searched for via `eww-search-prefix'."

 ;;;###autoload
 (defun eww-search-words (&optional beg end)
-  "Search the web for the text between BEG and END.
+  "If region is active, search the web for the text between BEG and END.
+Else, prompt the user for a search string.
 See the `eww-search-prefix' variable for the search engine used."
   (interactive "r")
-  (eww (buffer-substring beg end)))
+  (if (region-active-p)
+      (eww (buffer-substring beg end))
+    (eww (read-string "Query: "))))

 (defun eww-open-in-new-buffer ()
   "Fetch link at point in a new EWW buffer."
--
2.13.1

>From 4545b2fb1d6f047b05cbb1e19a50fb09809d5a31 Mon Sep 17 00:00:00 2001
From: Alex Branham <[email-masked]>
Date: Tue, 13 Jun 2017 11:21:35 +0200
Subject: [PATCH] eww-search-words prompts user for search if region inactive

---
 lisp/net/eww.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index fe31657914..aa358dce0f 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -313,10 +313,13 @@ word(s) will be searched for via `eww-search-prefix'."
 
 ;;;###autoload
 (defun eww-search-words (&optional beg end)
-  "Search the web for the text between BEG and END.
+  "If region is active, search the web for the text between BEG and END.
+Else, prompt the user for a search string.
 See the `eww-search-prefix' variable for the search engine used."
   (interactive "r")
-  (eww (buffer-substring beg end)))
+  (if (region-active-p)
+      (eww (buffer-substring beg end))
+    (eww (read-string "Query: "))))
 
 (defun eww-open-in-new-buffer ()
   "Fetch link at point in a new EWW buffer."
-- 
2.13.1