Skip to content

Commit 73821ab

Browse files
Fixed typo and moved suggested-already.
1 parent feeb964 commit 73821ab

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

haskell-process.el

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -873,9 +873,10 @@ from `module-buffer'."
873873
cabal-file))
874874
(haskell-cabal-add-dependency package-name version nil t))))
875875

876-
(defun haskell-process-suggest-imports (imports ident)
877-
"Given a list of IMPORTS, suggest adding them to the import section."
878-
(let ((module (cond ((> (length modules) 1)
876+
(defun haskell-process-suggest-imports (modules ident)
877+
"Given a list of MODULES, suggest adding them to the import section."
878+
(let ((suggested-already (haskell-process-suggested-imports process))
879+
(module (cond ((> (length modules) 1)
879880
(when (y-or-n-p (format "Identifier `%s' not in scope, choose module to import?"
880881
ident))
881882
(haskell-complete-module-read "Module: " modules)))
@@ -902,7 +903,6 @@ from `module-buffer'."
902903
and if a result comes back, suggest to import that identifier
903904
now."
904905
(let* ((process (haskell-session-process session))
905-
(suggested-already (haskell-process-suggested-imports process))
906906
(ident (let ((i (match-string 1 msg)))
907907
;; Skip qualification.
908908
(if (string-match "^[A-Za-z0-9_'.]+\\.\\(.+\\)$" i)
@@ -916,7 +916,6 @@ now."
916916
and if a result comes back, suggest to import that identifier
917917
now."
918918
(let* ((process (haskell-session-process session))
919-
(suggested-already (haskell-process-suggested-imports process))
920919
(ident (let ((i (match-string 1 msg)))
921920
;; Skip qualification.
922921
(if (string-match "^[A-Za-z0-9_'.]+\\.\\(.+\\)$" i)

0 commit comments

Comments
 (0)