summaryrefslogtreecommitdiff
path: root/helm-grep.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2015-04-16 08:42:38 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2015-04-16 08:42:38 +0200
commit0349e4e05eb8d613e91b62aa7be7923a354da5c9 (patch)
tree4851e1878867b8e834c74cdbf60b92580997c8d1 /helm-grep.el
parentf0cc1d6d3c120366d54b4fff1e0a16dbed311fd9 (diff)
Get rid of helm-default-directory, the variable, use now the fn.
* helm.el (helm-default-directory): the var is removed. (helm-default-directory): the fn, return local value of default-directory instead. (helm-resume): Use local val of default-directory. (helm-create-helm-buffer): Remove local setting of helm-default-directory. * helm-utils.el: Use now helm-default-directory, the fn. * helm-grep.el: Same. * helm-files.el: Same.
Diffstat (limited to 'helm-grep.el')
-rw-r--r--helm-grep.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/helm-grep.el b/helm-grep.el
index f1270cec..35617a74 100644
--- a/helm-grep.el
+++ b/helm-grep.el
@@ -340,9 +340,10 @@ It is intended to use as a let-bound variable, DON'T set this globaly.")
(and rec-com rec-com-ack-p)))))))
(defun helm-grep--prepare-cmd-line (only-files &optional include zgrep)
- (let* ((default-directory (or helm-default-directory
+ (let* ((default-directory (or (helm-default-directory)
(expand-file-name helm-ff-default-directory)))
- (fnargs (helm-grep-prepare-candidates only-files default-directory))
+ (fnargs (helm-grep-prepare-candidates
+ only-files default-directory))
(ignored-files (unless (helm-grep-use-ack-p)
(mapconcat
#'(lambda (x)
@@ -386,7 +387,7 @@ It is intended to use as a let-bound variable, DON'T set this globaly.")
(defun helm-grep-init (cmd-line)
"Start an asynchronous grep process with CMD-LINE using ZGREP if non--nil."
(let* ((default-directory (or (expand-file-name helm-ff-default-directory)
- helm-default-directory))
+ (helm-default-directory)))
(zgrep (string-match "\\`zgrep" cmd-line))
;; Use pipe only with grep, zgrep or git-grep.
(process-connection-type (and (not zgrep) (helm-grep-use-ack-p)))
@@ -920,7 +921,6 @@ in recurse, search being made on `helm-zgrep-file-extension-regexp'."
(helm
:sources 'helm-source-grep
:buffer (format "*helm %s*" (if zgrep "zgrep" (helm-grep-command recurse)))
- :default-directory helm-ff-default-directory
:default default-input
:keymap helm-grep-map
:history 'helm-grep-history
@@ -991,7 +991,7 @@ in recurse, search being made on `helm-zgrep-file-extension-regexp'."
(let ((helm-grep-default-directory-fn
(or helm-grep-default-directory-fn
(lambda () (or helm-ff-default-directory
- helm-default-directory
+ (helm-default-directory)
default-directory)))))
(helm-grep--filter-candidate-1 candidate)))