--- /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 9D244429E39\r
+ for <notmuch@notmuchmail.org>; Fri, 8 Nov 2013 09:40:45 -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 F4N77WYZBefB for <notmuch@notmuchmail.org>;\r
+ Fri, 8 Nov 2013 09:40:40 -0800 (PST)\r
+Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com\r
+ [209.85.212.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 82964429E26\r
+ for <notmuch@notmuchmail.org>; Fri, 8 Nov 2013 09:40:30 -0800 (PST)\r
+Received: by mail-wi0-f171.google.com with SMTP id hn9so707778wib.16\r
+ for <notmuch@notmuchmail.org>; Fri, 08 Nov 2013 09:40:29 -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=I3pSsapdErPHsuia9nam+vrk2WYgmXiJ2CeMVTdHNew=;\r
+ b=B9U6d2zUmD2p66SIxRfLh9IAqwTMAYAg6vns9L9oXgvHe3GQgJ2kex/P8AP4+LoDea\r
+ UyaeSBw5kZynabadAwbpY2on/+8XV1+8GylvxL43qrj85aOLZrSiZPoJbiY5AotH1PrM\r
+ 3iCHHroo6jqvXwniXzGb7UHD+HkVL5NGcwLOfR7h3bk9dn525ZTxEx2tBAj+cnniQhsL\r
+ 8/0HLgxCGkNcFzs8atFEVlAo//rvbAd85090go7y+xrTC+qXwkfi8GmImyUJaCE2C+X0\r
+ OlmsdrnypLniiFJB4au++/JH0d7yVXR3LwM8lRjOgylNznUID10lGDnb0YEMazzNGVIx\r
+ eY1w==\r
+X-Received: by 10.180.198.79 with SMTP id ja15mr3284404wic.36.1383932429505;\r
+ Fri, 08 Nov 2013 09:40:29 -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 ey4sm7504302wic.11.2013.11.08.09.40.28\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Fri, 08 Nov 2013 09:40:29 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 4/7] emacs: help: add base-keymap\r
+Date: Fri, 8 Nov 2013 17:40:16 +0000\r
+Message-Id: <1383932419-12533-5-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <1383932419-12533-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1383932419-12533-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: Fri, 08 Nov 2013 17:40:46 -0000\r
+\r
+To support key remapping in emacs help we need to know the base keymap\r
+when looking at the remapping. keep track of this while we recurse\r
+down the sub-keymaps in help.\r
+---\r
+ emacs/notmuch-lib.el | 6 +++---\r
+ 1 files changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el\r
+index 8852703..a4f481b 100644\r
+--- a/emacs/notmuch-lib.el\r
++++ b/emacs/notmuch-lib.el\r
+@@ -261,7 +261,7 @@ It does not prepend if ACTUAL-KEY is already listed in TAIL."\r
+ tail)))\r
+ tail)\r
+ \r
+-(defun notmuch-describe-keymap (keymap ua-keys &optional prefix tail)\r
++(defun notmuch-describe-keymap (keymap ua-keys base-keymap &optional prefix tail)\r
+ "Return a list of cons cells, each describing one binding in KEYMAP.\r
+ \r
+ Each cons cell consists of a string giving a human-readable\r
+@@ -278,7 +278,7 @@ prefix argument. PREFIX and TAIL are used internally."\r
+ ((keymapp binding)\r
+ (setq tail\r
+ (notmuch-describe-keymap\r
+- binding ua-keys (notmuch-prefix-key-description key) tail)))\r
++ binding ua-keys base-keymap (notmuch-prefix-key-description key) tail)))\r
+ (binding\r
+ (setq tail (notmuch-describe-key (vector key) binding prefix ua-keys tail)))))\r
+ keymap)\r
+@@ -291,7 +291,7 @@ prefix argument. PREFIX and TAIL are used internally."\r
+ (let* ((keymap-name (substring doc (match-beginning 1) (match-end 1)))\r
+ (keymap (symbol-value (intern keymap-name)))\r
+ (ua-keys (where-is-internal 'universal-argument keymap t))\r
+- (desc-alist (notmuch-describe-keymap keymap ua-keys))\r
++ (desc-alist (notmuch-describe-keymap keymap ua-keys keymap))\r
+ (desc-list (mapcar (lambda (arg) (concat (car arg) "\t" (cdr arg))) desc-alist))\r
+ (desc (mapconcat #'identity desc-list "\n")))\r
+ (setq doc (replace-match desc 1 1 doc)))\r
+-- \r
+1.7.9.1\r
+\r