emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-hydra 4f81b22 006/395: counsel.el (counsel-search-e


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 4f81b22 006/395: counsel.el (counsel-search-engines-alist): Fix
Date: Thu, 25 Feb 2021 08:31:19 -0500 (EST)

branch: externals/ivy-hydra
commit 4f81b226ce3f27d787a4dffcffce8b2bf3a7e380
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    counsel.el (counsel-search-engines-alist): Fix
    
    Fixes #2281
---
 counsel.el | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/counsel.el b/counsel.el
index 3fe9231..e263ad8 100644
--- a/counsel.el
+++ b/counsel.el
@@ -6116,11 +6116,11 @@ Additional actions:\\<ivy-minibuffer-map>
   '((google
      "http://suggestqueries.google.com/complete/search";
      "https://www.google.com/search?q=";
-     #'counsel--search-request-data-google)
+     counsel--search-request-data-google)
     (ddg
      "https://duckduckgo.com/ac/";
      "https://duckduckgo.com/html/?q=";
-     #'counsel--search-request-data-ddg))
+     counsel--search-request-data-ddg))
   "Search engine parameters for `counsel-search'."
   :type '(list))
 
@@ -6136,20 +6136,19 @@ Return 0 tells `ivy--exhibit' not to update the 
minibuffer.
 We update it in the callback with `ivy-update-candidates'."
   (or
    (ivy-more-chars)
-   (progn
-     (let ((engine (cdr (assoc counsel-search-engine 
counsel-search-engines-alist))))
-       (request
-        (nth 0 engine)
-        :type "GET"
-        :params (list
-                 (cons "client" "firefox")
-                 (cons "q" input))
-        :parser 'json-read
-        :success (cl-function
-                  (lambda (&key data &allow-other-keys)
-                    (ivy-update-candidates
-                     (funcall (nth 2 engine) data)))))
-       0))))
+   (let ((engine (cdr (assoc counsel-search-engine 
counsel-search-engines-alist))))
+     (request
+      (nth 0 engine)
+      :type "GET"
+      :params (list
+               (cons "client" "firefox")
+               (cons "q" input))
+      :parser 'json-read
+      :success (cl-function
+                (lambda (&key data &allow-other-keys)
+                  (ivy-update-candidates
+                   (funcall (nth 2 engine) data)))))
+     0)))
 
 (defun counsel-search-action (x)
   "Search for X."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]