Mercurial > emacs
changeset 53647:5e31be49b42d
(texinfo-mode): Remove ^ from outline-regexp.
(texinfo-show-structure): Explicitly add ^, and simplify.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 21 Jan 2004 03:09:06 +0000 |
parents | 8c55b1b400d5 |
children | cb1748b5a52b |
files | lisp/textmodes/texinfo.el |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/texinfo.el Tue Jan 20 23:25:33 2004 +0000 +++ b/lisp/textmodes/texinfo.el Wed Jan 21 03:09:06 2004 +0000 @@ -1,6 +1,6 @@ ;;; texinfo.el --- major mode for editing Texinfo files -;; Copyright (C) 1985,88,89,90,91,92,93,96,97,2000,01,03, 04 +;; Copyright (C) 1985,88,89,90,91,92,93,96,97,2000,01,03,04 ;; Free Software Foundation, Inc. ;; Author: Robert J. Chassell @@ -616,7 +616,7 @@ (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x))) texinfo-section-list)) (set (make-local-variable 'outline-regexp) - (concat "^" (regexp-opt (mapcar 'car outline-heading-alist) t) + (concat (regexp-opt (mapcar 'car outline-heading-alist) t) "\\>")) (make-local-variable 'tex-start-of-header) @@ -904,9 +904,8 @@ ;; Second, create and format an *Occur* buffer (save-excursion (goto-char (point-min)) - (if nodes-too - (occur (concat "^@node\\>\\|" outline-regexp)) - (occur outline-regexp))) + (occur (concat "^\\(?:" (if nodes-too "@node\\>\\|") + outline-regexp "\\)"))) (pop-to-buffer "*Occur*") (goto-char (point-min)) (let ((inhibit-read-only t))