[PATCH 1/2] emacs: add defsubst notmuch-address--message-insinuated

Tomi Ollila tomi.ollila at iki.fi
Wed Aug 26 13:07:05 PDT 2015


This "inline function" is currently used in
notmuch-address-message-insinuate (to not enable address completion if
it is already enabled). In some functions later this will be called
to know whether address completion can be used there, too.
---

Previous version of this 2-patch series is at
id:1423229911-14784-1-git-send-email-too at guru.guru-group.fi

 emacs/notmuch-address.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index fde3c1b2b861..6c93b2a7a820 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -54,8 +54,11 @@ (defvar notmuch-address-message-alist-member
 
 (defvar notmuch-address-history nil)
 
+(defsubst notmuch-address--message-insinuated ()
+  (memq notmuch-address-message-alist-member message-completion-alist))
+
 (defun notmuch-address-message-insinuate ()
-  (unless (memq notmuch-address-message-alist-member message-completion-alist)
+  (unless (notmuch-address--message-insinuated)
     (setq message-completion-alist
 	  (push notmuch-address-message-alist-member message-completion-alist))))
 
-- 
2.0.0



More information about the notmuch mailing list