From 8384ba91d9821489a894df42baf0c815c59ee599 Mon Sep 17 00:00:00 2001 From: Eivind Fonn Date: Mon, 14 Sep 2015 15:09:28 +0200 Subject: [PATCH] Fix #2390 Sets up company in eshell-mode-hook during the init phase so that it can be reliably disabled in user config. --- layers/shell/packages.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layers/shell/packages.el b/layers/shell/packages.el index 179f0afe1bed..097eac74e52b 100644 --- a/layers/shell/packages.el +++ b/layers/shell/packages.el @@ -27,6 +27,10 @@ (defun shell/pre-init-company () ;; support in eshell (spacemacs|use-package-add-hook eshell + :post-init + (progn + (push 'company-capf company-backends-eshell-mode) + (spacemacs|add-company-hook eshell-mode)) :post-config (progn (defun spacemacs//toggle-shell-auto-completion-based-on-path () @@ -45,9 +49,7 @@ the user activate the completion manually." "Sets the company frontend to `company-preview-frontend' in e-shell mode." (setq-local company-frontends '(company-preview-frontend))) (add-hook 'eshell-mode-hook - 'spacemacs//eshell-switch-company-frontend) - (push 'company-capf company-backends-eshell-mode) - (spacemacs|add-company-hook eshell-mode)))) + 'spacemacs//eshell-switch-company-frontend)))) (defun shell/init-eshell () (use-package eshell