Re: Remove company mode when editing GPG files
Michael Heerdegen via Users list for the GNU Emacs text editor <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
aitor <[email protected]> writes: > (use-package epa > ;; disable company when visiting pgp files > :hook (auto-encryption-mode . (lambda () > (progn > (message "auto-encryption-mode hook") > (company-mode -1))))) This will give you this: #+begin_src emacs-lisp (add-hook 'auto-encryption-mode-hook #'(lambda nil (progn (message "auto-encryption-mode hook") (company-mode -1)))) #+end_src But `auto-encryption-mode' is a global mode. So auto encryption itself will not the that hook. Toggling the global mode will. Michael.