(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.
(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.
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))