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.
This commit is contained in:
Tom Willemsen 2013-02-15 00:33:57 +01:00
parent 111e229676
commit 214e1ed72b
2 changed files with 6 additions and 0 deletions

View file

@ -180,6 +180,7 @@
(add-hook 'c-mode-hook 'oni:c-mode-func) (add-hook 'c-mode-hook 'oni:c-mode-func)
(add-hook 'css-mode-hook 'oni:css-mode-func) (add-hook 'css-mode-hook 'oni:css-mode-func)
(add-hook 'diary-display-hook 'oni:diary-display-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 'emacs-lisp-mode-hook 'oni:emacs-lisp-mode-func)
(add-hook 'erc-mode-hook 'oni:erc-mode-func) (add-hook 'erc-mode-hook 'oni:erc-mode-func)
(add-hook 'go-mode-hook 'oni:go-mode-func) (add-hook 'go-mode-hook 'oni:go-mode-func)

View file

@ -104,6 +104,11 @@ DOT are intentionally being skipped."
"Function for `emacs-lisp-mode-hook'." "Function for `emacs-lisp-mode-hook'."
(eldoc-mode)) (eldoc-mode))
(defun oni:emacs-startup-func ()
"Function for `emacs-init-hook'."
(require 'auto-complete-config)
(ac-config-default))
(defun oni:erc-mode-func () (defun oni:erc-mode-func ()
"Function for `erc-mode-hook'." "Function for `erc-mode-hook'."
(erc-fill-mode -1) (erc-fill-mode -1)