]> git.eshelyaron.com Git - emacs.git/commitdiff
(texinfo-section-types-regexp)
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 25 Oct 2001 03:39:43 +0000 (03:39 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 25 Oct 2001 03:39:43 +0000 (03:39 +0000)
(texinfo-section-level-regexp, texinfo-subsection-level-regexp)
(texinfo-subsubsection-level-regexp)
(texinfo-update-menu-same-level-regexps)
(texinfo-update-menu-higher-regexps)
(texinfo-update-menu-lower-regexps): Moved to eliminate warnings.

lisp/textmodes/texnfo-upd.el

index ec3cda5aed6ee6738cd7c353b0edfd3d8d87c9e5..d928ec44c6835a7c8e068bdab763a7759aa3549d 100644 (file)
   "String inserted before lower level entries in Texinfo master menu.
 It comes after the chapter-level menu entries.")
 
+;; We used to look for just sub, but that found @subtitle.
+(defvar texinfo-section-types-regexp
+  "^@\\(chapter \\|sect\\|subs\\|subh\\|unnum\\|major\\|chapheading \\|heading \\|appendix\\)"
+  "Regexp matching chapter, section, other headings (but not the top node).")
+
+(defvar texinfo-section-level-regexp
+  (regexp-opt (texinfo-filter 3 texinfo-section-list))
+  "Regular expression matching just the Texinfo section level headings.")
+
+(defvar texinfo-subsection-level-regexp
+  (regexp-opt (texinfo-filter 4 texinfo-section-list))
+  "Regular expression matching just the Texinfo subsection level headings.")
+
+(defvar texinfo-subsubsection-level-regexp
+  (regexp-opt (texinfo-filter 5 texinfo-section-list))
+  "Regular expression matching just the Texinfo subsubsection level headings.")
+
+(defvar texinfo-update-menu-same-level-regexps
+  '((1 . "top[ \t]+")
+    (2 . (concat "\\(^@\\)\\(" texinfo-chapter-level-regexp "\\)\\>[ \t]*"))
+    (3 . (concat "\\(^@\\)\\(" texinfo-section-level-regexp "\\)\\>[ \t]*"))
+    (4 . (concat "\\(^@\\)\\(" texinfo-subsection-level-regexp "\\)\\>[ \t]+"))
+    (5 . (concat "\\(^@\\)\\(" texinfo-subsubsection-level-regexp "\\)\\>[ \t]+")))
+  "*Regexps for searching for same level sections in a Texinfo file.
+The keys are strings specifying the general hierarchical level in the
+document; the values are regular expressions.")
+
+(defvar texinfo-update-menu-higher-regexps
+  '((1 . "^@node [ \t]*DIR")
+    (2 . "^@node [ \t]*top[ \t]*\\(,\\|$\\)")
+    (3 .
+     (concat
+      "\\(^@\\("
+      texinfo-chapter-level-regexp
+      "\\)\\>[ \t]*\\)"))
+    (4 .
+     (concat
+      "\\(^@\\("
+      texinfo-section-level-regexp
+      "\\|"
+      texinfo-chapter-level-regexp
+      "\\)\\>[ \t]*\\)"))
+    (5 .
+     (concat
+      "\\(^@\\("
+      texinfo-subsection-level-regexp
+      "\\|"
+      texinfo-section-level-regexp
+      "\\|"
+      texinfo-chapter-level-regexp
+      "\\)\\>[ \t]*\\)")))
+  "*Regexps for searching for higher level sections in a Texinfo file.
+The keys are strings specifying the general hierarchical level in the
+document; the values are regular expressions.")
+
+(defvar texinfo-update-menu-lower-regexps
+  '((1 .
+     (concat
+      "\\(^@\\("
+      texinfo-chapter-level-regexp
+      "\\|"
+      texinfo-section-level-regexp
+      "\\|"
+      texinfo-subsection-level-regexp
+      "\\|"
+      texinfo-subsubsection-level-regexp
+      "\\)\\>[ \t]*\\)"))
+    (2 .
+     (concat
+      "\\(^@\\("
+      texinfo-section-level-regexp
+      "\\|"
+      texinfo-subsection-level-regexp
+      "\\|"
+      texinfo-subsubsection-level-regexp
+      "\\)\\>[ \t]*\\)"))
+    (3 .
+     (concat
+      "\\(^@\\("
+      texinfo-subsection-level-regexp
+      "\\|"
+      texinfo-subsubsection-level-regexp
+      "\\)\\>[ \t]+\\)"))
+    (4 .
+     (concat
+      "\\(^@\\("
+      texinfo-subsubsection-level-regexp
+      "\\)\\>[ \t]+\\)"))
+    ;; There's nothing below 5, use a bogus regexp that can't match.
+    (5 . "a\\(^\\)"))
+  "*Regexps for searching for lower level sections in a Texinfo file.
+The keys are strings specifying the general hierarchical level in the
+document; the values are regular expressions.")
+
+\f
 (defun texinfo-make-menu (&optional beginning end)
   "Without any prefix argument, make or update a menu.
 Make the menu for the section enclosing the node found following point.
@@ -1134,101 +1229,6 @@ end of that region; it limits the search."
     (beginning-of-line)
     (point)))
 
-\f
-;; We used to look for just sub, but that found @subtitle.
-(defvar texinfo-section-types-regexp
-  "^@\\(chapter \\|sect\\|subs\\|subh\\|unnum\\|major\\|chapheading \\|heading \\|appendix\\)"
-  "Regexp matching chapter, section, other headings (but not the top node).")
-
-(defvar texinfo-section-level-regexp
-  (regexp-opt (texinfo-filter 3 texinfo-section-list))
-  "Regular expression matching just the Texinfo section level headings.")
-
-(defvar texinfo-subsection-level-regexp
-  (regexp-opt (texinfo-filter 4 texinfo-section-list))
-  "Regular expression matching just the Texinfo subsection level headings.")
-
-(defvar texinfo-subsubsection-level-regexp
-  (regexp-opt (texinfo-filter 5 texinfo-section-list))
-  "Regular expression matching just the Texinfo subsubsection level headings.")
-
-(defvar texinfo-update-menu-same-level-regexps
-  '((1 . "top[ \t]+")
-    (2 . (concat "\\(^@\\)\\(" texinfo-chapter-level-regexp "\\)\\>[ \t]*"))
-    (3 . (concat "\\(^@\\)\\(" texinfo-section-level-regexp "\\)\\>[ \t]*"))
-    (4 . (concat "\\(^@\\)\\(" texinfo-subsection-level-regexp "\\)\\>[ \t]+"))
-    (5 . (concat "\\(^@\\)\\(" texinfo-subsubsection-level-regexp "\\)\\>[ \t]+")))
-  "*Regexps for searching for same level sections in a Texinfo file.
-The keys are strings specifying the general hierarchical level in the
-document; the values are regular expressions.")
-
-(defvar texinfo-update-menu-higher-regexps
-  '((1 . "^@node [ \t]*DIR")
-    (2 . "^@node [ \t]*top[ \t]*\\(,\\|$\\)")
-    (3 .
-     (concat
-      "\\(^@\\("
-      texinfo-chapter-level-regexp
-      "\\)\\>[ \t]*\\)"))
-    (4 .
-     (concat
-      "\\(^@\\("
-      texinfo-section-level-regexp
-      "\\|"
-      texinfo-chapter-level-regexp
-      "\\)\\>[ \t]*\\)"))
-    (5 .
-     (concat
-      "\\(^@\\("
-      texinfo-subsection-level-regexp
-      "\\|"
-      texinfo-section-level-regexp
-      "\\|"
-      texinfo-chapter-level-regexp
-      "\\)\\>[ \t]*\\)")))
-  "*Regexps for searching for higher level sections in a Texinfo file.
-The keys are strings specifying the general hierarchical level in the
-document; the values are regular expressions.")
-
-(defvar texinfo-update-menu-lower-regexps
-  '((1 .
-     (concat
-      "\\(^@\\("
-      texinfo-chapter-level-regexp
-      "\\|"
-      texinfo-section-level-regexp
-      "\\|"
-      texinfo-subsection-level-regexp
-      "\\|"
-      texinfo-subsubsection-level-regexp
-      "\\)\\>[ \t]*\\)"))
-    (2 .
-     (concat
-      "\\(^@\\("
-      texinfo-section-level-regexp
-      "\\|"
-      texinfo-subsection-level-regexp
-      "\\|"
-      texinfo-subsubsection-level-regexp
-      "\\)\\>[ \t]*\\)"))
-    (3 .
-     (concat
-      "\\(^@\\("
-      texinfo-subsection-level-regexp
-      "\\|"
-      texinfo-subsubsection-level-regexp
-      "\\)\\>[ \t]+\\)"))
-    (4 .
-     (concat
-      "\\(^@\\("
-      texinfo-subsubsection-level-regexp
-      "\\)\\>[ \t]+\\)"))
-    ;; There's nothing below 5, use a bogus regexp that can't match.
-    (5 . "a\\(^\\)"))
-  "*Regexps for searching for lower level sections in a Texinfo file.
-The keys are strings specifying the general hierarchical level in the
-document; the values are regular expressions.")
-
 \f
 ;;; Updating a node