Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E0314431FD0 for ; Mon, 8 Aug 2011 03:29:46 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7eMYoNpmw2Er for ; Mon, 8 Aug 2011 03:29:46 -0700 (PDT) Received: from bureau.koumbit.net (homere.koumbit.net [209.44.112.81]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 4DC70431FB6 for ; Mon, 8 Aug 2011 03:29:46 -0700 (PDT) Received: from localhost (g225081052.adsl.alicedsl.de [92.225.81.52]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by bureau.koumbit.net (Postfix) with ESMTPSA id 209D3E80D11; Mon, 8 Aug 2011 06:27:10 -0400 (EDT) Received: by localhost (Postfix, from userid 1000) id EF0F36370; Mon, 8 Aug 2011 12:27:08 +0200 (CEST) From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= To: notmuch@notmuchmail.org Subject: [PATCH] run notmuch-hello-mode-hook at the end of the hello mode setup Date: Mon, 8 Aug 2011 12:26:58 +0200 Message-Id: <1312799218-10243-1-git-send-email-anarcat@koumbit.org> X-Mailer: git-send-email 1.7.2.5 Cc: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Mon, 08 Aug 2011 10:29:47 -0000 i mostly use this to start offlineimap.el, but it could be used for other purposes. i have not added hooks to other modes, but those could be interesting as well. i am unsure as to how to make unit tests for this. --- emacs/notmuch-hello.el | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 65fde75..6389ac8 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -118,6 +118,11 @@ Typically \",\" in the US and UK and \".\" in Europe." :group 'notmuch :type 'string) +(defcustom notmuch-hello-mode-hook nil + "Hook run at the end of `notmuch-hello-mode'." + :group 'notmuch + :type 'hook) + (defvar notmuch-hello-url "http://notmuchmail.org" "The `notmuch' web site.") @@ -336,6 +341,7 @@ Complete list of currently available key bindings: (setq major-mode 'notmuch-hello-mode mode-name "notmuch-hello") ;;(setq buffer-read-only t) + (run-mode-hooks 'notmuch-hello-mode 'notmuch-hello-mode-hook) ) (defun notmuch-hello-generate-tag-alist () -- 1.7.2.5