help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Enabling company mode again after disabling it


From: martin-kemp
Subject: Enabling company mode again after disabling it
Date: Thu, 10 Jun 2021 01:39:29 +0200 (CEST)

I have the following code: company-complt to enable it and 
company-complt-disable to disable.



But I have found that after calling company-complt-disable, the call to 
company-complt does not

enable company-mode again.





(defun company-complt ()
  (interactive)

  (setq company-minimum-prefix-length 2)

  ;; use dynamic abbreviations to expand words
  (setq company-backends '(company-dabbrev-code company-dabbrev))

  ;; look for text in current buffer, then in all open buffers
  (setq company-dabbrev-code-everywhere t)
  (setq company-dabbrev-code-ignore-case t)
  (setq company-dabbrev-code-other-buffers t)

  (setq company-dabbrev-code-everywhere t)
  (setq company-dabbrev-ignore-case t)
  (setq company-dabbrev-other-buffers t)
   
  (add-hook 'after-init-hook 'global-company-mode))

(defun company-complt-disable ()
   "Disables company completion"
   (interactive)
   (company-mode -1))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]