Mercurial > emacs
changeset 143:fa6580d92860
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Thu, 20 Dec 1990 20:38:22 +0000 |
parents | df6ec648915f |
children | 535ec1aa78ef |
files | lisp/textmodes/texnfo-upd.el |
diffstat | 1 files changed, 18 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/texnfo-upd.el Wed Dec 19 18:11:55 1990 +0000 +++ b/lisp/textmodes/texnfo-upd.el Thu Dec 20 20:38:22 1990 +0000 @@ -197,7 +197,11 @@ at the level specified by LEVEL. Point is left at the end of menu." (let* ((case-fold-search t) - (beginning (texinfo-update-menu-region-beginning level)) + (beginning + (save-excursion + (goto-char (texinfo-update-menu-region-beginning level)) + (end-of-line) + (point))) (end (texinfo-update-menu-region-end level)) (first (texinfo-menu-first-node beginning end)) (node-name (progn @@ -589,7 +593,7 @@ (goto-char (point-min)) ;; Move point to location after `top'. - (if (not (re-search-forward "^@node [ \t]*top" nil t)) + (if (not (re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" nil t)) (error "This buffer needs a Top node!")) (let ((first-chapter @@ -784,7 +788,11 @@ error if the node is not the top node and a section is not found." (save-excursion (cond - ((re-search-forward "^@node [ \t]*top" nil t) + ((re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" + (save-excursion + (end-of-line) + (point)) + t) "top") ((re-search-forward texinfo-section-types-regexp nil t) (buffer-substring (progn (beginning-of-line) ; copy its name @@ -812,16 +820,12 @@ Only argument is a string of the general type of section." (cond - ((string-equal "top" level) - (save-excursion - (re-search-forward "^@node [ \t]*top" nil t) (point))) - ((string-equal "chapter" level) + ((or (string-equal "top" level) + (string-equal "chapter" level)) (save-excursion - (re-search-backward "^@node [ \t]*top" nil t) - ;; Leave point at end of line so texinfo-menu-locate-entry-p does not - ;; accidentally copy an info-only title for the top node into - ;; the main or master menu - (end-of-line) + (goto-char (point-min)) + (re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" nil t) + (beginning-of-line) (point))) (t (save-excursion @@ -940,7 +944,7 @@ (defvar texinfo-update-menu-higher-regexps '(("top" . "^@node [ \t]*DIR") - ("chapter" . "^@node [ \t]*top") + ("chapter" . "^@node [ \t]*top[ \t]*\\(,\\|$\\)") ("section" . (concat "\\(^@\\(" @@ -1527,7 +1531,7 @@ ;; Go to outer file (switch-to-buffer (find-file-noselect (car files))) (goto-char (point-min)) - (if (not (re-search-forward "^@node [ \t]*top" nil t)) + (if (not (re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" nil t)) (error "This buffer needs a Top node!")) (beginning-of-line) (texinfo-delete-existing-pointers)