       ;; Rewrite evil-complete to use company-dabbrev
       (setq company-dabbrev-code-other-buffers t)
       (setq company-dabbrev-code-buffers nil)
-
       (setq evil-complete-next-func
             (lambda(arg)
               (call-interactively 'company-dabbrev)
               (if (eq company-candidates-length 1)
                 (company-complete))))
-
       (setq evil-complete-previous-func
             (lambda (arg)
               (let ((company-selection-wrap-around t))

        (add-hook hook
                  `(lambda()
                     (set (make-local-variable 'company-backends)
                          (append '((,@backends company-dictionary)) company-backends)))))

      (company--backend-on 'nxml-mode-hook 'company-nxml 'company-yasnippet)
      (company--backend-on 'emacs-lisp-mode-hook 'company-elisp 'company-yasnippet)

    ;; Sort candidates by
    (add-to-list 'company-transformers 'company-sort-by-occurrence)
    ;; (add-to-list 'company-transformers 'company-sort-by-backend-importance)
    (use-package company-statistics
      :config
      (progn
        (setq company-statistics-file (expand-file-name "company-statistics-cache.el" my-tmp-dir))
        (company-statistics-mode)))

    (progn ; frontends
      (setq-default company-frontends '(company-pseudo-tooltip-unless-just-one-frontend
