Fix error when using `spacemacs/counsel-search' wihout initial input.

This commit is contained in:
M. Tong 2016-03-11 23:21:34 +08:00 committed by Eivind Fonn
parent f903460994
commit d2d82e2312

View file

@ -113,11 +113,12 @@ around point as the initial input. If DIR is non nil start in
that directory."
(interactive)
(require 'counsel)
(letf* ((initial-input (when use-initial-input
(letf* ((initial-input (if use-initial-input
(if (region-active-p)
(buffer-substring-no-properties
(region-beginning) (region-end))
(thing-at-point 'symbol t))))
(thing-at-point 'symbol t))
""))
(tool (catch 'tool
(dolist (tool tools)
(when (and (assoc-string tool spacemacs--counsel-commands)