aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1990-12-20 20:38:22 +0000
committerJim Blandy1990-12-20 20:38:22 +0000
commit82ac4b77568ecd0c71ba4bdd824cbe583439d7ba (patch)
tree861454de85424958daac4495f8046d95c504c277
parent5f7e5584abbeb8fe5473f169e2fd7edbd7a2b1ab (diff)
downloademacs-82ac4b77568ecd0c71ba4bdd824cbe583439d7ba.tar.gz
emacs-82ac4b77568ecd0c71ba4bdd824cbe583439d7ba.zip
*** empty log message ***
-rw-r--r--lisp/textmodes/texnfo-upd.el32
1 files changed, 18 insertions, 14 deletions
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el
index c18ebbd32cc..c236d791846 100644
--- a/lisp/textmodes/texnfo-upd.el
+++ b/lisp/textmodes/texnfo-upd.el
@@ -197,7 +197,11 @@ are inserted as descriptions."
197at the level specified by LEVEL. Point is left at the end of menu." 197at the level specified by LEVEL. Point is left at the end of menu."
198 (let* 198 (let*
199 ((case-fold-search t) 199 ((case-fold-search t)
200 (beginning (texinfo-update-menu-region-beginning level)) 200 (beginning
201 (save-excursion
202 (goto-char (texinfo-update-menu-region-beginning level))
203 (end-of-line)
204 (point)))
201 (end (texinfo-update-menu-region-end level)) 205 (end (texinfo-update-menu-region-end level))
202 (first (texinfo-menu-first-node beginning end)) 206 (first (texinfo-menu-first-node beginning end))
203 (node-name (progn 207 (node-name (progn
@@ -589,7 +593,7 @@ title of the section containing the menu."
589 (goto-char (point-min)) 593 (goto-char (point-min))
590 594
591 ;; Move point to location after `top'. 595 ;; Move point to location after `top'.
592 (if (not (re-search-forward "^@node [ \t]*top" nil t)) 596 (if (not (re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" nil t))
593 (error "This buffer needs a Top node!")) 597 (error "This buffer needs a Top node!"))
594 598
595 (let ((first-chapter 599 (let ((first-chapter
@@ -784,7 +788,11 @@ section whose type will be found. Does not move point. Signal an
784error if the node is not the top node and a section is not found." 788error if the node is not the top node and a section is not found."
785 (save-excursion 789 (save-excursion
786 (cond 790 (cond
787 ((re-search-forward "^@node [ \t]*top" nil t) 791 ((re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)"
792 (save-excursion
793 (end-of-line)
794 (point))
795 t)
788 "top") 796 "top")
789 ((re-search-forward texinfo-section-types-regexp nil t) 797 ((re-search-forward texinfo-section-types-regexp nil t)
790 (buffer-substring (progn (beginning-of-line) ; copy its name 798 (buffer-substring (progn (beginning-of-line) ; copy its name
@@ -812,16 +820,12 @@ Thus, if this level is subsection, searches backwards for section node.
812Only argument is a string of the general type of section." 820Only argument is a string of the general type of section."
813 821
814 (cond 822 (cond
815 ((string-equal "top" level) 823 ((or (string-equal "top" level)
824 (string-equal "chapter" level))
816 (save-excursion 825 (save-excursion
817 (re-search-forward "^@node [ \t]*top" nil t) (point))) 826 (goto-char (point-min))
818 ((string-equal "chapter" level) 827 (re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" nil t)
819 (save-excursion 828 (beginning-of-line)
820 (re-search-backward "^@node [ \t]*top" nil t)
821 ;; Leave point at end of line so texinfo-menu-locate-entry-p does not
822 ;; accidentally copy an info-only title for the top node into
823 ;; the main or master menu
824 (end-of-line)
825 (point))) 829 (point)))
826 (t 830 (t
827 (save-excursion 831 (save-excursion
@@ -940,7 +944,7 @@ document; the values are regular expressions.")
940 944
941(defvar texinfo-update-menu-higher-regexps 945(defvar texinfo-update-menu-higher-regexps
942 '(("top" . "^@node [ \t]*DIR") 946 '(("top" . "^@node [ \t]*DIR")
943 ("chapter" . "^@node [ \t]*top") 947 ("chapter" . "^@node [ \t]*top[ \t]*\\(,\\|$\\)")
944 ("section" . 948 ("section" .
945 (concat 949 (concat
946 "\\(^@\\(" 950 "\\(^@\\("
@@ -1527,7 +1531,7 @@ However, there does not need to be a title field."
1527 ;; Go to outer file 1531 ;; Go to outer file
1528 (switch-to-buffer (find-file-noselect (car files))) 1532 (switch-to-buffer (find-file-noselect (car files)))
1529 (goto-char (point-min)) 1533 (goto-char (point-min))
1530 (if (not (re-search-forward "^@node [ \t]*top" nil t)) 1534 (if (not (re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" nil t))
1531 (error "This buffer needs a Top node!")) 1535 (error "This buffer needs a Top node!"))
1532 (beginning-of-line) 1536 (beginning-of-line)
1533 (texinfo-delete-existing-pointers) 1537 (texinfo-delete-existing-pointers)