From ac7b494762408c32905076611b2d0bca7b098d7f Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 11 Sep 2001 08:30:54 +0000 Subject: [PATCH] (outline-mode): Use `^' and a shy group when constructing imenu-generic-expression from outline-regexp. --- lisp/textmodes/outline.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/textmodes/outline.el b/lisp/textmodes/outline.el index 98eb043080b..823f92e4065 100644 --- a/lisp/textmodes/outline.el +++ b/lisp/textmodes/outline.el @@ -228,7 +228,7 @@ Turning on outline mode calls the value of `text-mode-hook' and then of (set (make-local-variable 'font-lock-defaults) '(outline-font-lock-keywords t nil nil backward-paragraph)) (setq imenu-generic-expression - (list (list nil (concat outline-regexp ".*$") 0))) + (list (list nil (concat "^\\(?:" outline-regexp "\\).*$") 0))) (add-hook 'change-major-mode-hook 'show-all nil t)) (defcustom outline-minor-mode-prefix "\C-c@" -- 2.39.5