ghc-with-process takes an optional hook.
This commit is contained in:
parent
b3fd99fa7d
commit
2e1df9c21f
@ -46,8 +46,9 @@ nil does not display errors/warnings.
|
||||
|
||||
(defun ghc-check-syntax ()
|
||||
(interactive)
|
||||
(setq mode-line-process " -:-") ;; fixme
|
||||
(ghc-with-process (ghc-check-send) 'ghc-check-callback))
|
||||
(ghc-with-process (ghc-check-send)
|
||||
'ghc-check-callback
|
||||
(lambda () (setq mode-line-process " -:-"))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
@ -25,10 +25,11 @@
|
||||
(defun ghc-get-project-root ()
|
||||
(ghc-run-ghc-mod '("root")))
|
||||
|
||||
(defun ghc-with-process (cmd callback)
|
||||
(defun ghc-with-process (cmd callback &optional hook)
|
||||
(unless ghc-process-process-name
|
||||
(setq ghc-process-process-name (ghc-get-project-root)))
|
||||
(when ghc-process-process-name
|
||||
(if hook (funcall hook))
|
||||
(let* ((cbuf (current-buffer))
|
||||
(name ghc-process-process-name)
|
||||
(buf (get-buffer-create (concat " ghc-modi:" name)))
|
||||
|
Loading…
Reference in New Issue
Block a user