emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] imenu: Added a check that looking-at succeeds before using the match results.
@ 2012-03-08 19:34 Ilya Shlyakhter
  2012-03-08 19:39 ` Achim Gratz
  0 siblings, 1 reply; 4+ messages in thread
From: Ilya Shlyakhter @ 2012-03-08 19:34 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

* lisp/org.el (org-imenu-get-tree): Check that looking-at succeeds before
using match results.


TINYCHANGE

---
 lisp/org.el |    4
++--

 1 file changed, 2 insertions(+), 2
deletions(-)



diff --git a/lisp/org.el
b/lisp/org.el

index ad63213..e4fb497
100644

---
a/lisp/org.el

+++
b/lisp/org.el

@@ -21250,8 +21250,8 @@ Show the heading too, if it is currently invisible."
        (goto-char
(point-max))

        (while (re-search-backward re nil
t)

          (setq level (org-reduced-level (funcall
outline-level)))

-         (when (<= level
n)

-           (looking-at
org-complex-heading-regexp)

+         (when (and (<= level
n)

+                    (looking-at
org-complex-heading-regexp))

            (setq head
(org-link-display-format

                        (org-match-string-no-properties
4))
                  m
(org-imenu-new-marker))

--

1.7.9.3

[-- Attachment #2: Type: text/html, Size: 3044 bytes --]

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

end of thread, other threads:[~2012-03-20 10:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-08 19:34 [PATCH] imenu: Added a check that looking-at succeeds before using the match results Ilya Shlyakhter
2012-03-08 19:39 ` Achim Gratz
2012-03-08 21:19   ` Ilya Shlyakhter
2012-03-20 10:51     ` Bastien

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).