emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107882: * imenu.el (imenu--generi


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r107882: * imenu.el (imenu--generic-function): Ignore invisible definitions.
Date: Fri, 02 Nov 2012 02:33:37 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 107882
fixes bug: http://debbugs.gnu.org/10123
author: Drew Adams <address@hidden>
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Thu 2012-04-12 22:00:24 +0200
message:
  * imenu.el (imenu--generic-function): Ignore invisible definitions.
modified:
  lisp/ChangeLog
  lisp/imenu.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-04-12 15:58:53 +0000
+++ b/lisp/ChangeLog    2012-04-12 20:00:24 +0000
@@ -1,3 +1,8 @@
+2012-04-12  Drew Adams  <address@hidden>
+
+       * imenu.el (imenu--generic-function): Ignore invisible definitions
+       (bug#10123).
+
 2012-04-12  Vivek Dasmohapatra  <address@hidden>
 
        * hexl.el (hexl-bits): New variable.

=== modified file 'lisp/imenu.el'
--- a/lisp/imenu.el     2012-04-11 21:37:13 +0000
+++ b/lisp/imenu.el     2012-04-12 20:00:24 +0000
@@ -800,7 +800,17 @@
              (goto-char (point-max))
              (while (and (if (functionp regexp)
                              (funcall regexp)
-                           (re-search-backward regexp nil t))
+                           (and
+                            (re-search-backward regexp nil t)
+                            ;; Do not count invisible definitions.
+                            (let ((invis (invisible-p (point))))
+                              (or (not invis)
+                                  (progn
+                                    (while (and invis
+                                                (not (bobp)))
+                                      (setq invis (not (re-search-backward
+                                                        regexp nil 'move))))
+                                    (not invis))))))
                          ;; Exit the loop if we get an empty match,
                          ;; because it means a bad regexp was specified.
                          (not (= (match-beginning 0) (match-end 0))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]