unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Cc: tomi.ollila@iki.fi
Subject: [PATCH 2/4] emacs: add function notmuch-address--message-insinuated
Date: Wed,  2 Sep 2015 17:34:40 +0300	[thread overview]
Message-ID: <1441204482-26509-2-git-send-email-tomi.ollila@iki.fi> (raw)
In-Reply-To: <1441204482-26509-1-git-send-email-tomi.ollila@iki.fi>

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

  reply	other threads:[~2015-09-02 14:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02 14:34 [PATCH 1/4] emacs: notmuch-show-view-raw-message clears buffer, makes it read-only Tomi Ollila
2015-09-02 14:34 ` Tomi Ollila [this message]
2015-09-02 14:34 ` [PATCH 3/4] emacs: add function to resend message to new recipients Tomi Ollila
2015-10-28  8:00   ` Mark Walters
2015-09-02 14:34 ` [PATCH 4/4] emacs: bind notmuch-show-resend-message to 'b' in notmuch-show mode Tomi Ollila
2015-11-23 12:55 ` [PATCH 1/4] emacs: notmuch-show-view-raw-message clears buffer, makes it read-only David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441204482-26509-2-git-send-email-tomi.ollila@iki.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).