Function: hui:menu-backward-item

hui:menu-backward-item is an interactive and byte-compiled function defined in hui-mini.el.

Signature

(hui:menu-backward-item &optional ARG)

Documentation

Move point back to optional ARGth start of a selectable minibuffer menu item.

If on the menu name prefix or the first item, move to the last item.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui-mini.el
(defun hui:menu-backward-item (&optional arg)
  "Move point back to optional ARGth start of a selectable minibuffer menu item.
If on the menu name prefix or the first item, move to the last item."
  (interactive "p")
  (unless arg (setq arg 1))
  (if (< arg 0)
      (hui:menu-forward-item (- arg))
    (let (opoint)
      (while (> arg 0)
	;; First skip back past menu name/description prompt, if within it.
	(when (hui:menu-name-at-p)
	  (setq opoint (point))
	  (skip-chars-backward "^ \t\n\r")
	  (skip-chars-forward " \t")
	  (skip-chars-forward "^<> \t\n\r")
	  (unless (looking-at ">\\s-")
	    (goto-char opoint)
	    (skip-chars-backward "^ \t\n\r")))
	(if (re-search-backward "\\s-[^> \t\n\r]" nil t)
	    (forward-char 1)
	  (goto-char (point-max))
	  (skip-chars-backward "^ \t\n\r"))
	(setq arg (1- arg))))))