changeset 23320:19a7a9d3fcc4

(texinfo-show-structure): Bind inhibit-read-only.
author Karl Heuer <kwzh@gnu.org>
date Fri, 25 Sep 1998 17:01:52 +0000
parents 6d8f2c66943f
children b352f37246ba
files lisp/textmodes/texinfo.el
diffstat 1 files changed, 38 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/texinfo.el	Fri Sep 25 17:00:25 1998 +0000
+++ b/lisp/textmodes/texinfo.el	Fri Sep 25 17:01:52 1998 +0000
@@ -729,46 +729,47 @@
       (occur texinfo-section-types-regexp)))
   (pop-to-buffer "*Occur*")
   (goto-char (point-min))
-  (flush-lines "-----")
-  ;; Now format the "*Occur*" buffer to show the structure.
-  ;; Thanks to ceder@signum.se (Per Cederqvist)
-  (goto-char (point-max))
-  (let ((margin 5))
-    (while (re-search-backward "^ *[0-9]*:" nil 0)
-      (re-search-forward ":")
-      (setq margin
-            (cond
-             ((looking-at
-               (concat "@\\(" texinfo-chapter-level-regexp "\\)")) 5)
-             ;; ((looking-at "@chapter ") 5)
-             ;; ((looking-at "@unnumbered ") 5)
-             ;; ((looking-at "@appendix ") 5)
-             ;; ((looking-at "@majorheading ") 5)
-             ;; ((looking-at "@chapheading ") 5)
+  (let ((inhibit-read-only t))
+    (flush-lines "-----")
+    ;; Now format the "*Occur*" buffer to show the structure.
+    ;; Thanks to ceder@signum.se (Per Cederqvist)
+    (goto-char (point-max))
+    (let ((margin 5))
+      (while (re-search-backward "^ *[0-9]*:" nil 0)
+	(re-search-forward ":")
+	(setq margin
+	      (cond
+	       ((looking-at
+		 (concat "@\\(" texinfo-chapter-level-regexp "\\)")) 5)
+	       ;; ((looking-at "@chapter ") 5)
+	       ;; ((looking-at "@unnumbered ") 5)
+	       ;; ((looking-at "@appendix ") 5)
+	       ;; ((looking-at "@majorheading ") 5)
+	       ;; ((looking-at "@chapheading ") 5)
 
-             ((looking-at
-               (concat "@\\(" texinfo-section-level-regexp "\\)")) 9)
-             ;; ((looking-at "@section ") 9)
-             ;; ((looking-at "@unnumberedsec ") 9)
-             ;; ((looking-at "@appendixsec ") 9)
-             ;; ((looking-at "@heading ") 9)
+	       ((looking-at
+		 (concat "@\\(" texinfo-section-level-regexp "\\)")) 9)
+	       ;; ((looking-at "@section ") 9)
+	       ;; ((looking-at "@unnumberedsec ") 9)
+	       ;; ((looking-at "@appendixsec ") 9)
+	       ;; ((looking-at "@heading ") 9)
 
-             ((looking-at
-               (concat "@\\(" texinfo-subsection-level-regexp "\\)")) 13)
-             ;; ((looking-at "@subsection ") 13)
-             ;; ((looking-at "@unnumberedsubsec ") 13)
-             ;; ((looking-at "@appendixsubsec ") 13)
-             ;; ((looking-at "@subheading ") 13)
+	       ((looking-at
+		 (concat "@\\(" texinfo-subsection-level-regexp "\\)")) 13)
+	       ;; ((looking-at "@subsection ") 13)
+	       ;; ((looking-at "@unnumberedsubsec ") 13)
+	       ;; ((looking-at "@appendixsubsec ") 13)
+	       ;; ((looking-at "@subheading ") 13)
 
-             ((looking-at
-               (concat "@\\(" texinfo-subsubsection-level-regexp "\\)")) 17)
-             ;; ((looking-at "@subsubsection ") 17)
-             ;; ((looking-at "@unnumberedsubsubsec ") 17)
-             ;; ((looking-at "@appendixsubsubsec ") 17)
-             ;; ((looking-at "@subsubheading ") 17)
-             (t margin)))
-      (indent-to-column margin)
-      (beginning-of-line))))
+	       ((looking-at
+		 (concat "@\\(" texinfo-subsubsection-level-regexp "\\)")) 17)
+	       ;; ((looking-at "@subsubsection ") 17)
+	       ;; ((looking-at "@unnumberedsubsubsec ") 17)
+	       ;; ((looking-at "@appendixsubsubsec ") 17)
+	       ;; ((looking-at "@subsubheading ") 17)
+	       (t margin)))
+	(indent-to-column margin)
+	(beginning-of-line)))))
 
 ;;; The  tex  and  print  function definitions: