Skip to content

Commit 945f9b0

Browse files
committed
haskell-load-on-save: new custom
1 parent 81c1af4 commit 945f9b0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

haskell-customize.el

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ when showing type information about symbols."
9797
:link '(custom-manual "(haskell-mode)haskell-interactive-mode")
9898
:group 'haskell)
9999

100+
(defcustom haskell-load-on-save nil
101+
"Whether to load the buffer after saving."
102+
:group 'haskell-interactive
103+
:type 'boolean)
104+
100105
(defcustom haskell-process-path-ghci
101106
"ghci"
102107
"The path for starting ghci."

haskell.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@ If `haskell-process-load-or-reload-prompt' is nil, accept `default'."
342342
(ignore-errors (haskell-mode-stylish-buffer))
343343
(let ((before-save-hook '())
344344
(after-save-hook '()))
345-
(basic-save-buffer))))
345+
(basic-save-buffer)))
346+
(when haskell-load-on-save
347+
(haskell-process-load-or-reload)))
346348

347349
;;;###autoload
348350
(defun haskell-mode-tag-find (&optional next-p)

0 commit comments

Comments
 (0)