Skip to content

Commit

Permalink
Fix that helm-git-grep-save-results can't work
Browse files Browse the repository at this point in the history
fix the following error:
Symbol’s value as variable is void: grep-hit-face
  • Loading branch information
yasuyk committed Oct 9, 2016
1 parent f172413 commit d49001e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
18 changes: 18 additions & 0 deletions features/helm-git-grep-save-result.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Feature: Search a keyword and save search results
In order to search a keyword
As a user
I want to grep the keyword and save search results

Scenario: I save search results
Given I start an action chain
And I press "M-x"
And I type "helm-git-grep"
When I press "RET"
When I type "get_commit_format"
And I press "TAB"
And I press "C-n"
And I press "C-n"
And I press "C-n"
And I execute the action chain
Then I should be in buffer matching regexp "\*hggrep\*"
Then the cursor should be at line "5"
5 changes: 1 addition & 4 deletions helm-git-grep.el
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,9 @@ newline return an empty string."
(helm-git-submodule-grep-command)))
'()))

(defvar grep-hit-face)

(define-compilation-mode helm-git-grep-mode "Helm Git Grep"
"Set up `wgrep' if exist."
(require' grep)
(set (make-local-variable 'compilation-error-face) grep-hit-face)
(set (make-local-variable 'compilation-error-face) compilation-info-face)
(set (make-local-variable 'compilation-error-regexp-alist) grep-regexp-alist)
(when (require 'wgrep nil t)
(wgrep-setup-internal)))
Expand Down

0 comments on commit d49001e

Please sign in to comment.