summaryrefslogtreecommitdiff
path: root/doc/hacks.el
diff options
context:
space:
mode:
authorJim Blandy <jimb@red-bean.com>1998-10-15 21:48:23 +0000
committerJim Blandy <jimb@red-bean.com>1998-10-15 21:48:23 +0000
commit4320facb0015266dd419f92e48fb66f68850dd9a (patch)
tree5990ca99369844a9796aab58f63f898f6489930e /doc/hacks.el
parent7d12f0336780c2cacc3cea75223ce701c2abdace (diff)
downloadguile-4320facb0015266dd419f92e48fb66f68850dd9a.tar.gz
* hacks.el: Some handy helper functions for working on the manual.
Diffstat (limited to 'doc/hacks.el')
-rw-r--r--doc/hacks.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/hacks.el b/doc/hacks.el
new file mode 100644
index 000000000..c5a3f576b
--- /dev/null
+++ b/doc/hacks.el
@@ -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 "@\\&")))))