[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 9711c8c2b4: * lisp/repeat.el (describe-repeat-maps): More outline
From: |
Juri Linkov |
Subject: |
master 9711c8c2b4: * lisp/repeat.el (describe-repeat-maps): More outlines and page separators. |
Date: |
Fri, 18 Nov 2022 02:20:08 -0500 (EST) |
branch: master
commit 9711c8c2b4f051ff33b0493f6cc6551c8621dfc9
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
* lisp/repeat.el (describe-repeat-maps): More outlines and page separators.
---
lisp/repeat.el | 47 +++++++++++++++++++++++++----------------------
1 file changed, 25 insertions(+), 22 deletions(-)
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 6b2977205f..33e8d98ce3 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -582,13 +582,15 @@ Used in `repeat-mode'."
(push s (alist-get (get s 'repeat-map) keymaps)))))
(with-help-window (help-buffer)
(with-current-buffer standard-output
- (insert "A list of keymaps used by commands with the symbol property
`repeat-map'.\n\n")
+ (insert "A list of keymaps used by commands with the symbol property
`repeat-map'.\n")
(dolist (keymap (sort keymaps (lambda (a b)
(when (and (symbolp (car a))
(symbolp (car b)))
- (string-lessp (car a) (car b))))))
- (insert (format-message "* `%s'\n" (car keymap)))
+ (string< (car a) (car b))))))
+ (insert (format-message "\f\n* `%s'\n" (car keymap)))
+ (when (symbolp (car keymap))
+ (insert (substitute-command-keys (format-message "\\{%s}" (car
keymap)))))
(let* ((map (if (symbolp (car keymap))
(symbol-value (car keymap))
@@ -603,33 +605,34 @@ Used in `repeat-mode'."
(setq commands-exit (seq-difference map-commands
repeat-commands))
(when (or commands-enter commands-exit)
- (insert "\n")
(when commands-enter
+ (insert "\n** Entered with:\n\n")
(fill-region-as-paragraph
(point)
(progn
- (insert (concat "Entered with: "
- (mapconcat (lambda (cmd)
- (format-message "`%s'" cmd))
- (sort commands-enter #'string<)
- ", ")
- "\n"))
- (point))))
+ (insert (mapconcat (lambda (cmd)
+ (format-message "`%s'" cmd))
+ (sort commands-enter #'string<)
+ ", "))
+ (point)))
+ (insert "\n"))
(when commands-exit
+ (insert "\n** Exited with:\n\n")
(fill-region-as-paragraph
(point)
(progn
- (insert (concat "Exited with: "
- (mapconcat (lambda (cmd)
- (format-message "`%s'" cmd))
- (sort commands-exit #'string<)
- ", ")
- "\n"))
- (point))))))
-
- (when (symbolp (car keymap))
- (insert (substitute-command-keys (format-message "\\{%s}" (car
keymap)))))
- (insert "\n")))))))
+ (insert (mapconcat (lambda (cmd)
+ (format-message "`%s'" cmd))
+ (sort commands-exit #'string<)
+ ", "))
+ (point)))
+ (insert "\n")))))
+
+ ;; Hide ^Ls.
+ (goto-char (point-min))
+ (while (search-forward "\n\f\n" nil t)
+ (put-text-property (1+ (match-beginning 0)) (1- (match-end 0))
+ 'invisible t)))))))
(provide 'repeat)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 9711c8c2b4: * lisp/repeat.el (describe-repeat-maps): More outlines and page separators.,
Juri Linkov <=