Function: hui:menu-get-keys

hui:menu-get-keys is a byte-compiled function defined in hui-mini.el.

Signature

(hui:menu-get-keys MENU &optional MENU-LIST)

Documentation

Prompt with Hyperbole MENU symbol, select an item and return the keys pressed.

Optional second argument MENU-LIST is a Hyperbole menu list structure from which to extract MENU. It defaults to hui:menus. See its definition for the menu list structure.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui-mini.el
(defun hui:menu-get-keys (menu &optional menu-list)
  "Prompt with Hyperbole MENU symbol, select an item and return the keys pressed.
Optional second argument MENU-LIST is a Hyperbole menu list structure from
which to extract MENU.  It defaults to `hui:menus'.  See its definition for
the menu list structure."
  (setq hui:menu-keys "")
  (let ((show-menu t)
	menu-alist act-form)
    (while (and show-menu (or (and menu (symbolp menu)
                                   (setq menu-alist
                                         (cdr (assq menu (or menu-list hui:menus)))))
                              (hypb:error "(hui:menu-get-keys): Invalid menu symbol arg: `%s'"
                                          menu)))
      (cond ((and (consp (setq act-form (hui:menu-choose menu-alist)))
		  (cdr act-form)
		  (symbolp (cdr act-form)))
	     ;; Display another menu
	     (setq menu (cdr act-form)))
	    (act-form
	     (let ((prefix-arg current-prefix-arg))
	       (cond ((or (symbolp act-form)
			  (stringp act-form))
		      (unless (eq act-form t)
			(setq show-menu nil)))
		     (t (setq show-menu nil)))))
	    (t (setq show-menu nil))))
    hui:menu-keys))