diff options
author | Le Wang <le.wang@agworld.com.au> | 2012-10-18 08:46:06 +0800 |
---|---|---|
committer | Le Wang <le.wang@agworld.com.au> | 2012-10-18 08:46:06 +0800 |
commit | b02991afb0c9b5a475370afd609e50233b99c1eb (patch) | |
tree | 2ed25c3a8dccc63b9471f31720b949d965410135 /helm-grep.el | |
parent | 30739ffef78f20d160d91b4f40a969c9f2a0248b (diff) |
make sure `helm-c-grep-preferred-ext` is always in completions
Diffstat (limited to 'helm-grep.el')
-rw-r--r-- | helm-grep.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/helm-grep.el b/helm-grep.el index 01c9408f..9e0f03be 100644 --- a/helm-grep.el +++ b/helm-grep.el @@ -16,7 +16,7 @@ ;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;;; Code: -(eval-when-compile (require 'cl)) +(require 'cl) (require 'helm) (require 'grep) (require 'helm-regexp) @@ -556,7 +556,9 @@ These extensions will be added to command line with --include arg of grep." (member glob glob-list) (member glob grep-find-ignored-files)) collect glob into glob-list - finally return (append glob-list (list "*")))) + finally return (append glob-list + (delete-duplicates + (delq nil (list "*" helm-c-grep-preferred-ext)))))) (defun helm-grep-collect-candidates () (let* ((helm-c-grep-default-command @@ -628,9 +630,7 @@ These extensions will be added to command line with --include arg of grep." ;; split this string to pass it later to mapconcat. ;; e.g '("*.el *.py") (loop for i in extensions - append (if (string-match " " i) - (split-string i " " t) - (list i))) + append (split-string-and-unquote i " ")) (list "*")))) (defun helm-do-grep-1 (targets &optional recurse zgrep exts) |