diff --git a/doc/haskell-mode.texi b/doc/haskell-mode.texi index f32af765c..e86a40e57 100644 --- a/doc/haskell-mode.texi +++ b/doc/haskell-mode.texi @@ -297,18 +297,6 @@ To just align imports, jump to an import section and run @code{M-x haskell-align-imports} -@subsection Entering imports - -If you have Haskell Interactive Mode enabled and a session open, -you can write - - @code{import} - -And then hit @kbd{SPC} (running @code{M-x haskell-mode-contextual-space}) -which will prompt a list of all modules, either installed modules or -local project directory files. Then it'll insert it and then format that -module section. - @subsection stylish-haskell As an alternative to the elisp functions described above, haskell-mode @@ -776,7 +764,7 @@ program to start and its arguments: If it's @code{ghci}, @code{haskell-process-path-ghci} and @code{haskell-process-args-ghci} will be used. @item -If it's @code{cabal-repl}, @code{haskell-process-path-ghci} and +If it's @code{cabal-repl}, @code{haskell-process-path-ghci} and @code{haskell-process-args-ghci}. @item If it's @code{stack-ghci}, @code{haskell-process-path-stack} and diff --git a/haskell-indentation.el b/haskell-indentation.el index 03c5348a6..55bcc4877 100644 --- a/haskell-indentation.el +++ b/haskell-indentation.el @@ -129,8 +129,7 @@ set and deleted as if they were real tabs." (defvar haskell-literate) ; defined in haskell-mode.el (defun haskell-indentation-bird-p () - "Return t if this is a literate Haskell buffer in bird style, -NIL otherwise." + "Return t if this is a literate Haskell buffer in bird style, NIL otherwise." (eq haskell-literate 'bird)) ;;---------------------------------------------------------------------------- diff --git a/haskell-mode.el b/haskell-mode.el index c76fb7ca1..54f87dca5 100644 --- a/haskell-mode.el +++ b/haskell-mode.el @@ -655,13 +655,6 @@ May return a qualified name." (let ((fill-prefix (or fill-prefix (if (eq haskell-literate 'bird) ">")))) (delete-indentation arg))) -;; Various mode variables. -(defcustom haskell-mode-contextual-import-completion - t - "Enable import completion on haskell-mode-contextual-space." - :type 'boolean - :group 'haskell-interactive) - (defvar eldoc-print-current-symbol-info-function) (defvar haskell-mode-interactive-prompt-state nil diff --git a/haskell.el b/haskell.el index f977fd206..858a2964f 100644 --- a/haskell.el +++ b/haskell.el @@ -333,33 +333,6 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'." (haskell-interactive-mode-error-backward) (haskell-interactive-jump-to-error-line))))) -;;;###autoload -(defun haskell-mode-contextual-space () - "Contextually do clever stuff when hitting space." - (interactive) - (if (or (not (bound-and-true-p interactive-haskell-mode)) - (not (haskell-session-maybe))) - (self-insert-command 1) - (cond ((and haskell-mode-contextual-import-completion - (save-excursion (forward-word -1) - (looking-at "^import$"))) - (insert " ") - (let ((module (haskell-complete-module-read - "Module: " - (haskell-session-all-modules (haskell-session))))) - (let ((mapping (assoc module haskell-import-mapping))) - (if mapping - (progn (delete-region (line-beginning-position) - (line-end-position)) - (insert (cdr mapping))) - (insert module))) - (haskell-mode-format-imports))) - (t - (let ((ident (save-excursion (forward-char -1) (haskell-ident-at-point)))) - (insert " ") - (when ident - (haskell-process-do-try-info ident))))))) - (defvar xref-prompt-for-identifier nil) ;;;###autoload