unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH v3 7/7] emacs: help: base-keymap-test-help
Date: Fri,  8 Nov 2013 17:40:19 +0000	[thread overview]
Message-ID: <1383932419-12533-8-git-send-email-markwalters1009@gmail.com> (raw)
In-Reply-To: <1383932419-12533-1-git-send-email-markwalters1009@gmail.com>

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

  parent reply	other threads:[~2013-11-08 17:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08 17:40 [PATCH v3 0/7] emacs: help: remap keybindings Mark Walters
2013-11-08 17:40 ` [PATCH v3 1/7] emacs: help: check for nil key binding Mark Walters
2013-11-08 17:40 ` [PATCH v3 2/7] emacs: help: remove duplicate bindings Mark Walters
2013-11-08 17:40 ` [PATCH v3 3/7] emacs: help: split out notmuch-describe-key as a function Mark Walters
2013-11-08 17:40 ` [PATCH v3 4/7] emacs: help: add base-keymap Mark Walters
2013-11-08 17:40 ` [PATCH v3 5/7] emacs: help: add a special function to deal with remaps Mark Walters
2013-11-08 17:40 ` [PATCH v3 6/7] emacs: tree: use remap for the over-ridden global bindings Mark Walters
2013-11-08 17:40 ` Mark Walters [this message]
2013-11-08 20:00 ` [PATCH v3 0/7] emacs: help: remap keybindings Austin Clements
2013-11-10  9:44 ` [PATCH] emacs: help: bugfix Mark Walters
2013-11-10 11:53   ` David Bremner
2013-11-12 18:47   ` Austin Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383932419-12533-8-git-send-email-markwalters1009@gmail.com \
    --to=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).