1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-12 16:23:57 +00:00

(texinfo-show-structure): Bind inhibit-read-only.

This commit is contained in:
Karl Heuer 1998-09-25 17:01:52 +00:00
parent a9d6e49639
commit 405dadec66

View File

@ -729,46 +729,47 @@ to jump to the corresponding spot in the Texinfo source file."
(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: