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