2
0

texinfo-hacks.el 651 B

123456789101112131415161718
  1. ;;;; hacks.el --- a few functions to help me work on the manual
  2. ;;;; Jim Blandy <jimb@red-bean.com> --- October 1998
  3. ;;;; -- imported from https://git.savannah.gnu.org/cgit/guile.git/tree/doc/hacks.el
  4. ;;;; This code should be covered by the same license as GNU Guile (GPL3).
  5. (defun jh-exemplify-region (start end)
  6. (interactive "r")
  7. (save-excursion
  8. (save-restriction
  9. (narrow-to-region start end)
  10. ;; Texinfo doesn't handle tabs well.
  11. (untabify (point-min) (point-max))
  12. ;; Quote any characters special to texinfo.
  13. (goto-char (point-min))
  14. (while (re-search-forward "[{}@]" nil t)
  15. (replace-match "@\\&")))))