From: Mark Walters Date: Fri, 8 Nov 2013 17:40:19 +0000 (+0000) Subject: [PATCH v3 7/7] emacs: help: base-keymap-test-help X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c2b7b77ae435e0fc93f7148bc1575cf18533b488;p=notmuch-archives.git [PATCH v3 7/7] emacs: help: base-keymap-test-help --- diff --git a/a4/c4fd34655134cc7863d4c5fe2a52f6ac2f840b b/a4/c4fd34655134cc7863d4c5fe2a52f6ac2f840b new file mode 100644 index 000000000..8a1cbacc9 --- /dev/null +++ b/a4/c4fd34655134cc7863d4c5fe2a52f6ac2f840b @@ -0,0 +1,96 @@ +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 AE8CD421163 + for ; Fri, 8 Nov 2013 09:41:03 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=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 NX4ZiJK0g9gI for ; + Fri, 8 Nov 2013 09:40:57 -0800 (PST) +Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com + [209.85.212.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 0E41A429E43 + for ; Fri, 8 Nov 2013 09:40:35 -0800 (PST) +Received: by mail-wi0-f173.google.com with SMTP id ey11so2523902wid.12 + for ; Fri, 08 Nov 2013 09:40:35 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:in-reply-to:references; + bh=TPO5uoISxoKmkXwOqEpM1jY+kSFomHAPJjUEKk6wQkU=; + b=p4mz+t3uX5SM+F9JRykzbQacsrmRdJdbN8WaPGDpZVowywj0lORRIXk7iG2UDUvY+J + 4U1b4tLjfaFO57tZLLPMDvwr2SF3r4tfY1pg+uW6um3/MIWJA6hhBX+7aaBEqTBa2r7q + OnpfIztMSsblrBAa7xBGCqxpnDe4MOD2dyRnsMim29mXqZTmKD3krmBcK0qHHtACOAzd + KPyfYl0WFUWYlFzmoG0s1jhJbgPDoKVPfUkiSfeOdVxzCt7h3OHSCwNkBboV+J1bugQS + cPFgpuaQUr2FnnUvx3Kx/84wrcIHKa7pAKa7tS9qfQ1V7JpEpD2VURebcHzb1iK0aE0c + L6BA== +X-Received: by 10.180.12.111 with SMTP id x15mr3382985wib.0.1383932434992; + Fri, 08 Nov 2013 09:40:34 -0800 (PST) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id + bs15sm7508578wib.10.2013.11.08.09.40.34 for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Fri, 08 Nov 2013 09:40:34 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v3 7/7] emacs: help: base-keymap-test-help +Date: Fri, 8 Nov 2013 17:40:19 +0000 +Message-Id: <1383932419-12533-8-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1383932419-12533-1-git-send-email-markwalters1009@gmail.com> +References: <1383932419-12533-1-git-send-email-markwalters1009@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: Fri, 08 Nov 2013 17:41:04 -0000 + +Add an argument to notmuch-help for the mode to display help for. +This aids testing of the base-keymap case in remapping in emacs help. + +It is only intended for testing, ie not for master (but it does no harm) +--- + emacs/notmuch-lib.el | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el +index 4b3a86e..7b8acb3 100644 +--- a/emacs/notmuch-lib.el ++++ b/emacs/notmuch-lib.el +@@ -316,7 +316,7 @@ prefix argument. PREFIX and TAIL are used internally." + (setq beg (match-end 0))) + doc)) + +-(defun notmuch-help () ++(defun notmuch-help (&optional mode) + "Display help for the current notmuch mode. + + This is similar to `describe-function' for the current major +@@ -328,7 +328,7 @@ A command that supports a prefix argument can explicitly document + its prefixed behavior by setting the 'notmuch-prefix-doc property + of its command symbol." + (interactive) +- (let* ((mode major-mode) ++ (let* ((mode (or mode major-mode)) + (doc (substitute-command-keys (notmuch-substitute-command-keys (documentation mode t))))) + (with-current-buffer (generate-new-buffer "*notmuch-help*") + (insert doc) +-- +1.7.9.1 +