emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: invoke a keyboard menu map from lisp?


From: Alexis
Subject: Re: invoke a keyboard menu map from lisp?
Date: Thu, 27 Aug 2015 12:21:12 +1000


Stephen Leake <address@hidden> writes:

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.

Is setting the value of `overriding-local-map` perhaps what you want?


Alexis.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]