mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* imenu.el (imenu-default-create-index-function):
Tweak infinite loop test to check for forward motion as well as none.
This commit is contained in:
parent
cd87ae10a8
commit
48c828b923
2 changed files with 8 additions and 3 deletions
|
|
@ -676,12 +676,12 @@ The alternate method, which is the one most often used, is to call
|
|||
;; in these major modes. But save that change for later.
|
||||
(cond ((and imenu-prev-index-position-function
|
||||
imenu-extract-index-name-function)
|
||||
(let ((index-alist '()) (pos -1)
|
||||
(let ((index-alist '()) (pos (point-max))
|
||||
name)
|
||||
(goto-char (point-max))
|
||||
(goto-char pos)
|
||||
;; Search for the function
|
||||
(while (funcall imenu-prev-index-position-function)
|
||||
(when (= pos (point))
|
||||
(unless (< (point) pos)
|
||||
(error "Infinite loop at %s:%d: imenu-prev-index-position-function does not move point" (buffer-name) pos))
|
||||
(setq pos (point))
|
||||
(save-excursion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue