boot skips map-file.
This commit is contained in:
parent
52016b6210
commit
6488f1070d
@ -101,7 +101,7 @@ unloaded modules are loaded")
|
|||||||
(defun ghc-boot (n)
|
(defun ghc-boot (n)
|
||||||
(prog2
|
(prog2
|
||||||
(message "Initializing...")
|
(message "Initializing...")
|
||||||
(ghc-sync-process "boot\n" n)
|
(ghc-sync-process "boot\n" n nil 'skip-map-file)
|
||||||
(message "Initializing...done")))
|
(message "Initializing...done")))
|
||||||
|
|
||||||
(defun ghc-load-modules (mods)
|
(defun ghc-load-modules (mods)
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
(defun ghc-get-project-root ()
|
(defun ghc-get-project-root ()
|
||||||
(ghc-run-ghc-mod '("root")))
|
(ghc-run-ghc-mod '("root")))
|
||||||
|
|
||||||
(defun ghc-with-process (cmd callback &optional hook1 hook2)
|
(defun ghc-with-process (cmd callback &optional hook1 hook2 skip-map-file)
|
||||||
(unless ghc-process-process-name
|
(unless ghc-process-process-name
|
||||||
(setq ghc-process-process-name (ghc-get-project-root)))
|
(setq ghc-process-process-name (ghc-get-project-root)))
|
||||||
(when (and ghc-process-process-name (not ghc-process-running))
|
(when (and ghc-process-process-name (not ghc-process-running))
|
||||||
@ -54,6 +54,7 @@
|
|||||||
(let ((pro (ghc-get-process cpro name buf))
|
(let ((pro (ghc-get-process cpro name buf))
|
||||||
(map-cmd (format "map-file %s\n" file)))
|
(map-cmd (format "map-file %s\n" file)))
|
||||||
;; map-file
|
;; map-file
|
||||||
|
(unless skip-map-file
|
||||||
(setq ghc-process-file-mapping t)
|
(setq ghc-process-file-mapping t)
|
||||||
(setq ghc-process-callback nil)
|
(setq ghc-process-callback nil)
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
@ -73,7 +74,7 @@
|
|||||||
(accept-process-output pro 0.1 nil t)))
|
(accept-process-output pro 0.1 nil t)))
|
||||||
(quit
|
(quit
|
||||||
(setq ghc-process-running nil)
|
(setq ghc-process-running nil)
|
||||||
(setq ghc-process-file-mapping nil)))
|
(setq ghc-process-file-mapping nil))))
|
||||||
;; command
|
;; command
|
||||||
(setq ghc-process-callback callback)
|
(setq ghc-process-callback callback)
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
@ -179,12 +180,12 @@
|
|||||||
(defvar ghc-process-num-of-results nil)
|
(defvar ghc-process-num-of-results nil)
|
||||||
(defvar ghc-process-results nil)
|
(defvar ghc-process-results nil)
|
||||||
|
|
||||||
(defun ghc-sync-process (cmd &optional n hook)
|
(defun ghc-sync-process (cmd &optional n hook skip-map-file)
|
||||||
(unless ghc-process-running
|
(unless ghc-process-running
|
||||||
(setq ghc-process-rendezvous nil)
|
(setq ghc-process-rendezvous nil)
|
||||||
(setq ghc-process-results nil)
|
(setq ghc-process-results nil)
|
||||||
(setq ghc-process-num-of-results (or n 1))
|
(setq ghc-process-num-of-results (or n 1))
|
||||||
(let ((pro (ghc-with-process cmd 'ghc-process-callback nil hook)))
|
(let ((pro (ghc-with-process cmd 'ghc-process-callback nil hook skip-map-file)))
|
||||||
;; ghc-process-running is now t.
|
;; ghc-process-running is now t.
|
||||||
;; But if the process exits abnormally, it is set to nil.
|
;; But if the process exits abnormally, it is set to nil.
|
||||||
(condition-case nil
|
(condition-case nil
|
||||||
|
Loading…
Reference in New Issue
Block a user