mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-23 20:05:32 +02:00
* hacks.el: Some handy helper functions for working on the manual.
This commit is contained in:
parent
7d12f03367
commit
4320facb00
1 changed files with 16 additions and 0 deletions
16
doc/hacks.el
Normal file
16
doc/hacks.el
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
;;;; hacks.el --- a few functions to help me work on the manual
|
||||||
|
;;;; Jim Blandy <jimb@red-bean.com> --- October 1998
|
||||||
|
|
||||||
|
(defun jh-exemplify-region (start end)
|
||||||
|
(interactive "r")
|
||||||
|
(save-excursion
|
||||||
|
(save-restriction
|
||||||
|
(narrow-to-region start end)
|
||||||
|
|
||||||
|
;; Texinfo doesn't handle tabs well.
|
||||||
|
(untabify (point-min) (point-max))
|
||||||
|
|
||||||
|
;; Quote any characters special to texinfo.
|
||||||
|
(goto-char (point-min))
|
||||||
|
(while (re-search-forward "[{}@]" nil t)
|
||||||
|
(replace-match "@\\&")))))
|
Loading…
Add table
Add a link
Reference in a new issue