--- /dev/null
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 84747431FDD\r
+ for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:18:39 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+ RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id ZNRluIwa++h3 for <notmuch@notmuchmail.org>;\r
+ Tue, 12 Nov 2013 12:18:33 -0800 (PST)\r
+Received: from mail-we0-f178.google.com (mail-we0-f178.google.com\r
+ [74.125.82.178]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 76225431FD7\r
+ for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:18:27 -0800 (PST)\r
+Received: by mail-we0-f178.google.com with SMTP id q59so6441249wes.23\r
+ for <notmuch@notmuchmail.org>; Tue, 12 Nov 2013 12:18:26 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+ bh=EEaRINw2MVLK36utIg3+Ia+wlP+1H7ZftlNwpDE6GiI=;\r
+ b=x90D4ctHQDf+6ukXsxGtI8EMo9s2Lg2po2zBbjF8IxNdA4DiAmTKFiG3siF8woIWvs\r
+ WeS/h4Xz8zqbdo/hz7e7ZyMCHdnIULTyrHTnmdpzpCCh9R+f9UTBC5iA1AUWnkLysiwk\r
+ WKaP2NIexn2+5OTwTUqNpH2ifoxZMkWbIyE0C3c3I6fC7Oh7/1C/AF/GCHbeOodjde8O\r
+ VmddwV3PFXCsbkApYdMbPkfDBury/4+cHpeqtmfw6waMG7dtcFnRafBtrxFTA5VyEDst\r
+ lz6k2LCnAmw050Y7Ro4PMu3rCczkFI/9K4nK55yuReCMdWPX0eGoMIK+vsOZ96RuK8b7\r
+ IzgQ==\r
+X-Received: by 10.180.221.38 with SMTP id qb6mr17564225wic.8.1384287066631;\r
+ Tue, 12 Nov 2013 12:11:06 -0800 (PST)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+ by mx.google.com with ESMTPSA id\r
+ qc10sm48003147wic.9.2013.11.12.12.11.05 for <multiple recipients>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Tue, 12 Nov 2013 12:11:06 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 1/7] emacs: help: check for nil key binding\r
+Date: Tue, 12 Nov 2013 20:10:53 +0000\r
+Message-Id: <1384287059-3525-2-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1384287059-3525-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1384287059-3525-1-git-send-email-markwalters1009@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\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: Tue, 12 Nov 2013 20:18:39 -0000\r
+\r
+A standard way to unset a key binding is local-unset-key which is equivalent to\r
+ (define-key (current-local-map) key nil)\r
+\r
+Currently notmuch-help gives an error and fails if a user has done this.\r
+\r
+To fix this we only add a help line if the binding is non-nil.\r
+---\r
+ emacs/notmuch-lib.el | 2 +-\r
+ 1 files changed, 1 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+index 08a86fd..5e734b3 100644\r
+--- a/emacs/notmuch-lib.el\r
++++ b/emacs/notmuch-lib.el\r
+@@ -254,7 +254,7 @@ prefix argument. PREFIX and TAIL are used internally."\r
+ (setq tail\r
+ (notmuch-describe-keymap\r
+ binding ua-keys (notmuch-prefix-key-description key) tail)))\r
+- (t\r
++ (binding\r
+ (when (and ua-keys (symbolp binding)\r
+ (get binding 'notmuch-prefix-doc))\r
+ ;; Documentation for prefixed command\r
+-- \r
+1.7.9.1\r
+\r