I'm trying to build a keyboard menu keymap on the fly, and then
invoke it. I've gotten this far:
(defun dvc-offer-choices (comment choices)
"Present user with a choice of actions, labeled by
COMMENT. CHOICES is a list of pairs
containing (function description)."
;; Build a keyboard menu keymap (let ((i 0)
(map (make-sparse-keymap "actions")) choice)
(unless (< (length choices) 10)
(error "‘dvc-offer-choices’ only supports up to 10
choices"))
(while choices
(setq choice (pop choices)) (define-key map (int-to-string
i)
(list menu-item (format "%d) %s" i (cadr choice)) (car
choice))))
;; FIXME: invoke the map ))
But I can't find the function that executes the keymap.