aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/imenu.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 323a279efef..876f6f2f061 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -640,8 +640,9 @@ pattern.
640 (index (caddr pat))) 640 (index (caddr pat)))
641 (if (and (not found) ; Only allow one entry; 641 (if (and (not found) ; Only allow one entry;
642 (looking-at regexp)) 642 (looking-at regexp))
643 (let ((beg (match-beginning index)) 643 (let ((beg (make-marker))
644 (end (match-end index))) 644 (end (match-end index)))
645 (set-marker beg (match-beginning index))
645 (setq found t) 646 (setq found t)
646 (push 647 (push
647 (cons (buffer-substring-no-properties beg end) beg) 648 (cons (buffer-substring-no-properties beg end) beg)