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 03E84429E25 for ; Sat, 17 Dec 2011 12:17:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 3yz1l+m5z5oT for ; Sat, 17 Dec 2011 12:17:54 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6BF05431FB6 for ; Sat, 17 Dec 2011 12:17:54 -0800 (PST) Received: by mail-ww0-f45.google.com with SMTP id ds13so6782244wgb.2 for ; Sat, 17 Dec 2011 12:17:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=kAfaFXBGmQvo7DhqZz4e2QpcrTfWPLTo19/vxnpDuFM=; b=YMuWonBOc8DCUWQYAUx6/sAnc+4+g38emYTWJXp4M3ZpttKIEUoRrrt2KwmWvjW5s9 HQNH/HESEB0GOYb8lTuzV7CTNsGiJBELBgZHV5yqa9PMV0Cnqcf7lqSsOLOIfuUI9pod ZTpXNaj18WfZH6r9nEABzfUFp6XQdQzHr+Us0= Received: by 10.227.199.14 with SMTP id eq14mr10414287wbb.14.1324153074149; Sat, 17 Dec 2011 12:17:54 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id gd6sm19492904wbb.1.2011.12.17.12.17.53 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 17 Dec 2011 12:17:53 -0800 (PST) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: [PATCH v2 1/4] test: add `notmuch-hello-mode-hook-counter' Date: Sun, 18 Dec 2011 00:16:57 +0400 Message-Id: <1324153020-24500-2-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1324153020-24500-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1324095619-10870-1-git-send-email-dmitry.kurochkin@gmail.com> <1324153020-24500-1-git-send-email-dmitry.kurochkin@gmail.com> 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: Sat, 17 Dec 2011 20:17:55 -0000 Add `notmuch-hello-mode-hook-counter' hook to count how many times `notmuch-hello-mode-hook' was called. The counter function increments `notmuch-hello-mode-hook-counter' variable value if it is bount, otherwise it does nothing. --- test/test-lib.el | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/test/test-lib.el b/test/test-lib.el index 97ae593..3bca138 100644 --- a/test/test-lib.el +++ b/test/test-lib.el @@ -61,3 +61,12 @@ running, quit if it terminated." (if (not (process-attributes pid)) (kill-emacs) (run-at-time "1 min" nil 'orphan-watchdog pid))) + +(defun notmuch-hello-mode-hook-counter () + "Count how many times `notmuch-hello-mode-hook' is called. +Increments `notmuch-hello-mode-hook-counter' variable value if it +is bound, otherwise does nothing." + (if (boundp 'notmuch-hello-mode-hook-counter) + (setq notmuch-hello-mode-hook-counter + (1+ notmuch-hello-mode-hook-counter)))) +(add-hook 'notmuch-hello-mode-hook 'notmuch-hello-mode-hook-counter) -- 1.7.7.3