 (setq company-auto-complete nil)
 
 (add-hook 'lisp-mode #'(complete-mode 1))
-
-;; (defun indent-or-complete ()
-;;   (interactive)
-;;   (if (looking-at "\\_>")
-;;       (company-complete-common)
-;;     (indent-according-to-mode)))
-
-;; (defun complete-or-indent ()
-;;   (interactive)
-;;   (if (company-manual-begin)
-;;       (company-complete-common)
-;;     (indent-according-to-mode)))
 
 (defadvice kill-line (before check-position activate)
   (if (and (eolp) (not (bolp)))

  (let ((yas/fallback-behavior 'return-nil))
    (yas/expand)))

;; (defun tab-indent-or-complete ()
;;   (interactive)
;;   (if (minibufferp)
;;       (minibuffer-complete)
;;     (if (or (not yas/minor-mode)
;;	    (null (do-yas-expand)))
;;	(if (check-expansion)
;;	    (company-complete-common)
;;	  (indent-for-tab-command)))))

(setq company-idle-delay 0.3)
(setq company-tooltip-limit 20)
(setq company-minimum-prefix-length 2)

	;; ("marmalade" . "http://marmalade-repo.org/packages/")
	;; ("org" . "http://orgmode.org/elpa/")))

(package-initialize)

(when (not package-archive-contents)
