]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-company.el
emacs/desktop: update to use notmuch-emacs-mua and handle mailto
[notmuch] / emacs / notmuch-company.el
index 5d75c1455933e0548cb44fe47b26d718c4656a14..3e12e7a9f729984899dc32e5cbf2cb1b8e930710 100644 (file)
 (declare-function company-mode "company")
 (declare-function company-manual-begin "company")
 (defvar company-backends)
+(defvar company-idle-delay)
 
 (declare-function notmuch-address-harvest "notmuch-address")
 (declare-function notmuch-address-harvest-trigger "notmuch-address")
 (declare-function notmuch-address-matching "notmuch-address")
-(defvar notmuch-address-full-harvest-finished)
+(declare-function notmuch-address--harvest-ready "notmuch-address")
 (defvar notmuch-address-completion-headers-regexp)
+(defvar notmuch-address-command)
 
 ;;;###autoload
 (defun notmuch-company-setup ()
@@ -70,7 +72,7 @@
                                 (line-beginning-position))
                   (setq notmuch-company-last-prefix (company-grab "[:,][ \t]*\\(.*\\)" 1 (point-at-bol)))))
       (candidates (cond
-                  (notmuch-address-full-harvest-finished
+                  ((notmuch-address--harvest-ready)
                    ;; Update harvested addressed from time to time
                    (notmuch-address-harvest-trigger)
                    (notmuch-address-matching arg))
@@ -87,6 +89,7 @@
       (match (if (string-match notmuch-company-last-prefix arg)
                 (match-end 0)
               0))
+      (post-completion (run-hook-with-args 'notmuch-address-post-completion-functions arg))
       (no-cache t))))