Skip to content

Commit 4fb6e16

Browse files
committed
haskell-process | file loading: haskell-load-opens-repl: new custom
1 parent b075cbe commit 4fb6e16

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

haskell-customize.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ when showing type information about symbols."
105105
:link '(custom-manual "(haskell-mode)haskell-interactive-mode")
106106
:group 'haskell)
107107

108+
;;;###autoload
109+
(defcustom haskell-load-opens-repl t
110+
"Whether `haskell-process-load-file' should open the REPL."
111+
:group 'haskell-interactive
112+
:type 'boolean)
113+
108114
;;;###autoload
109115
(defcustom haskell-process-path-ghci
110116
"ghci"

haskell.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,8 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
381381
"Load the current buffer file."
382382
(interactive)
383383
(save-buffer)
384-
(haskell-interactive-mode-reset-error (haskell-session) no-window-popup)
384+
(haskell-interactive-mode-reset-error (haskell-session) (or no-window-popup
385+
(not haskell-load-opens-repl)))
385386
(haskell-process-file-loadish (format "load \"%s\"" (replace-regexp-in-string
386387
"\""
387388
"\\\\\""
@@ -407,7 +408,8 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
407408
(if haskell-reload-p
408409
"Now running :reload."
409410
"Now running :load <buffer-filename>.")))
410-
(if haskell-reload-p (haskell-process-reload-file) (haskell-process-load-file))))
411+
(if haskell-reload-p (haskell-process-reload-file) (haskell-process-load-file
412+
(not haskell-load-opens-repl)))))
411413

412414
;;;###autoload
413415
(defun haskell-process-cabal-build ()

0 commit comments

Comments
 (0)