branch: externals/kiwix
commit 4968e3dabf7729d9ad37a2367ad0dc7648d3012f
Author: stardiviner <[email protected]>
Commit: stardiviner <[email protected]>

    error when query is invalid.
---
 kiwix.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/kiwix.el b/kiwix.el
index d0b6fcf..20c47cd 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -183,7 +183,12 @@ for query string and library interactively."
                          (region-beginning) (region-end))
                       (thing-at-point 'symbol))))))
     (message (format "library: %s, query: %s" library query))
-    (kiwix-query query library)))
+    (if (or (null library)
+            (string-empty-p library)
+            (null query)
+            (string-empty-p query))
+        (error "Your query is invalid")
+      (kiwix-query query library))))
 
 
 

Reply via email to