<div dir="ltr">Thanks. This is better than the macros I had.<br><br><div class="gmail_quote">On Sat, Jul 19, 2008 at 11:30 PM, Geoffrey S. Knauth <<a href="mailto:geoff@knauth.org">geoff@knauth.org</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Jul 19, 2008, at 17:43, David Einstein wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Has anyone written any emacs (or any other editor) tools for editing scribble documentation?<br>
</blockquote>
<br></div>
I didn't write anything as nice as a tool. I just defined a few functions to save me some typing:<br>
<br>
(defun s-scm ()<br>
(interactive)<br>
(save-restriction<br>
(narrow-to-region (mark) (point))<br>
(goto-char (point-min))<br>
(insert "@scheme[")<br>
(goto-char (point-max))<br>
(insert "]")))<br>
<br>
(defun s-sb ()<br>
(interactive)<br>
(save-restriction<br>
(narrow-to-region (mark) (point))<br>
(goto-char (point-min))<br>
(insert "@schemeblock[")<br>
(goto-char (point-max))<br>
(insert "]")))<br>
<br>
(defun s-tt ()<br>
(interactive)<br>
(save-restriction<br>
(narrow-to-region (mark) (point))<br>
(goto-char (point-min))<br>
(insert "@tt{")<br>
(goto-char (point-max))<br>
(insert "}")))<br>
<br>
(defun s-fp ()<br>
(interactive)<br>
(save-restriction<br>
(narrow-to-region (mark) (point))<br>
(goto-char (point-min))<br>
(insert "@filepath{")<br>
(goto-char (point-max))<br>
(insert "}")))<br>
<br>
(defun s-item ()<br>
(interactive)<br>
(save-restriction<br>
(narrow-to-region (mark) (point))<br>
(goto-char (point-min))<br>
(insert "@item{")<br>
(goto-char (point-max))<br>
(insert "}")))<br>
<br>
(defun s-it ()<br>
(interactive)<br>
(save-restriction<br>
(narrow-to-region (mark) (point))<br>
(goto-char (point-min))<br>
(insert "@italic{")<br>
(goto-char (point-max))<br>
(insert "}")))<br>
<br>
(defun s-m (type)<br>
(interactive "sType? ")<br>
(save-restriction<br>
(narrow-to-region (mark) (point))<br>
(goto-char (point-min))<br>
(insert "@" type "{")<br>
(goto-char (point-max))<br>
(insert "}")))<br>
<br>
</blockquote></div><br></div>