 (defun racer-activate ()
   "Add Racer as the completion backend for the current buffer."
   (company-mode)
-  (set (make-local-variable 'company-backends) '(racer-company-complete))
-  (setq-local company-idle-delay nil))
+  (set (make-local-variable 'company-backends) '(racer-company-complete)))
 
 (defun racer--syntax-highlight (str)
   "Apply font-lock properties to a string of Rust code."

    "/usr/local/src/rust/src")
  "Path to the rust source tree."
  :type 'file
  :group 'racer)

(defun racer-get-line-number ()

      (delete-file racer-tmp-file-name)
      (when (string-match "^PREFIX \\(.+\\),\\(.+\\),\\(.*\\)$" (nth 0 lines))
        (match-string 3 (nth 0 lines))))))

(defun racer--company-prefix ()
    "Returns the symbol to complete. If racer-begin-after-member-access is t,
begins completion automatically if the cursor is followed by a dot or ::."
  (if racer-begin-after-member-access
    (company-grab-symbol-cons "\\.\\|::" 2)
    (company-grab-symbol)))

(defun racer--company-location (arg)
  (let ((fname (get-text-property 0 'fname arg))
        (linenum (get-text-property 0 'linenum arg)))
    (cons fname (string-to-number linenum))))

(defun racer--complete-at-point-fn ()
  "Run the racer complete command and process the results."
