X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-address.el;h=e2af8792c34af6ad95e01ca29f2e8a3eaca33c25;hp=fde3c1b2b861fb15063abe5fb4d480084149c88c;hb=0e671478;hpb=6814a1cf73e45faaf9479d3570cdbce86fa6e6c8 diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el index fde3c1b2..e2af8792 100644 --- a/emacs/notmuch-address.el +++ b/emacs/notmuch-address.el @@ -23,11 +23,13 @@ ;; -(defcustom notmuch-address-command "notmuch-addresses" +(defcustom notmuch-address-command nil "The command which generates possible addresses. It must take a single argument and output a list of possible matches, one per -line." - :type 'string +line. The default value of nil disables address completion." + :type '(radio + (const :tag "Disable address completion" nil) + (string :tag "Use external completion command" "notmuch-addresses")) :group 'notmuch-send :group 'notmuch-external) @@ -55,10 +57,12 @@ to know how address selection is made by default." (defvar notmuch-address-history nil) (defun notmuch-address-message-insinuate () + (message "calling notmuch-address-message-insinuate is no longer needed")) + +(defun notmuch-address-setup () (unless (memq notmuch-address-message-alist-member message-completion-alist) (setq message-completion-alist (push notmuch-address-message-alist-member message-completion-alist)))) - (defun notmuch-address-options (original) (process-lines notmuch-address-command original)) @@ -109,11 +113,4 @@ to know how address selection is made by default." (not (file-directory-p bin)))) (throw 'found-command bin)))))))) -;; If we can find the program specified by `notmuch-address-command', -;; insinuate ourselves into `message-mode'. -(when (notmuch-address-locate-command notmuch-address-command) - (notmuch-address-message-insinuate)) - -;; - (provide 'notmuch-address)