 ;;; ac-dabbrev.el --- auto-complete.el source for dabbrev
 ;; -*- Mode: Emacs-Lisp -*-
 
-;; Copyright (C) 2008 by 101000code/101000LAB
+;; Copyright (C) 2009 by 101000code/101000LAB
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by

;;            ))

;;; Change Log
;; 0.0.4: new valiable:ac-dabbrev-reset-char. this valiable is suga idea. this valiable reset count when this valiable have insert char.
;;        new valiable:ac-dabbrev-reset-always. reset count when ac-candidates is nil and this valiable non-nil.
;; -.-.-: document typo fix.

    count))

(defun ac-dabbrev-get-candidates (abbrev)
  (if (>= (ac-dabbrev-set-count) ac-dabbrev-all-min-count)
      (ac-dabbrev-get-limit-candidates abbrev t)
    (ac-dabbrev-get-limit-candidates abbrev nil)))

(defvar ac-source-dabbrev
  '((candidates
     . (lambda () (all-completions ac-target (ac-dabbrev-get-candidates ac-target))))
    (candidate-face . ac-dabbrev-menu-face)
    (selection-face . ac-dabbrev-selection-face))
  "Source for dabbrev")

(defface ac-dabbrev-menu-face
  '((t (:background "white" :foreground "blue")))
  "Face for dabbrev candidate menu."
  :group 'auto-complete)

(defface ac-dabbrev-selection-face
  '((t (:background "blue" :foreground "white")))
  "Face for the dabbrev selected candidate."
  :group 'auto-complete)

;; mode provide
(provide 'ac-dabbrev)
