           (setq location "/load_extra_conf_file")
         (setq location "/ignore_extra_conf_file"))
       (ycmd--request location `((filepath . ,conf-file)) :sync t)
-      (ycmd--report-status 'unparsed)
+      (ycmd--reset-parse-status)
       (ycmd-notify-file-ready-to-parse))))
 
 (defun ycmd--handle-error-exception (msg)

    (setq ycmd--server-actual-port
          (string-to-number (match-string 1 string)))
    (ycmd--with-all-ycmd-buffers
      (ycmd--report-status 'unparsed))
    (ycmd--perform-deferred-parse)))

(defun ycmd--start-server ()

    (ycmd--notify-server "BufferUnload"))
  (ycmd--teardown))

(defun ycmd--reset-parse-status ()
  (ycmd--report-status 'unparsed)
  (setq ycmd--last-modified-tick nil))

(defun ycmd--teardown ()
  "Teardown ycmd in current buffer."
  (ycmd--kill-timer ycmd--notification-timer)
  (ycmd--reset-parse-status)
  (setq ycmd--deferred-parse nil)
  (run-hooks 'ycmd-after-teardown-hook))

