;; First collect all the printed representations of menus.
(dolist (menu menus)
(let ((map (lookup-key global-map (seq-take menu 1)))
- (string nil))
+ (string nil)
+ (sep (if (char-displayable-p ?→) " → " " => ")))
(seq-do-indexed
(lambda (entry level)
(when (symbolp map)
(setq map (symbol-function map)))
(when-let ((elem (assq entry (cdr map))))
(when (> level 0)
- (push (if (char-displayable-p ?→)
- " → "
- " => ")
- string))
+ (push sep string))
(if (eq (nth 1 elem) 'menu-item)
(progn
- (push (nth 2 elem) string)
+ (push (propertize (nth 2 elem) 'face 'help-key-binding)
+ string)
(setq map (cadddr elem)))
- (push (nth 1 elem) string)
+ (push (propertize (nth 1 elem) 'face 'help-key-binding)
+ string)
(setq map (cddr elem)))))
(cdr (seq-into menu 'list)))
(when string
(cond ((zerop i) "")
((= i (1- (length menus))) " and ")
(t ", "))
- (propertize (string-join (nreverse string))
- 'face 'help-key-binding)))
+ (string-join (nreverse string))))
strings))))
(defun help-fns--compiler-macro (function)