spacemacs/contrib/auto-completion/funcs.el
syl20bnr 0c6682cbd1 Refactor one more time the auto-completin macros
It is important to define the buffer local backend variables
in a config.el otherwise it is not available in the layer
configuration if the auto-completion layer is removed.
There were also some issues by hiding the explicit
configuration of company inside a macro, for instance
helm-spacemacs is unable to display the company package
configured in a given layer if the auto-completion layer
is removed.
2015-04-09 00:03:51 -04:00

35 lines
1.2 KiB
EmacsLisp

;;; funcs.el --- Auto-completion functions File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(spacemacs|add-toggle auto-completion
:status
(if (eq 'company auto-completion-front-end)
company-mode
auto-complete-mode)
:on
(progn
(if (eq 'company auto-completion-front-end)
(company-mode)
(auto-complete-mode))
(message "Enabled auto-completion (using %S)."
auto-completion-front-end))
:off
(progn
(if (eq 'company auto-completion-front-end)
(company-mode -1)
(auto-complete-mode -1))
(message "Disabled auto-completion."))
:documentation "Activate auto-completion."
:evil-leader "ta")