From: "Drew Adams" <drew.adams@oracle.com>
To: <10123@debbugs.gnu.org>
Subject: bug#10123: 24.0.91; [PATCH] make Imenu ignore invisible definitions
Date: Thu, 24 Nov 2011 08:46:50 -0800 [thread overview]
Message-ID: <D6A2D654774D42D88703AC746FCD0B0E@us.oracle.com> (raw)
In-Reply-To: <1380604F93A4406CB67F8E131E1F3FA7@us.oracle.com>
[-- Attachment #1: Type: text/plain, Size: 126 bytes --]
Might as well use `invisible-p', so it works for invisibility from overlays as
well as from text properties. Patch attached.
[-- Attachment #2: imenu-2011-11-24a.patch --]
[-- Type: application/octet-stream, Size: 1478 bytes --]
diff -c -w "imenu.el" "imenupatched.el"
*** imenu.el Wed Nov 23 13:43:14 2011
--- imenu-patched.el Wed Nov 23 13:47:16 2011
***************
*** 800,806 ****
(goto-char (point-max))
(while (and (if (functionp regexp)
(funcall regexp)
! (re-search-backward regexp nil t))
;; Exit the loop if we get an empty match,
;; because it means a bad regexp was specified.
(not (= (match-beginning 0) (match-end 0))))
--- 800,813 ----
(goto-char (point-max))
(while (and (if (functionp regexp)
(funcall regexp)
! (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))))
Diff finished at Wed Nov 23 13:48:05
next prev parent reply other threads:[~2011-11-24 16:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 0:36 bug#10123: 24.0.91; [PATCH] make Imenu ignore invisible definitions Drew Adams
2011-11-24 0:57 ` Drew Adams
2011-11-24 16:46 ` Drew Adams [this message]
2012-04-12 20:01 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D6A2D654774D42D88703AC746FCD0B0E@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=10123@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.