diff --git a/haskell-customize.el b/haskell-customize.el index 0516acc5b..158dc56f4 100644 --- a/haskell-customize.el +++ b/haskell-customize.el @@ -104,7 +104,7 @@ when showing type information about symbols." :type 'boolean :safe 'booleanp) -(defvar haskell-process-end-hook nil +(defvar haskell-process-ended-functions (list 'haskell-process-prompt-restart) "Hook for when the haskell process ends.") ;;;###autoload diff --git a/haskell-interactive-mode.el b/haskell-interactive-mode.el index 102bfe1a8..f3b518bf3 100644 --- a/haskell-interactive-mode.el +++ b/haskell-interactive-mode.el @@ -95,10 +95,10 @@ Key bindings: (setq haskell-interactive-mode-history (list)) (setq haskell-interactive-mode-history-index 0) - (setq next-error-function 'haskell-interactive-next-error-function) + (setq next-error-function #'haskell-interactive-next-error-function) (add-hook 'completion-at-point-functions - 'haskell-interactive-mode-completion-at-point-function nil t) - + #'haskell-interactive-mode-completion-at-point-function nil t) + (add-hook 'kill-buffer-hook #'haskell-interactive-kill nil t) (haskell-interactive-mode-prompt)) (defvar haskell-interactive-mode-prompt-start diff --git a/haskell-process.el b/haskell-process.el index 51eea683d..d0480193c 100644 --- a/haskell-process.el +++ b/haskell-process.el @@ -138,7 +138,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function." (haskell-process-log (propertize "Process reset.\n" 'face font-lock-comment-face)) - (run-hook-with-args 'haskell-process-ended-hook process)))))) + (run-hook-with-args 'haskell-process-ended-functions process)))))) (defun haskell-process-filter (proc response) "The filter for the process pipe." @@ -233,7 +233,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function." 'face '((:weight bold)))) (process-send-string child out)) (unless (haskell-process-restarting process) - (run-hook-with-args 'haskell-process-ended process))))) + (run-hook-with-args 'haskell-process-ended-functions process))))) (defun haskell-process-live-updates (process) "Process live updates." @@ -271,7 +271,7 @@ the response." (haskell-command-exec-go cmd)))) (progn (haskell-process-reset process) (haskell-process-set process 'command-queue nil) - (run-hook-with-args 'haskell-process-ended process)))) + (run-hook-with-args 'haskell-process-ended-functions process)))) (defun haskell-process-queue-flushed-p (process) "Return t if command queue has been completely processed." diff --git a/haskell.el b/haskell.el index 84a49dc31..003ac0902 100644 --- a/haskell.el +++ b/haskell.el @@ -36,12 +36,6 @@ (require 'haskell-utils) (require 'haskell-customize) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Basic configuration hooks - -(add-hook 'haskell-process-ended-hook 'haskell-process-prompt-restart) -(add-hook 'kill-buffer-hook 'haskell-interactive-kill) - (defvar interactive-haskell-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "C-c C-l") 'haskell-process-load-file)