From 214e1ed72b4dfdbcea6ccfc9a338b13e921bd1dd Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 15 Feb 2013 00:33:57 +0100 Subject: [PATCH] emacs: Start auto-complete after init Since the load paths for ELPA-installed packages doesn't get set-up until after the init file has loaded, defer loading and enabling of auto-complete to after initializations. --- .emacs.d/init.el | 1 + .emacs.d/site-lisp/oni.el | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 4921dee..cc6528c 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -180,6 +180,7 @@ (add-hook 'c-mode-hook 'oni:c-mode-func) (add-hook 'css-mode-hook 'oni:css-mode-func) (add-hook 'diary-display-hook 'oni:diary-display-func) +(add-hook 'emacs-startup-hook 'oni:emacs-startup-func) (add-hook 'emacs-lisp-mode-hook 'oni:emacs-lisp-mode-func) (add-hook 'erc-mode-hook 'oni:erc-mode-func) (add-hook 'go-mode-hook 'oni:go-mode-func) diff --git a/.emacs.d/site-lisp/oni.el b/.emacs.d/site-lisp/oni.el index a2dbea0..2729474 100644 --- a/.emacs.d/site-lisp/oni.el +++ b/.emacs.d/site-lisp/oni.el @@ -104,6 +104,11 @@ DOT are intentionally being skipped." "Function for `emacs-lisp-mode-hook'." (eldoc-mode)) +(defun oni:emacs-startup-func () + "Function for `emacs-init-hook'." + (require 'auto-complete-config) + (ac-config-default)) + (defun oni:erc-mode-func () "Function for `erc-mode-hook'." (erc-fill-mode -1)