unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Enabling company mode again after disabling it
@ 2021-06-09 23:39 martin-kemp
  0 siblings, 0 replies; only message in thread
From: martin-kemp @ 2021-06-09 23:39 UTC (permalink / raw)
  To: help-gnu-emacs

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))



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-09 23:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-09 23:39 Enabling company mode again after disabling it martin-kemp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).