Function: ebut:list
ebut:list is an interactive and byte-compiled function defined in
hbut.el.
Signature
(ebut:list &optional FILE LOC-P)
Documentation
Return list of explicit button labels from in FILE or the current buffer.
Remove duplicate labels if optional LOC-P is omitted. With LOC-P, return list of elements (label start end) where start and end are the buffer positions at which the button delimiter begins and ends.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hbut.el
(defun ebut:list (&optional file loc-p)
"Return list of explicit button labels from in FILE or the current buffer.
Remove duplicate labels if optional LOC-P is omitted. With LOC-P, return
list of elements (label start end) where start and end are the buffer
positions at which the button delimiter begins and ends."
(interactive)
(setq file (if file
(when (file-exists-p file)
(find-file-noselect file))
(current-buffer)))
(when file
(set-buffer file)
(let ((buts (ebut:map (if loc-p
(lambda (lbl start end)
;; Normalize label spacing
(list (ebut:key-to-label (ebut:label-to-key lbl))
start end))
(lambda (lbl _start _end)
;; Normalize label spacing
(ebut:key-to-label (ebut:label-to-key lbl)))))))
(if loc-p buts (when buts (apply #'set:create buts))))))