Function: gbut:ebut-program
gbut:ebut-program is a byte-compiled function defined in hbut.el.
Signature
(gbut:ebut-program LABEL ACTYPE &rest ARGS)
Documentation
Programmatically create a global explicit Hyperbole button at point.
Create button from LABEL, ACTYPE (action type), and optional actype ARGS. Insert LABEL text at the end of the personal/global button file surrounded by <( )> delimiters, adding any necessary instance number of the button after the LABEL. ACTYPE may be a Hyperbole action type name (from defact) or an Emacs Lisp function, followed by a list of arguments for the actype, aside from the button LABEL which is automatically provided as the first argument.
For interactive creation, use hui:gbut-create instead.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hbut.el
(defun gbut:ebut-program (label actype &rest args)
"Programmatically create a global explicit Hyperbole button at point.
Create button from LABEL, ACTYPE (action type), and optional actype ARGS.
Insert LABEL text at the end of the personal/global button file
surrounded by <( )> delimiters, adding any necessary instance
number of the button after the LABEL. ACTYPE may be a Hyperbole
action type name (from defact) or an Emacs Lisp function,
followed by a list of arguments for the actype, aside from the
button LABEL which is automatically provided as the first
argument.
For interactive creation, use `hui:gbut-create' instead."
(save-excursion
(with-current-buffer (hpath:find-noselect (expand-file-name hbmap:filename hbmap:dir-user))
(save-excursion
(goto-char (point-max))
(when (not (bolp))
(insert "\n"))
(eval `(ebut:program ',label ',actype ,@args))))))