Ensure forward progress in bibtex-map-entries
* lisp/textmodes/bibtex.el (bibtex-map-entries): Ensure forward progress (bug#55036).
This commit is contained in:
parent
c2dc6db2fd
commit
c32e8b33f4
1 changed files with 11 additions and 5 deletions
|
@ -2298,11 +2298,17 @@ is non-nil, FUN is not called for @String entries."
|
|||
(set-marker-insertion-type end-marker t)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(let ((prev (point)))
|
||||
(while (setq found (bibtex-skip-to-valid-entry))
|
||||
;; If we have invalid entries, ensure that we have forward
|
||||
;; progress so that we don't infloop.
|
||||
(if (= (point) prev)
|
||||
(forward-line 1)
|
||||
(setq prev (point))
|
||||
(set-marker end-marker (cdr found))
|
||||
(looking-at bibtex-any-entry-maybe-empty-head)
|
||||
(funcall fun (bibtex-key-in-head "") (car found) end-marker)
|
||||
(goto-char end-marker)))))
|
||||
(goto-char end-marker)))))))
|
||||
|
||||
(defun bibtex-progress-message (&optional flag interval)
|
||||
"Echo a message about progress of current buffer.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue