]> git.eshelyaron.com Git - emacs.git/commitdiff
Include the major mode name in the `C-h b' output
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 1 Nov 2021 00:44:01 +0000 (01:44 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 1 Nov 2021 00:44:01 +0000 (01:44 +0100)
* 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
src/keymap.c

index dd5063f27d574ff12735c4deb9610d72a4b7be73..8481d0b5e9da24d136df0dc09a2f74f1ce8bfefd 100644 (file)
@@ -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)))
index 08f37dbd8b50c20b2f438dee3868b764d7e5e7e7..29d2ca7ab7e3c08f24e61b66319742982de6b1f2 100644 (file)
@@ -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,