comparison lisp/textmodes/texinfmt.el @ 67582:cc04cc5f78a8

(texinfo-format-region): [on behalf of Lennart Borgman <lennart.borgman.073@student.lu.se>] Set buffer to read-only except for texinfo-format-region evaluation.
author Robert J. Chassell <bob@rattlesnake.com>
date Wed, 14 Dec 2005 21:57:31 +0000
parents 5b1a238fcbb4
children 067115a6e738 7beb78bc1f8e
comparison
equal deleted inserted replaced
67581:05d48e1da3ad 67582:cc04cc5f78a8
210 (min header-beginning region-beginning) 210 (min header-beginning region-beginning)
211 header-end)))))) 211 header-end))))))
212 212
213 ;;; Find a buffer to use. 213 ;;; Find a buffer to use.
214 (switch-to-buffer (get-buffer-create texinfo-region-buffer-name)) 214 (switch-to-buffer (get-buffer-create texinfo-region-buffer-name))
215 (setq buffer-read-only t)
216 (let ((inhibit-read-only t))
215 (erase-buffer) 217 (erase-buffer)
216 ;; Insert the header into the buffer. 218 ;; Insert the header into the buffer.
217 (insert header-text) 219 (insert header-text)
218 ;; Insert the region into the buffer. 220 ;; Insert the region into the buffer.
219 (insert-buffer-substring 221 (insert-buffer-substring
311 (goto-char (point-min)) 313 (goto-char (point-min))
312 (texinfo-format-scan) 314 (texinfo-format-scan)
313 (goto-char (point-min)) 315 (goto-char (point-min))
314 (Info-tagify input-buffer) 316 (Info-tagify input-buffer)
315 (goto-char (point-min)) 317 (goto-char (point-min))
316 (message "Done."))) 318 (message "Done."))))
317 319
318 ;;;###autoload 320 ;;;###autoload
319 (defun texi2info (&optional nosplit) 321 (defun texi2info (&optional nosplit)
320 "Convert the current buffer (written in Texinfo code) into an Info file. 322 "Convert the current buffer (written in Texinfo code) into an Info file.
321 The Info file output is generated in a buffer visiting the Info file 323 The Info file output is generated in a buffer visiting the Info file