diff options
author | Glenn Morris <rgm@gnu.org> | 2013-01-30 00:07:37 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-01-30 00:07:37 -0800 |
commit | 3f82a88a05e227145b0470991050698085d19fbe (patch) | |
tree | 38b8e6b4a86c251ba02264aa01325219aaf16e4b /lisp/imenu.el | |
parent | 9e4ce6976d594b65c7b925fdff12a1adadb3b688 (diff) | |
parent | fe93f41aa0f701315884bf0f8d2cbc6a9f914209 (diff) | |
download | emacs-3f82a88a05e227145b0470991050698085d19fbe.tar.gz |
Merge from emacs-24; up to 2012-12-12T22:29:54Z!yamaoka@jpl.org
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 ba0275099a1..435d97fcdb4 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))) |