fix(emacs/lean-server): use process-query-on-exit-flag to kill

lean-server automatically on exit

To fix a problem mentioned in #147
This commit is contained in:
Soonho Kong 2014-09-07 22:29:09 -04:00
parent 48e5a2b6ad
commit 5c89e70a23

View file

@ -175,6 +175,7 @@
(set-process-coding-system lean-server-process 'utf-8 'utf-8)
(set-process-filter lean-server-process 'lean-server-output-filter)
(set-process-sentinel lean-server-process 'lean-server-handle-signal)
(set-process-query-on-exit-flag lean-server-process nil)
(lean-server-initialize-global-vars)
(setq lean-global-server-process lean-server-process)
lean-server-process))
@ -442,10 +443,4 @@ Otherwise, set an idle-timer to call the handler again"
ret)))
(if lean-global-async-task-queue (lean-server-set-timer-for-event-handler))))
(defadvice save-buffers-kill-emacs
(before lean-server-kill-before-kill-emacs activate)
"Call `lean-server-kill-process', to avoid the user being
prompted to kill the lean-server process."
(lean-server-kill-process))
(provide 'lean-server)