 (defun ac-complete ()
   "Try completion."
   (interactive)
-  (let* ((string (overlay-get (ac-menu-line-overlay ac-menu ac-selection) 'real-string))
-         (action (ac-get-candidate-property 'action string)))
+  (let* ((candidate (ac-get-selected-candidate))
+         (action (ac-get-candidate-action candidate)))
     (ac-expand-1)
     (if action
         (funcall action))

  :type '(list symbol)
  :group 'auto-complete)

(defcustom ac-auto-start t
  "Non-nil means completion will be started automatically.
Positive integer means if a length of a word you entered is larger than the value,


(make-variable-buffer-local 'ac-sources)

(defvar ac-sources-prefix-function 'ac-sources-prefix-default
  "Default prefix function for sources.
You should override this variable instead of ac-prefix-function.")

(defvar ac-current-sources nil
  "Current working sources.")

