@@ -54,16 +54,18 @@ Used for locating additional package data files.")
54
54
55
55
When set to 'auto (the default), the directory contents and
56
56
available programs will be used to make a best guess at the
57
- process type:
57
+ process type and the project directory.
58
58
59
- If the project directory or one of its parents contains a
60
- \" cabal.sandbox.config\" file, then cabal-repl will be used.
59
+ Emacs looks in the current directory and then in its parents for
60
+ a file \" cabal.sandbox.config\" or \" cabal.project\" . its
61
+ location is the project directory, and \" cabal\" will be used.
61
62
62
- If there's a \" stack.yaml\" file and the \" stack\" executable can
63
- be located, then stack-ghci will be used.
63
+ Otherwise if a file \" stack.yaml\" is found, its location is the
64
+ project directory, and stack will be used
65
+ Otherwise if a file \" *.cabal\" is found, its location is the
66
+ project directory, and cabal will be used.
67
+ If none of the above apply, ghc will be used.
64
68
65
- Otherwise if there's a *.cabal file, cabal-repl will be used.
66
- If none of the above apply, ghci will be used.
67
69
(The value cabal-new-repl is obsolete, equivalent to cabal-repl)."
68
70
:type '(choice (const auto)
69
71
(const ghci)
@@ -423,7 +425,7 @@ presence of a *.cabal file or stack.yaml file or something similar.")
423
425
When found, returns a pair (TAG . DIR)
424
426
where TAG is 'cabal-project, 'cabal-sandbox. 'cabal, or 'stack;
425
427
and DIR is the directory containing cabal or stack file.
426
- When none found, DIR is nil, and TAG is 'cabal, 'stack. or ' ghc"
428
+ When none found, DIR is nil, and TAG is 'ghc"
427
429
; ; REVIEW maybe just 'cabal is enough.
428
430
(let ((cabal-project (locate-dominating-file default-directory " cabal.project" ))
429
431
(cabal-sandbox (locate-dominating-file default-directory " cabal.sandbox.config" ))
@@ -438,7 +440,7 @@ presence of a *.cabal file or stack.yaml file or something similar.")
438
440
((and cabal-project (executable-find " cabal" ))
439
441
(cons 'cabal-project cabal-project))
440
442
((and cabal-sandbox (executable-find " cabal" ))
441
- (cons 'cabal cabal-sandbox))
443
+ (cons 'cabal-sandbox cabal-sandbox))
442
444
((and stack (executable-find " stack" ))
443
445
(cons 'stack stack))
444
446
((and cabal (executable-find " cabal" ))
0 commit comments