From: Karl Heuer Date: Fri, 25 Sep 1998 17:01:52 +0000 (+0000) Subject: (texinfo-show-structure): Bind inhibit-read-only. X-Git-Tag: emacs-20.4~1629 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=405dadec66de41db694782b012b4334b5caf0915;p=emacs.git (texinfo-show-structure): Bind inhibit-read-only. --- diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index fb130817e5a..cfd54d5cd09 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -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) - - ((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-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)))) + (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-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))))) ;;; The tex and print function definitions: