X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=emacs%2Fnotmuch-address.el;h=2eaca7958bb2736de3e21abe0e04a5946f95ab96;hb=df9736f20be0aa4db96e3ceaccb4f614ecbd4a9b;hp=5b2beefeb823c906280755ed4da121fe209969ee;hpb=4817005bfc811500802a2a65fd5351658a3e5a7d;p=notmuch diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el index 5b2beefe..2eaca795 100644 --- a/emacs/notmuch-address.el +++ b/emacs/notmuch-address.el @@ -37,7 +37,11 @@ (defvar notmuch-address-full-harvest-finished nil "t indicates that full completion address harvesting has been -finished") +finished. Use notmuch-address--harvest-ready to access.") + +(defun notmuch-address--harvest-ready () + "Return t if there is a full address hash available." + notmuch-address-full-harvest-finished) (defcustom notmuch-address-command 'internal "Determines how address completion candidates are generated. @@ -147,11 +151,11 @@ toggles the setting in this buffer." (interactive) (if (local-variable-p 'notmuch-address-command) (kill-local-variable 'notmuch-address-command) - (setq-local notmuch-address-command 'internal)) + (notmuch-setq-local notmuch-address-command 'internal)) (if (boundp 'company-idle-delay) (if (local-variable-p 'company-idle-delay) (kill-local-variable 'company-idle-delay) - (setq-local company-idle-delay nil)))) + (notmuch-setq-local company-idle-delay nil)))) (defun notmuch-address-matching (substring) "Returns a list of completion candidates matching SUBSTRING. @@ -170,7 +174,7 @@ elisp-based implementation or older implementation requiring external commands." (cond ((eq notmuch-address-command 'internal) - (when (not notmuch-address-full-harvest-finished) + (unless (notmuch-address--harvest-ready) ;; First, run quick synchronous harvest based on what the user ;; entered so far (notmuch-address-harvest original t))