Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuyk committed Oct 15, 2016
2 parents 2fbe618 + ba26d41 commit c2a7780
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions helm-git-grep.el
Expand Up @@ -184,21 +184,21 @@ and key of toggle command."
(defconst helm-git-grep-doc-order-in-name-header-plist
'(pathspec
(:doc
"[helm-git-grep-pathspec-toggle-availability]: pathspec%s"
"[helm-git-grep-pathspec-toggle-availability]:Tog.pathspec%s"
:function
(lambda (doc)
(when helm-git-grep-pathspecs
(format doc
(if helm-git-grep-pathspec-available "" "[disabled]")))))
basedir
(:doc
"[helm-git-grep-toggle-base-directory]: base dir[%s]"
"[helm-git-grep-toggle-base-directory]:Tog.basedir[%s]"
:function
(lambda (doc)
(format doc (symbol-name helm-git-grep-base-directory))))
ignorecase
(:doc
"[helm-git-grep-toggle-ignore-case]: ignore case%s"
"[helm-git-grep-toggle-ignore-case]:Tog.ignorecase%s"
:function
(lambda (doc) (format doc (if helm-git-grep-ignore-case "[i]" ""))))))

Expand Down Expand Up @@ -482,17 +482,17 @@ With a prefix arg record CANDIDATE in `mark-ring'."
(ret (funcall func doc)))
(when ret
(substitute-command-keys
(format "(\\<helm-git-grep-map>\\%s)" ret))))))
(format "\\<helm-git-grep-map>\\%s" ret))))))
helm-git-grep-doc-order-in-name-header))

(defun helm-git-grep-concat-string-list (list)
"Concatenate string LIST separeted by a space."
"Concatenate string LIST separated by a space."
(mapconcat 'identity(delq nil list) " "))

(defun helm-git-grep-header-name (name)
"Create header NAME for `helm-git-grep'."
(concat
name " "
name " | "
(helm-git-grep-concat-string-list (helm-git-grep-doc-list-in-name-header))))

(defun helm-git-grep-run-persistent-action ()
Expand Down Expand Up @@ -668,7 +668,6 @@ You can save your results in a helm-git-grep-mode buffer, see below.
(defun helm-git-grep-1 (&optional input)
"Execute helm git grep.
Optional argument INPUT is initial input."
;; directory local variables can't work in minibuffer
(helm-set-local-variable 'helm-git-grep-pathspecs helm-git-grep-pathspecs)
(helm :sources helm-git-grep-sources
:buffer "*helm git grep*"
Expand Down
4 changes: 2 additions & 2 deletions test/helm-git-grep-test.el
Expand Up @@ -173,13 +173,13 @@
(helm-git-grep-ignore-case nil)
(helm-git-grep-base-directory 'root))
(should-equal? (helm-git-grep-header-name "Git Grep")
"Git Grep (C-c p: pathspec) (C-c b: base dir[root]) (C-c i: ignore case)"))
"Git Grep | C-c p:Tog.pathspec C-c b:Tog.basedir[root] C-c i:Tog.ignorecase"))
(let ((helm-git-grep-doc-order-in-name-header
'(ignorecase pathspec basedir))
(helm-git-grep-ignore-case t)
(helm-git-grep-base-directory 'current))
(should-equal? (helm-git-grep-header-name "Git Grep")
"Git Grep (C-c i: ignore case[i]) (C-c b: base dir[current])")))
"Git Grep | C-c i:Tog.ignorecase[i] C-c b:Tog.basedir[current]")))



Expand Down

0 comments on commit c2a7780

Please sign in to comment.