[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
imenu issue from Bug #13438
From: |
Fabian Ezequiel Gallina |
Subject: |
imenu issue from Bug #13438 |
Date: |
Mon, 21 Jan 2013 18:09:20 -0300 |
Got a quick look at
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13438, in there I think
the problem is related to how `imenu-default-create-index-function'
detects infinite recursion. I this case, because the the point is at
the beginning of the latest available defun, the points doesn't move
and it throws the infinite loop error.
Here's a mindless quick patch that seems to fix the problem. I could
install it myself but I'd like some input first.
=== modified file 'lisp/imenu.el'
--- lisp/imenu.el 2013-01-01 09:11:05 +0000
+++ lisp/imenu.el 2013-01-21 21:03:57 +0000
@@ -683,7 +683,8 @@
(goto-char (point-max))
;; Search for the function
(while (funcall imenu-prev-index-position-function)
- (when (= pos (point))
+ (when (and (= pos (point))
+ (save-excursion (beginning-of-defun)))
(error "Infinite loop at %s:%d:
imenu-prev-index-position-function does not move point" (buffer-name)
pos))
(setq pos (point))
(save-excursion
Regards,
Fabián
- imenu issue from Bug #13438,
Fabian Ezequiel Gallina <=