Rename describe-map-tree to help--describe-map-tree

This function should have been made internal in the first place.
* lisp/help.el (help--describe-map-tree): Rename from
'describe-map-tree'.  Keep old name as an obsolete alias, and update
all callers.
This commit is contained in:
Stefan Kangas 2023-09-17 22:56:00 +02:00
parent ae983e9283
commit f3a50f6dd8
3 changed files with 28 additions and 26 deletions

View file

@ -1468,7 +1468,7 @@ Otherwise, return a new string."
;; in case it is a local variable.
(with-current-buffer orig-buf
;; This is for computing the SHADOWS arg for
;; describe-map-tree.
;; help--describe-map-tree.
(setq active-maps (current-active-maps))
(when (boundp name)
(setq this-keymap (and (keymapp (symbol-value name))
@ -1489,9 +1489,10 @@ Otherwise, return a new string."
;; If this one's not active, get nil.
(let ((earlier-maps
(cdr (memq this-keymap (reverse active-maps)))))
(describe-map-tree this-keymap t (nreverse earlier-maps)
nil nil (not include-menus)
nil nil t))))))))
(help--describe-map-tree this-keymap t
(nreverse earlier-maps)
nil nil (not include-menus)
nil nil t))))))))
;; 2. Handle quotes.
((and (eq (text-quoting-style) 'curve)
(or (and (= (following-char) ?\`)
@ -1521,9 +1522,9 @@ quote characters to use is determined by the variable
(t string)))
(defvar help--keymaps-seen nil)
(defun describe-map-tree (startmap &optional partial shadow prefix title
no-menu transl always-title mention-shadow
buffer)
(defun help--describe-map-tree (startmap &optional partial shadow prefix title
no-menu transl always-title mention-shadow
buffer)
"Insert a description of the key bindings in STARTMAP.
This is followed by the key bindings of all maps reachable
through STARTMAP.
@ -1677,7 +1678,7 @@ Assume that this keymap itself is reached by the sequence of
prefix keys PREFIX (a string or vector).
TRANSL, PARTIAL, SHADOW, NOMENU, MENTION-SHADOW and BUFFER are as
in `describe-map-tree'."
in `help--describe-map-tree'."
;; Converted from describe_map in keymap.c.
(let* ((map (keymap-canonicalize map))
(tail map)
@ -2452,6 +2453,7 @@ the suggested string to use instead. See
#'help-command-error-confusable-suggestions))
(define-obsolete-function-alias 'help-for-help-internal #'help-for-help "28.1")
(define-obsolete-function-alias 'describe-map-tree #'help--describe-map-tree "30.1")
(provide 'help)

View file

@ -2885,7 +2885,7 @@ You type Translation\n\
{
Lisp_Object msg = build_unibyte_string ("Key translations");
CALLN (Ffuncall,
Qdescribe_map_tree,
Qhelp__describe_map_tree,
Vkey_translation_map, Qnil, Qnil, prefix,
msg, nomenu, Qt, Qnil, Qnil, buffer);
}
@ -2899,7 +2899,7 @@ You type Translation\n\
{
Lisp_Object msg = build_unibyte_string ("\f\nOverriding Bindings");
CALLN (Ffuncall,
Qdescribe_map_tree,
Qhelp__describe_map_tree,
start1, Qt, shadow, prefix,
msg, nomenu, Qnil, Qnil, Qnil, buffer);
shadow = Fcons (start1, shadow);
@ -2912,7 +2912,7 @@ You type Translation\n\
{
Lisp_Object msg = build_unibyte_string ("\f\nOverriding Bindings");
CALLN (Ffuncall,
Qdescribe_map_tree,
Qhelp__describe_map_tree,
start1, Qt, shadow, prefix,
msg, nomenu, Qnil, Qnil, Qnil, buffer);
shadow = Fcons (start1, shadow);
@ -2935,7 +2935,7 @@ You type Translation\n\
{
Lisp_Object msg = build_unibyte_string ("\f\n`keymap' Property Bindings");
CALLN (Ffuncall,
Qdescribe_map_tree,
Qhelp__describe_map_tree,
start1, Qt, shadow, prefix,
msg, nomenu, Qnil, Qnil, Qnil, buffer);
shadow = Fcons (start1, shadow);
@ -2946,7 +2946,7 @@ You type Translation\n\
{
/* The title for a minor mode keymap
is constructed at run time.
We let describe-map-tree do the actual insertion
We let `help--describe-map-tree' do the actual insertion
because it takes care of other features when doing so. */
char *title, *p;
@ -2968,7 +2968,7 @@ You type Translation\n\
Lisp_Object msg = build_unibyte_string (title);
CALLN (Ffuncall,
Qdescribe_map_tree,
Qhelp__describe_map_tree,
maps[i], Qt, shadow, prefix,
msg, nomenu, Qnil, Qnil, Qnil, buffer);
shadow = Fcons (maps[i], shadow);
@ -2986,7 +2986,7 @@ You type Translation\n\
build_unibyte_string ("\f\n`%s' Major Mode Bindings"),
XBUFFER (buffer)->major_mode_);
CALLN (Ffuncall,
Qdescribe_map_tree,
Qhelp__describe_map_tree,
start1, Qt, shadow, prefix,
msg, nomenu, Qnil, Qnil, Qnil, buffer);
}
@ -2994,7 +2994,7 @@ You type Translation\n\
{
Lisp_Object msg = build_unibyte_string ("\f\n`local-map' Property Bindings");
CALLN (Ffuncall,
Qdescribe_map_tree,
Qhelp__describe_map_tree,
start1, Qt, shadow, prefix,
msg, nomenu, Qnil, Qnil, Qnil, buffer);
}
@ -3005,7 +3005,7 @@ You type Translation\n\
Lisp_Object msg = build_unibyte_string ("\f\nGlobal Bindings");
CALLN (Ffuncall,
Qdescribe_map_tree,
Qhelp__describe_map_tree,
current_global_map, Qt, shadow, prefix,
msg, nomenu, Qnil, Qt, Qnil, buffer);
@ -3014,7 +3014,7 @@ You type Translation\n\
{
Lisp_Object msg = build_unibyte_string ("\f\nFunction key map translations");
CALLN (Ffuncall,
Qdescribe_map_tree,
Qhelp__describe_map_tree,
KVAR (current_kboard, Vlocal_function_key_map), Qnil, Qnil, prefix,
msg, nomenu, Qt, Qnil, Qnil, buffer);
}
@ -3024,7 +3024,7 @@ You type Translation\n\
{
Lisp_Object msg = build_unibyte_string ("\f\nInput decoding map translations");
CALLN (Ffuncall,
Qdescribe_map_tree,
Qhelp__describe_map_tree,
KVAR (current_kboard, Vinput_decode_map), Qnil, Qnil, prefix,
msg, nomenu, Qt, Qnil, Qnil, buffer);
}
@ -3341,7 +3341,7 @@ void
syms_of_keymap (void)
{
DEFSYM (Qkeymap, "keymap");
DEFSYM (Qdescribe_map_tree, "describe-map-tree");
DEFSYM (Qhelp__describe_map_tree, "help--describe-map-tree");
DEFSYM (Qkeymap_canonicalize, "keymap-canonicalize");

View file

@ -378,7 +378,7 @@ Key Binding
(foo menu-item "Foo" foo
:enable mark-active
:help "Help text"))))))
(describe-map-tree map nil nil nil nil t nil nil nil)
(help--describe-map-tree map nil nil nil nil t nil nil nil)
(should (string-match "
Key Binding
-+
@ -393,7 +393,7 @@ C-a foo\n"
(foo menu-item "Foo" foo
:enable mark-active
:help "Help text"))))))
(describe-map-tree map nil nil nil nil nil nil nil nil)
(help--describe-map-tree map nil nil nil nil nil nil nil nil)
(should (string-match "
Key Binding
-+
@ -408,7 +408,7 @@ C-a foo
(map '(keymap . ((1 . foo)
(2 . bar))))
(shadow-maps '((keymap . ((1 . baz))))))
(describe-map-tree map t shadow-maps nil nil t nil nil t)
(help--describe-map-tree map t shadow-maps nil nil t nil nil t)
(should (string-match "
Key Binding
-+
@ -423,7 +423,7 @@ C-b bar\n"
(map '(keymap . ((1 . foo)
(2 . bar))))
(shadow-maps '((keymap . ((1 . baz))))))
(describe-map-tree map t shadow-maps nil nil t nil nil nil)
(help--describe-map-tree map t shadow-maps nil nil t nil nil nil)
(should (string-match "
Key Binding
-+
@ -435,7 +435,7 @@ C-b bar\n"
(let ((standard-output (current-buffer))
(map '(keymap . ((1 . foo)
(2 . undefined)))))
(describe-map-tree map t nil nil nil nil nil nil nil)
(help--describe-map-tree map t nil nil nil nil nil nil nil)
(should (string-match "
Key Binding
-+
@ -447,7 +447,7 @@ C-a foo\n"
(let ((standard-output (current-buffer))
(map '(keymap . ((1 . foo)
(2 . undefined)))))
(describe-map-tree map nil nil nil nil nil nil nil nil)
(help--describe-map-tree map nil nil nil nil nil nil nil nil)
(should (string-match "
Key Binding
-+