Commits

seanmcl  committed 9c7fc1b Merge
  • Participants
  • Parent commits f72475c, 9834c90

Comments (0)

Files changed (3)

File elisp/omake/omake-connection.el

   (let ((p Omake.Connection.process))
     (when p (equal (process-status p) 'open))))
 ;; (Omake.Connection.open-p)
+;; (process-status Omake.Connection.process)
 
 (defun Omake.Connection.open ()
   "A TCP connection is made to the server via the user's socket."
   (unless (Omake.Connection.open-p) (Omake.Connection.open)))
 
 (defun Omake.Connection.close ()
+  "Called from ocaml when the server is stopped."
   (when (Omake.Connection.open-p)
     (call-process
      Omake.Server.program

File ocaml/omake/emacs.ml

 
 let kill_model id =
   Async.send_all_watching id
-    "(Omake.Model.kill (OMake.Id.of-path \"%s\"))" (Id.to_string id);
+    "(Omake.Model.kill (Omake.Id.of-path \"%s\"))" (Id.to_string id);
   Hashtbl.iter table ~f:(fun ~key:_ ~data:t -> Hash_set.remove t.watching id)

File ocaml/omake/query.ml

     | Stop_server ->
       Projects.killall () >>= fun () ->
       Projects.update_all () >>= fun () ->
+      Emacs.Async.send_all "(Omake.Connection.close)";
       Log.printf "Stopping server";
       shutdown 0;
       Deferred.unit