 list of strings, giving the binary name and arguments.")
 
 (defun tern-start-server (c)
-  (let* ((default-directory tern-project-dir)
+  (let* ((default-directory (tern-project-dir))
          (cmd (if (member "--strip-crs" tern-command) tern-command (append tern-command '("--strip-crs"))))
          (proc (apply #'start-process "Tern" nil cmd))
          (all-output ""))

  (set (make-local-variable 'tern-known-port) nil)
  (set (make-local-variable 'tern-server) "127.0.0.1")
  (set (make-local-variable 'tern-explicit-port) nil)
  (set (make-local-variable 'tern-project-dir) nil)
  (set (make-local-variable 'tern-last-point-pos) nil)
  (set (make-local-variable 'tern-last-completions) nil)
  (set (make-local-variable 'tern-last-argument-hints) nil)

(defvar tern-known-port nil)
(defvar tern-server nil)
(defvar tern-explicit-port nil)

(defun tern-message (fmt &rest objects)
  (apply 'message fmt objects))
