emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 686d85c: Include the major mode name in the `C-h b' output


From: Lars Ingebrigtsen
Subject: master 686d85c: Include the major mode name in the `C-h b' output
Date: Sun, 31 Oct 2021 20:44:14 -0400 (EDT)

branch: master
commit 686d85c767d7c14d0cc6351701396cd71da37630
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Include the major mode name in the `C-h b' output
    
    * lisp/calc/calc-help.el (calc-describe-bindings): Don't add the
    name since it's there now.
    
    * src/keymap.c (Fdescribe_buffer_bindings): Include the major mode
    name for symmetry with the minor modes (and because it's easy to
    forget).
---
 lisp/calc/calc-help.el | 3 ---
 src/keymap.c           | 5 ++++-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index dd5063f..8481d0b 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -111,9 +111,6 @@ C-w  Describe how there is no warranty for Calc."
   (with-current-buffer "*Help*"
     (let ((inhibit-read-only t))
       (goto-char (point-min))
-      (when (search-forward "Major Mode Bindings:" nil t)
-        (delete-region (point-min) (point))
-        (insert "Calc Mode Bindings:"))
       (when (search-forward "Global bindings:" nil t)
         (forward-line -1)
         (delete-region (point) (point-max)))
diff --git a/src/keymap.c b/src/keymap.c
index 08f37db..29d2ca7 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2933,7 +2933,10 @@ You type        Translation\n\
        {
          if (EQ (start1, BVAR (XBUFFER (buffer), keymap)))
            {
-             Lisp_Object msg = build_unibyte_string ("\f\nMajor Mode 
Bindings");
+             Lisp_Object msg =
+               CALLN (Fformat,
+                      build_unibyte_string ("\f\n`%s' Major Mode Bindings"),
+                      XBUFFER (buffer)->major_mode_);
              CALLN (Ffuncall,
                     Qdescribe_map_tree,
                     start1, Qt, shadow, prefix,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]