     "/usr/local/src/rust/src")
   "Path to the rust source tree."
   :type 'file
+  :group 'racer)
+
+(defcustom racer-begin-after-member-access t
+  "When non-nil, begins completion automatically when the cursor is preceded
+by :: or ."
+  :type 'boolean
   :group 'racer)
 
 (defun racer-get-line-number ()

                (contextstr (match-string 6 line)))
            (put-text-property 0 1 'contextstr contextstr completion)
            (put-text-property 0 1 'matchtype matchtype completion)
            (push completion racer-completion-results))))
      racer-completion-results)))


      (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."
