diff --git a/layers/+lang/haskell/README.org b/layers/+lang/haskell/README.org index 257456183..bac3a37fc 100644 --- a/layers/+lang/haskell/README.org +++ b/layers/+lang/haskell/README.org @@ -277,7 +277,7 @@ REPL commands are prefixed by ~SPC m s~: |-------------+-------------------------------------------------| | ~SPC m s b~ | load or reload the current buffer into the REPL | | ~SPC m s c~ | clear the REPL | -| ~SPC m s s~ | show the REPL | +| ~SPC m s s~ | show the REPL without switching to it | | ~SPC m s S~ | show and switch to the REPL | ** Cabal commands diff --git a/layers/+lang/haskell/packages.el b/layers/+lang/haskell/packages.el index f60476374..68808b05d 100644 --- a/layers/+lang/haskell/packages.el +++ b/layers/+lang/haskell/packages.el @@ -64,6 +64,14 @@ ;; in structured-haskell-mode line highlighting creates noise (setq-local global-hl-line-mode nil))) + (defun spacemacs/haskell-interactive-bring () + "Bring up the interactive mode for this session without + switching to it." + (interactive) + (let* ((session (haskell-session)) + (buffer (haskell-session-interactive-buffer session))) + (display-buffer buffer))) + ;; hooks (add-hook 'haskell-mode-hook 'spacemacs/init-haskell-mode) (add-hook 'haskell-cabal-mode-hook 'haskell-cabal-hook) @@ -104,7 +112,7 @@ "msb" 'haskell-process-load-or-reload "msc" 'haskell-interactive-mode-clear - "mss" 'haskell-interactive-bring + "mss" 'spacemacs/haskell-interactive-bring "msS" 'haskell-interactive-switch "mca" 'haskell-process-cabal