[DRAFT PATCH] emacs: describe-prefix-bindings...

Subject: [DRAFT PATCH] emacs: describe-prefix-bindings...

Date: Fri, 23 Aug 2013 19:36:23 +0300

To: notmuch@notmuchmail.org

Cc: tomi.ollila@iki.fi

From: Tomi Ollila


---

I plan to do `notmuch--describe-prefix-bindings' if there is support
for this functionality (or no better solution exists -- I recall
there is specific C functionality doing C-h handling...)


 emacs/notmuch-show.el | 2 ++
 emacs/notmuch.el      | 1 +
 2 files changed, 3 insertions(+)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 82b70ba..6fd1f73 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1248,6 +1248,7 @@ reset based on the original query."
     (define-key map "t" 'notmuch-show-stash-to)
     (define-key map "l" 'notmuch-show-stash-mlarchive-link)
     (define-key map "L" 'notmuch-show-stash-mlarchive-link-and-go)
+    (define-key map "?" (lambda () (interactive) (describe-prefix-bindings)))
     map)
   "Submap for stash commands")
 (fset 'notmuch-show-stash-map notmuch-show-stash-map)
@@ -1258,6 +1259,7 @@ reset based on the original query."
     (define-key map "v" 'notmuch-show-view-part)
     (define-key map "o" 'notmuch-show-interactively-view-part)
     (define-key map "|" 'notmuch-show-pipe-part)
+    (define-key map "?" (lambda () (interactive) (describe-prefix-bindings)))
     map)
   "Submap for part commands")
 (fset 'notmuch-show-part-map notmuch-show-part-map)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index f3ce840..ac6a712 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -245,6 +245,7 @@ For a mouse binding, return nil."
 (defvar notmuch-search-stash-map
   (let ((map (make-sparse-keymap)))
     (define-key map "i" 'notmuch-search-stash-thread-id)
+    (define-key map "?" (lambda () (interactive) (describe-prefix-bindings)))
     map)
   "Submap for stash commands")
 (fset 'notmuch-search-stash-map notmuch-search-stash-map)
-- 
1.8.0

Thread: