Generalize thing-at-point & region functions
This commit is contained in:
parent
d426349f21
commit
27bf3c85b5
7 changed files with 80 additions and 58 deletions
|
@ -621,10 +621,7 @@ config blocks in your private config."
|
|||
|
||||
|
||||
(defun doom--help-search-prompt (prompt)
|
||||
(let ((query
|
||||
(if (use-region-p)
|
||||
(buffer-substring-no-properties (region-beginning) (region-end))
|
||||
(or (thing-at-point 'symbol t) ""))))
|
||||
(let ((query (doom-thing-at-point-or-region)))
|
||||
(if (featurep 'counsel)
|
||||
query
|
||||
(read-string prompt query 'git-grep query))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue