- (while (and (get-text-property here 'erc-callback)
- (not (= here (point-max))))
- (setq here (1+ here)))
- (while (and (not (get-text-property here 'erc-callback))
- (not (= here (point-max))))
- (setq here (1+ here)))
- (if (< here (point-max))
- (goto-char here)
- (error "No next button"))
- t))))
+ (let ((here start))
+ ;; FIXME: Use next-single-property-change.
+ (while (and (get-text-property here 'erc-callback)
+ (not (= here (point-max))))
+ (setq here (1+ here)))
+ (while (not (or (get-text-property here 'erc-callback)
+ (= here (point-max))))
+ (setq here (1+ here)))
+ (if (< here (point-max))
+ (goto-char here)
+ (error "No next button"))
+ t)))))