   "Increment count when this valiable is last-command")
 
 (defvar ac-dabbrev-reset-char nil
-  "Reset count when this valiable have insert char.");(setq ac-dabbrev-reset-char '("-"))
+  "Reset count when this valiable have insert char.") ;(setq ac-dabbrev-reset-char '("-"))
 
 (defvar ac-dabbrev-reset-always nil
   "Non-nil means reset count when candidates is 0.")

    (ac-dabbrev-find-limit-expansions abbrev ac-candidate-max nil)))

(lexical-let ((count 1))
(defun ac-dabbrev-set-count ()
  (setq command-char last-command-char)
    (if (memq last-command ac-dabbrev-trigger-commands)
        (incf count)
      (setq count 1))

(defun ac-dabbrev-find-limit-expansions (abbrev limit ignore-case)
  "Return a list of limit expansions of ABBREV.
If IGNORE-CASE is non-nil, accept matches which differ in case."
  (let ((all-expansions nil) (i 0)
        expansion)
    (save-excursion
      (goto-char (point-min))
      (while
          (and (< i limit)
               (setq expansion (dabbrev--find-expansion abbrev -1 ignore-case)))
        (setq all-expansions (cons expansion all-expansions))
        (setq i (+ i 1)))
      (if ac-dabbrev-sort
          (sort all-expansions (lambda (s1 s2) (if (< (length s1) (length s2)) t nil)))
        all-expansions))))
