[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f3a50f6dd84: Rename describe-map-tree to help--describe-map-tree
From: |
Stefan Kangas |
Subject: |
master f3a50f6dd84: Rename describe-map-tree to help--describe-map-tree |
Date: |
Sun, 17 Sep 2023 16:56:14 -0400 (EDT) |
branch: master
commit f3a50f6dd84aa4644a167c7b7a2dcde5144e2e5f
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
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.
---
lisp/help.el | 18 ++++++++++--------
src/keymap.c | 24 ++++++++++++------------
test/lisp/help-tests.el | 12 ++++++------
3 files changed, 28 insertions(+), 26 deletions(-)
diff --git a/lisp/help.el b/lisp/help.el
index a012086a687..3a641ccc1be 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -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)
diff --git a/src/keymap.c b/src/keymap.c
index 1f863885003..d710bae02e0 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -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");
diff --git a/test/lisp/help-tests.el b/test/lisp/help-tests.el
index 6c440f9e238..b0b487ab169 100644
--- a/test/lisp/help-tests.el
+++ b/test/lisp/help-tests.el
@@ -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
-+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f3a50f6dd84: Rename describe-map-tree to help--describe-map-tree,
Stefan Kangas <=