]> git.eshelyaron.com Git - emacs.git/commitdiff
Make `C-h b' work correctly in Gnus article buffer (bug#18257)
authorKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 26 Jan 2017 22:43:31 +0000 (22:43 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 26 Jan 2017 22:43:31 +0000 (22:43 +0000)
* lisp/gnus/gnus-art.el (gnus-article-describe-bindings):
Ignore summary commands that aren't bound to
gnus-article-read-summary-keys keys (bug#18257).

lisp/gnus/gnus-art.el

index a0f14402fbf11483515ce9c770cfe4a69df025bc..43e1231914c8a24e7963cacf5724bd80fc61259e 100644 (file)
@@ -6846,17 +6846,21 @@ then we display only bindings that start with that prefix."
   (let ((keymap (copy-keymap gnus-article-mode-map))
        (map (copy-keymap gnus-article-send-map))
        (sumkeys (where-is-internal 'gnus-article-read-summary-keys))
+       (summap (make-sparse-keymap))
        parent agent draft)
     (define-key keymap "S" map)
     (define-key map [t] nil)
+    (define-key summap [t] 'undefined)
     (with-current-buffer gnus-article-current-summary
+      (dolist (key sumkeys)
+       (define-key summap key (key-binding key (current-local-map))))
       (set-keymap-parent
        keymap
        (if (setq parent (keymap-parent gnus-article-mode-map))
           (prog1
               (setq parent (copy-keymap parent))
-            (set-keymap-parent parent (current-local-map)))
-        (current-local-map)))
+            (set-keymap-parent parent summap))
+        summap))
       (set-keymap-parent map (key-binding "S"))
       (let (key def gnus-pick-mode)
        (while sumkeys