diff options
| author | Glenn Morris | 2013-01-29 23:46:28 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-01-29 23:46:28 -0800 |
| commit | 1886a16d27ed4a3ade3f07800797322bfd3468cd (patch) | |
| tree | 534b8d64a389e548c8f4cf18b5ad93292372bb20 | |
| parent | e44970863d763264189e7ab98d6991a38dc95dc9 (diff) | |
| download | emacs-1886a16d27ed4a3ade3f07800797322bfd3468cd.tar.gz emacs-1886a16d27ed4a3ade3f07800797322bfd3468cd.zip | |
* imenu.el (imenu-default-create-index-function):
Put back a version of the infinite loop test removed 2013-01-23.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/imenu.el | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 26ad7ec799a..aaa01698f12 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-01-30 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * imenu.el (imenu-default-create-index-function): | ||
| 4 | Put back a version of the infinite loop test removed 2013-01-23. | ||
| 5 | |||
| 1 | 2013-01-28 Fabián Ezequiel Gallina <fgallina@cuca> | 6 | 2013-01-28 Fabián Ezequiel Gallina <fgallina@cuca> |
| 2 | 7 | ||
| 3 | * progmodes/python.el (python-shell-parse-command): Find | 8 | * progmodes/python.el (python-shell-parse-command): Find |
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 | |||
| 678 | ;; in these major modes. But save that change for later. | 678 | ;; in these major modes. But save that change for later. |
| 679 | (cond ((and imenu-prev-index-position-function | 679 | (cond ((and imenu-prev-index-position-function |
| 680 | imenu-extract-index-name-function) | 680 | imenu-extract-index-name-function) |
| 681 | (let ((index-alist '()) (pos (point)) | 681 | (let ((index-alist '()) (pos -1) |
| 682 | name) | 682 | name) |
| 683 | (goto-char (point-max)) | 683 | (goto-char (point-max)) |
| 684 | ;; Search for the function | 684 | ;; Search for the function |
| 685 | (while (funcall imenu-prev-index-position-function) | 685 | (while (funcall imenu-prev-index-position-function) |
| 686 | (when (= pos (point)) | ||
| 687 | (error "Infinite loop at %s:%d: imenu-prev-index-position-function does not move point" (buffer-name) pos)) | ||
| 686 | (setq pos (point)) | 688 | (setq pos (point)) |
| 687 | (save-excursion | 689 | (save-excursion |
| 688 | (setq name (funcall imenu-extract-index-name-function))) | 690 | (setq name (funcall imenu-extract-index-name-function))) |