     (let* ((column-num (+ 1 (save-excursion (goto-char (point)) (current-column))))
            (line-num (line-number-at-pos (point)))
            (full-path (buffer-file-name))
-           (file-contents (buffer-string))
+           (file-contents (buffer-substring-no-properties (point-min) (point-max)))
            (file-types (ycmd--major-mode-to-file-types major-mode)))
       `(("file_data" .
          ((,full-path . (("contents" . ,file-contents)


This does nothing if no server is running."
  (interactive)
  
  (unwind-protect
      (when (ycmd-running?)
	(delete-process ycmd--server-process)))
  
  (ycmd--kill-notification-timer))

(defun ycmd-running? ()

This kills any ycmd server already running (under ycmd.el's
control.) The newly started server will have a new HMAC secret."
  (interactive)

  (ycmd-close)

  (let ((hmac-secret (ycmd--generate-hmac-secret)))
    (ycmd--start-server hmac-secret)
    (setq ycmd--hmac-secret hmac-secret))
