summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2020-11-01 15:27:17 +0100
committerStefan Kangas <stefan@marxist.se>2020-11-01 15:53:43 +0100
commitce1856ec09dd312667d8f7cf9ffc908b473d27b8 (patch)
tree8eaa8b3b9aa68f910bdbdd4c77eb76aeda1bf71c /lisp
parent5ce37da355a27ed281230e23d9b501d75e222ac7 (diff)
downloademacs-ce1856ec09dd312667d8f7cf9ffc908b473d27b8.tar.gz
emacs-ce1856ec09dd312667d8f7cf9ffc908b473d27b8.tar.bz2
emacs-ce1856ec09dd312667d8f7cf9ffc908b473d27b8.zip
Insert describe-map-tree header into original buffer
* lisp/help.el (describe-map-tree): Insert header into the original buffer, not in standard-output. * test/src/keymap-tests.el (describe-buffer-bindings/header-in-current-buffer) (describe-buffer-bindings/returns-nil): New tests. Ref: https://debbugs.gnu.org/39149#31
Diffstat (limited to 'lisp')
-rw-r--r--lisp/help.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 6ae2664cf41..795f7e74d8b 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1169,14 +1169,14 @@ Any inserted text ends in two newlines (used by
(print-title (or maps always-title)))
;; Print title.
(when print-title
- (princ (concat (if title
- (concat title
- (if prefix
- (concat " Starting With "
- (key-description prefix)))
- ":\n"))
- "key binding\n"
- "--- -------\n")))
+ (insert (concat (if title
+ (concat title
+ (if prefix
+ (concat " Starting With "
+ (key-description prefix)))
+ ":\n"))
+ "key binding\n"
+ "--- -------\n")))
;; Describe key bindings.
(setq help--keymaps-seen nil)
(while (consp maps)
@@ -1202,7 +1202,7 @@ Any inserted text ends in two newlines (used by
sub-shadows no-menu mention-shadow)))
(setq maps (cdr maps)))
(when print-title
- (princ "\n"))))
+ (insert "\n"))))
(defun help--shadow-lookup (keymap key accept-default remap)
"Like `lookup-key', but with command remapping.