Function: hbut:funcall
hbut:funcall is a byte-compiled function defined in hbut.el.
Signature
(hbut:funcall FUNC &optional LBL-KEY BUFFER KEY-SRC)
Documentation
Move to an implicit button and return the result of calling FUNC.
Call FUNC with optional argument values of LBL-KEY, BUFFER and
KEY-SRC. The implicit button used is given by LBL-KEY (a label
or label key) within BUFFER or KEY-SRC (full path to global
button file) or within the current buffer if both are null. Use
save-excursion around this call to prevent permanent movement
of point when desired.
Caller must have used (ibut:at-p) to create hbut:current prior to calling this function. When KEY-SRC is given, this set's hbut:current's 'loc attribute to KEY-SRC.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hbut.el
(defun hbut:funcall (func &optional lbl-key buffer key-src)
"Move to an implicit button and return the result of calling FUNC.
Call FUNC with optional argument values of LBL-KEY, BUFFER and
KEY-SRC. The implicit button used is given by LBL-KEY (a label
or label key) within BUFFER or KEY-SRC (full path to global
button file) or within the current buffer if both are null. Use
`save-excursion' around this call to prevent permanent movement
of point when desired.
Caller must have used (ibut:at-p) to create hbut:current prior to
calling this function. When KEY-SRC is given, this set's
hbut:current's \\='loc attribute to KEY-SRC."
(if buffer
(if (bufferp buffer)
(set-buffer buffer)
(error "(ibut:get): Invalid buffer argument: %s" buffer))
(if key-src
(hattr:set 'hbut:current 'loc key-src)
(let ((loc (hattr:get 'hbut:current 'loc)))
(when loc
(hbut:key-src-set-buffer loc)))
(setq key-src (hbut:to-key-src 'full)
;; `hbut:to-key-src' sets current buffer to key-src buffer.
buffer (or buffer (current-buffer))))
(when (stringp lbl-key)
(when key-src
(set-buffer (if (bufferp key-src)
key-src
(find-file-noselect key-src))))))
(when (and (stringp lbl-key) (or buffer key-src))
(funcall func lbl-key buffer key-src)))