branch: externals/frog-menu commit 735c7a1b23f10900917295c47cb5de9bfbc31795 Author: Clemens Radermacher <clem...@posteo.net> Commit: Clemens Radermacher <clem...@posteo.net>
Add new frog-menu-call function --- frog-menu.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frog-menu.el b/frog-menu.el index c18eef5..be7be4a 100644 --- a/frog-menu.el +++ b/frog-menu.el @@ -588,6 +588,18 @@ ACTIONS is the argument of `frog-menu-read'." ;; * Entry point + +;;;###autoload +(defun frog-menu-call (&rest cmds) + "Read a command from CMDS and execute it. + +CMDS is a list of command symbols to choose from." + (let ((cmd (intern-soft (frog-menu-read "" (mapcar #'symbol-name cmds))))) + (unless (commandp cmd) + (user-error "%s is no a kown command" cmd)) + (call-interactively cmd))) + + ;;;###autoload (defun frog-menu-read (prompt strings &optional actions) "Read from a menu of variable `frog-menu-type'.