Function: hui:ebut-delete-op
hui:ebut-delete-op is a byte-compiled function defined in hui.el.
Signature
(hui:ebut-delete-op INTERACTIVE BUT-KEY KEY-SRC)
Documentation
INTERACTIVEly or not, delete explicit button given by BUT-KEY in KEY-SRC.
KEY-SRC may be a buffer or a pathname; when nil, the current buffer is used. Return t if button is deleted; signal an error otherwise. If called with INTERACTIVE non-nil, derive BUT-KEY from the button that point is within.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui.el
(defun hui:ebut-delete-op (interactive but-key key-src)
"INTERACTIVEly or not, delete explicit button given by BUT-KEY in KEY-SRC.
KEY-SRC may be a buffer or a pathname; when nil, the current
buffer is used. Return t if button is deleted; signal an error
otherwise. If called with INTERACTIVE non-nil, derive BUT-KEY
from the button that point is within."
(let ((buf (current-buffer)) (ebut))
(if (if interactive
(ebut:delete)
(cond ((or (null key-src) (and (bufferp key-src) (setq buf key-src)))
(setq ebut (ebut:get but-key nil key-src)))
((and (stringp key-src)
(setq buf (find-file-noselect key-src)))
(setq ebut (ebut:get but-key buf)))
(t (hypb:error "(ebut-delete): Invalid key-src: '%s'" key-src)))
(if ebut
(ebut:delete ebut)
(hypb:error "(ebut-delete): No valid %s button in %s"
(ebut:key-to-label but-key) buf)))
(with-current-buffer buf
(if interactive
(progn
(call-interactively 'hui:ebut-unmark)
(message "Button deleted."))
(hui:ebut-unmark but-key key-src))
(when (hmail:reader-p)
(hmail:msg-narrow))
(message "Button '%s' deleted." (ebut:key-to-label but-key))
t)
(hypb:error "(ebut-delete): You may not delete buttons from this buffer"))))