Commits

seanmcl  committed 9298ff0 Merge

Automated merge with file:///mnt/share/jane

  • Participants
  • Parent commits 5072373, cc7395a

Comments (0)

Files changed (2)

File elisp/omake/omake-project.el

       (message "Unwatching project %s" ids)
       ;; If this is the only Emacs watching the project
       (let ((kill
-             (if (and (equal ws 1) (Omake.Ocaml.Config.kill-when-unwatched))
+             (or (not Omake.prompt-before-killing-project)
+                 (> ws 1)
+                 (not (Omake.Ocaml.Config.kill-when-unwatched))
                  (Emacs.y-or-n-p
                   (format "\
 This is the last Emacs watching project
   %s
 Proceeding will kill the project.
-Proceed? " ids))
-               t)))
+Proceed? " ids)))))
         (when kill
           (Emacs.protect-from-quit
             (Omake.Server.unwatch id)
 
 (defun* Omake.Project.create-buffer (&key display)
   (interactive)
-  (Omake.with-connection
-    (let* ((buf (Omake.Buffer.get 'projects))
-           (lines (List.mapi 'Omake.Project.to-line Omake.Project.list)))
-      (Buffer.edit-read-only buf
-        (let ((pt (point)))
-          (Buffer.clear buf)
-          (insertf "%3s %-8s %-11s %-25s %s \n\n" "" "watching" "#watching" "omakeroot" "dir")
-          (mapc 'insert lines)
-          (goto-char pt)
-          (omake-project-mode 1)))
-      (when display (display-buffer buf)))))
+  (let* ((buf (Omake.Buffer.get 'projects))
+         (lines (List.mapi 'Omake.Project.to-line Omake.Project.list)))
+    (Buffer.edit-read-only buf
+      (let ((pt (point)))
+        (Buffer.clear buf)
+        (insertf "%3s %-8s %-11s %-25s %s \n\n" "" "watching" "#watching" "omakeroot" "dir")
+        (mapc 'insert lines)
+        (goto-char pt)
+        (omake-project-mode 1)))
+    (when display (display-buffer buf))))
 ;; (Omake.Project.create-buffer)
 
 (defun Omake.Project.update (ps)

File ocaml/omake/config.ml

 
 let home = getenv_exn "HOME"
 
-let config_file = sprintf "%s/.omake-server/config" home
+let config_dir = sprintf "%s/.omake-server" home
+
+let config_file = sprintf "%s/config" config_dir
 
 let has_config_file () = Sys.file_exists_exn config_file
 
 
 let init () =
   begin
+    Shell.mkdir ~p:() config_dir;
     write_default_file ();
     let chan = open_in config_file in
     t := t_of_sexp (Sexp.input_sexp chan)