[PATCH 1/2] emacs: add defsubst notmuch-address--message-insinuated
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 26 Aug 2015 20:07:05 +0000 (23:07 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:25 +0000 (14:49 -0700)
3e/9d8d1a106c4fcca4846188a19486343fba6e54 [new file with mode: 0644]

diff --git a/3e/9d8d1a106c4fcca4846188a19486343fba6e54 b/3e/9d8d1a106c4fcca4846188a19486343fba6e54
new file mode 100644 (file)
index 0000000..4f12ef1
--- /dev/null
@@ -0,0 +1,75 @@
+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 114426DE0275\r
+ for <notmuch@notmuchmail.org>; Wed, 26 Aug 2015 13:08:42 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.254\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.254 tagged_above=-999 required=5 tests=[AWL=0.794, \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 vFR85zXaCA0f for <notmuch@notmuchmail.org>;\r
+ Wed, 26 Aug 2015 13:08:39 -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 D7BD56DE0140\r
+ for <notmuch@notmuchmail.org>; Wed, 26 Aug 2015 13:08:38 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 101FB1000E6; Wed, 26 Aug 2015 23:07:08 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] emacs: add defsubst notmuch-address--message-insinuated\r
+Date: Wed, 26 Aug 2015 23:07:05 +0300\r
+Message-Id: <1440619626-18768-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 2.0.0\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, 26 Aug 2015 20:08:42 -0000\r
+\r
+This "inline function" is currently used in\r
+notmuch-address-message-insinuate (to not enable address completion if\r
+it is already enabled). In some functions later this will be called\r
+to know whether address completion can be used there, too.\r
+---\r
+\r
+Previous version of this 2-patch series is at\r
+id:1423229911-14784-1-git-send-email-too@guru.guru-group.fi\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..6c93b2a7a820 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
++(defsubst 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