Function: ebut:next-occurrence

ebut:next-occurrence is a byte-compiled function defined in hbut.el.

Signature

(ebut:next-occurrence LBL-KEY &optional BUFFER)

Documentation

Move point to next occurrence of button with LBL-KEY in optional BUFFER.

BUFFER defaults to current buffer. It may be a buffer name. Return non-nil iff occurrence is found.

Remember to use (goto-char (point-min)) before calling this in order to move to the first occurrence of the button.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hbut.el
(defun    ebut:next-occurrence (lbl-key &optional buffer)
  "Move point to next occurrence of button with LBL-KEY in optional BUFFER.
BUFFER defaults to current buffer.  It may be a buffer name.
Return non-nil iff occurrence is found.

Remember to use (goto-char (point-min)) before calling this in order to
move to the first occurrence of the button."
  (if buffer
      (if (not (or (bufferp buffer)
		   (and (stringp buffer) (get-buffer buffer))))
	  (error "(ebut:next-occurrence): Invalid buffer arg: %s" buffer)
	(switch-to-buffer buffer)))
  (if (re-search-forward (ebut:label-regexp lbl-key) nil t)
      (goto-char (+ (match-beginning 0) (length ebut:label-start)))))