Skip to content

Commit c737825

Browse files
committed
Change a couple hook properties
1) `haskell-interactive-kill` was added to the global hook instead of the local hook. 2) Typo: `haskell-process-end-hook` was used instead of `haskell-process-ended-hook` 3) Rename `haskell-process-ended-hook` to `haskell-process-ended-functions` as per https://www.gnu.org/software/emacs/manual/html_node/emacs/Hooks.html
1 parent ea1851b commit c737825

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

haskell-customize.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ when showing type information about symbols."
104104
:type 'boolean
105105
:safe 'booleanp)
106106

107-
(defvar haskell-process-end-hook nil
107+
(defvar haskell-process-ended-functions (list 'haskell-process-prompt-restart)
108108
"Hook for when the haskell process ends.")
109109

110110
;;;###autoload

haskell-interactive-mode.el

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ Key bindings:
9595
(setq haskell-interactive-mode-history (list))
9696
(setq haskell-interactive-mode-history-index 0)
9797

98-
(setq next-error-function 'haskell-interactive-next-error-function)
98+
(setq next-error-function #'haskell-interactive-next-error-function)
9999
(add-hook 'completion-at-point-functions
100-
'haskell-interactive-mode-completion-at-point-function nil t)
101-
100+
#'haskell-interactive-mode-completion-at-point-function nil t)
101+
(add-hook 'kill-buffer-hook #'haskell-interactive-kill nil t)
102102
(haskell-interactive-mode-prompt))
103103

104104
(defvar haskell-interactive-mode-prompt-start

haskell-process.el

+3-3
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
138138
(haskell-process-log
139139
(propertize "Process reset.\n"
140140
'face font-lock-comment-face))
141-
(run-hook-with-args 'haskell-process-ended-hook process))))))
141+
(run-hook-with-args 'haskell-process-ended-functions process))))))
142142

143143
(defun haskell-process-filter (proc response)
144144
"The filter for the process pipe."
@@ -233,7 +233,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
233233
'face '((:weight bold))))
234234
(process-send-string child out))
235235
(unless (haskell-process-restarting process)
236-
(run-hook-with-args 'haskell-process-ended process)))))
236+
(run-hook-with-args 'haskell-process-ended-functions process)))))
237237

238238
(defun haskell-process-live-updates (process)
239239
"Process live updates."
@@ -271,7 +271,7 @@ the response."
271271
(haskell-command-exec-go cmd))))
272272
(progn (haskell-process-reset process)
273273
(haskell-process-set process 'command-queue nil)
274-
(run-hook-with-args 'haskell-process-ended process))))
274+
(run-hook-with-args 'haskell-process-ended-functions process))))
275275

276276
(defun haskell-process-queue-flushed-p (process)
277277
"Return t if command queue has been completely processed."

haskell.el

-6
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@
3636
(require 'haskell-utils)
3737
(require 'haskell-customize)
3838

39-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
40-
;; Basic configuration hooks
41-
42-
(add-hook 'haskell-process-ended-hook 'haskell-process-prompt-restart)
43-
(add-hook 'kill-buffer-hook 'haskell-interactive-kill)
44-
4539
(defvar interactive-haskell-mode-map
4640
(let ((map (make-sparse-keymap)))
4741
(define-key map (kbd "C-c C-l") 'haskell-process-load-file)

0 commit comments

Comments
 (0)