Generalize +jump/online #140
+ Now uses selection if region is active. Prompts for the query otherwise, with the thing at point as the initial input. + On first use, prompts for provider. On consecutive uses, reuses previous provider. If universal argument is supplied, force the prompt to appear.
This commit is contained in:
parent
5057db93f1
commit
c31167d747
3 changed files with 27 additions and 25 deletions
|
@ -6,12 +6,5 @@
|
|||
reuse it on consecutive uses of this command. If BANG, always prompt for search
|
||||
engine."
|
||||
(interactive "<a><!>")
|
||||
(let ((query (or query (thing-at-point 'symbol t))))
|
||||
(unless query
|
||||
(user-error "The search query is empty"))
|
||||
(+jump/online
|
||||
(or (and (not bang) (bound-and-true-p +jump--online-last))
|
||||
(completing-read (format "Search on (%s): " query)
|
||||
(mapcar #'car +jump-search-url-alist)
|
||||
nil t))
|
||||
query)))
|
||||
(+jump/online (or query (thing-at-point 'symbol t))
|
||||
(+jump--online-get-provider bang)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue