unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* imenu issue from Bug #13438
@ 2013-01-21 21:09 Fabian Ezequiel Gallina
  2013-01-22  1:07 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Fabian Ezequiel Gallina @ 2013-01-21 21:09 UTC (permalink / raw)
  To: Emacs-Devel devel

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-22 21:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21 21:09 imenu issue from Bug #13438 Fabian Ezequiel Gallina
2013-01-22  1:07 ` Stefan Monnier
2013-01-22 18:37   ` Fabian Ezequiel Gallina
2013-01-22 21:08     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).