diff options
author | Glenn Morris <rgm@gnu.org> | 2013-01-29 23:46:28 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-01-29 23:46:28 -0800 |
commit | 1886a16d27ed4a3ade3f07800797322bfd3468cd (patch) | |
tree | 534b8d64a389e548c8f4cf18b5ad93292372bb20 /lisp/imenu.el | |
parent | e44970863d763264189e7ab98d6991a38dc95dc9 (diff) | |
download | emacs-1886a16d27ed4a3ade3f07800797322bfd3468cd.tar.gz |
* imenu.el (imenu-default-create-index-function):
Put back a version of the infinite loop test removed 2013-01-23.
Diffstat (limited to 'lisp/imenu.el')
-rw-r--r-- | lisp/imenu.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/imenu.el b/lisp/imenu.el index b72cbeb42b4..0b5d69d6233 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -678,11 +678,13 @@ 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 (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))) |