I want to be able to enable and disable global-company-mode
by calling elisp functions in my init file.
Could I use (global-company-mode 1)
to enable and (global-company-mode -1)
to disable
Does this mean that I can do (global-company-mode 1) and (global-company-mode -1) without using the hook way (add-hook 'after-init-hook 'global-company-mode)
.
global-company-mode
is just a normal elisp function, am I right?(global-company-mode 1)
from Elisp.company-mode
should be revisited because the documentation of company states that to havecompany-mode
in all buffers, the following must be added to your init file:(add-hook 'after-init-hook 'global-company-mode)
.