[Top][All Lists]

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

[elpa] externals/frog-menu 735c7a1: Add new frog-menu-call function

From: Clemens Radermacher
Subject: [elpa] externals/frog-menu 735c7a1: Add new frog-menu-call function
Date: Tue, 23 Apr 2019 13:41:24 -0400 (EDT)

branch: externals/frog-menu
commit 735c7a1b23f10900917295c47cb5de9bfbc31795
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    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
+(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)))
 (defun frog-menu-read (prompt strings &optional actions)
   "Read from a menu of variable `frog-menu-type'.

reply via email to

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