]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-company.el
emacs: address: allow internal completion on an individual basis
[notmuch] / emacs / notmuch-company.el
index 610e223deffc6eec337da69e28a3ecc5be8881bd..168315ff225fb68034979ad38cab1ebd976cde33 100644 (file)
 (defun notmuch-company-setup ()
   (company-mode)
   (make-local-variable 'company-backends)
-  (setq company-backends '(notmuch-company)))
+  (setq company-backends '(notmuch-company))
+  ;; Disable automatic company completion unless an internal
+  ;; completion method is configured. Company completion (using
+  ;; internal completion) can still be accessed via standard company
+  ;; functions, e.g., company-complete.
+  (unless (eq notmuch-address-command 'internal)
+    (setq-local company-idle-delay nil)))
 
 ;;;###autoload
 (defun notmuch-company (command &optional arg &rest _ignore)