File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 142
142
(declare-function haskell-session-cabal-dir " haskell-session" (session))
143
143
(declare-function haskell-session-maybe " haskell-session" ())
144
144
(declare-function haskell-session-tags-filename " haskell-session" (session))
145
+ (declare-function haskell-session-current-dir " haskell-session" (session))
145
146
146
147
; ; All functions/variables start with `(literate-)haskell-'.
147
148
@@ -868,6 +869,18 @@ remains unchanged."
868
869
(kill-region (match-beginning 0 ) (match-end 0 ))
869
870
(error " No SCC at point " )))))
870
871
872
+ (defun haskell-rgrep (&optional prompt )
873
+ " Grep the effective project for the symbol at point. Very
874
+ useful for codebase navigation. Prompts for an arbitrary regexp
875
+ given a prefix arg."
876
+ (interactive " P" )
877
+ (let ((sym (if prompt
878
+ (read-from-minibuffer " Look for: " )
879
+ (haskell-ident-at-point))))
880
+ (rgrep sym
881
+ " *.hs" ; ; TODO: common Haskell extensions.
882
+ (haskell-session-current-dir (haskell-session )))))
883
+
871
884
872
885
; ; Provide ourselves:
873
886
You can’t perform that action at this time.
0 commit comments