   :type '(list symbol)
   :group 'auto-complete)
 
+(defcustom ac-trigger-commands
+  '(self-insert-command)
+  "Trigger commands that specify whether `auto-complete' should start or not."
+  :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,

  '((candidates . ac-filename-candidate))
  "Source for completing file name.")

;; TODO rename
(defun ac-semantic-candidate (prefix)
  (when (require 'semantic-ia nil t)
    (if (memq major-mode
              '(c-mode c++-mode jde-mode java-mode))
        (mapcar 'semantic-tag-name
                (ignore-errors
                  (or (semantic-ia-get-completions
                       (semantic-analyze-current-context) (point))
                      (senator-find-tag-for-completion (regexp-quote prefix))))))))

(defvar ac-source-semantic
  '((candidates . (lambda () (all-completions ac-prefix (ac-semantic-candidate ac-prefix)))))
  "Source for semantic.")

(defvar ac-imenu-index nil
  "Imenu index.")


    (or point
        (if (and ac-completing ac-sources-omni-completion)
            ac-point
          (setq ac-current-sources ac-sources)
          (setq ac-sources-omni-completion nil)
          (funcall ac-sources-prefix-function)))))

(defun ac-sources-prefix-default ()
  "Default implementation for `ac-sources-prefix-function'."
  (require 'thingatpt)
  (car-safe (bounds-of-thing-at-point 'symbol)))

(defun ac-sources-candidate ()
  "Implementation for `ac-cadidates-function' by sources."
