Function: hui:hbut-label

hui:hbut-label is a byte-compiled function defined in hui.el.

Signature

(hui:hbut-label DEFAULT-LABEL FUNC-NAME &optional PROMPT)

Documentation

Read button label from user using DEFAULT-LABEL and caller's FUNC-NAME.

Optional PROMPT string replaces the standard prompt of Button label: .

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui.el
(defun hui:hbut-label (default-label func-name &optional prompt)
  "Read button label from user using DEFAULT-LABEL and caller's FUNC-NAME.
Optional PROMPT string replaces the standard prompt of `Button label: '."
  (hargs:read (if (stringp prompt) prompt "Button label: ")
	      (lambda (lbl)
		(and (not (string-match-p "\\`\\s-*\\'" lbl))
		     (<= (length lbl) (hbut:max-len))))
	      default-label
	      (format "(%s): Enter a non-blank string of at most %s chars."
		      func-name (hbut:max-len))
	      'string))