Put back a version of the infinite loop test removed 2013-01-23.
+2013-01-30 Glenn Morris <rgm@gnu.org>
+
+ * imenu.el (imenu-default-create-index-function):
+ Put back a version of the infinite loop test removed 2013-01-23.
+
2013-01-28 Fabián Ezequiel Gallina <fgallina@cuca>
* progmodes/python.el (python-shell-parse-command): Find
;; 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 (point))
+ (let ((index-alist '()) (pos -1)
name)
(goto-char (point-max))
;; Search for the function
(while (funcall imenu-prev-index-position-function)
+ (when (= pos (point))
+ (error "Infinite loop at %s:%d: imenu-prev-index-position-function does not move point" (buffer-name) pos))
(setq pos (point))
(save-excursion
(setq name (funcall imenu-extract-index-name-function)))