[PATCH 2/4] emacs: add function notmuch-address--message-insinuated
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 2 Sep 2015 14:34:40 +0000 (17:34 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:29 +0000 (14:49 -0700)
4c/be6517d55d44c60377fb5e527d9cbe63e2e572 [new file with mode: 0644]

diff --git a/4c/be6517d55d44c60377fb5e527d9cbe63e2e572 b/4c/be6517d55d44c60377fb5e527d9cbe63e2e572
new file mode 100644 (file)
index 0000000..da17091
--- /dev/null
@@ -0,0 +1,77 @@
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id C09E46DE0C51\r
+ for <notmuch@notmuchmail.org>; Wed,  2 Sep 2015 07:36:21 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.231\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.231 tagged_above=-999 required=5 tests=[AWL=0.771, \r
+ RP_MATCHES_RCVD=-0.55, T_HEADER_FROM_DIFFERENT_DOMAINS=0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id Ki9htq1k9ZW1 for <notmuch@notmuchmail.org>;\r
+ Wed,  2 Sep 2015 07:36:20 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 1ED5D6DE0C3F\r
+ for <notmuch@notmuchmail.org>; Wed,  2 Sep 2015 07:36:16 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 82017100340; Wed,  2 Sep 2015 17:34:46 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/4] emacs: add function notmuch-address--message-insinuated\r
+Date: Wed,  2 Sep 2015 17:34:40 +0300\r
+Message-Id: <1441204482-26509-2-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 2.0.0\r
+In-Reply-To: <1441204482-26509-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1441204482-26509-1-git-send-email-tomi.ollila@iki.fi>\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 02 Sep 2015 14:36:21 -0000\r
+\r
+This function is currently used in notmuch-address-message-insinuate\r
+(to not enable address completion if it is already enabled). In near future\r
+this will be called in other functions to know whether address completion\r
+can be used there, too.\r
+---\r
+\r
+Since id:1440619626-18768-1-git-send-email-tomi.ollila@iki.fi\r
+  - changed defsubst to defun\r
+\r
+ emacs/notmuch-address.el | 5 ++++-\r
+ 1 file changed, 4 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el\r
+index fde3c1b2b861..8982a415ce11 100644\r
+--- a/emacs/notmuch-address.el\r
++++ b/emacs/notmuch-address.el\r
+@@ -54,8 +54,11 @@ (defvar notmuch-address-message-alist-member\r
\r
+ (defvar notmuch-address-history nil)\r
\r
++(defun notmuch-address--message-insinuated ()\r
++  (memq notmuch-address-message-alist-member message-completion-alist))\r
++\r
+ (defun notmuch-address-message-insinuate ()\r
+-  (unless (memq notmuch-address-message-alist-member message-completion-alist)\r
++  (unless (notmuch-address--message-insinuated)\r
+     (setq message-completion-alist\r
+         (push notmuch-address-message-alist-member message-completion-alist))))\r
\r
+-- \r
+2.0.0\r
+\r