This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Emacs tool for docstrings
- To: mstachow at alum dot mit dot edu
- Subject: Re: Emacs tool for docstrings
- From: "Greg J. Badros" <gjb at cs dot washington dot edu>
- Date: 14 Jan 2000 20:34:27 -0800
- Cc: Mikael Djurfeldt <djurfeldt at nada dot kth dot se>, guile at sourceware dot cygnus dot com
- References: <E129Irl-0004rX-00@mdj.nada.kth.se> <387FD7A2.43B4E62E@alum.mit.edu>
mstachow@alum.mit.edu writes:
> Mikael Djurfeldt wrote:
> >
> > (I'd better repeat this in a letter with fewer lines in order to
> > increase reading probability. :)
> >
> > I could contribute an editing tool tomorrow morning (have to go to bed
> > now). The tool will at least be able to remove/add \n\ (or break into
> > multiple strings).
> >
> > Tomorrow morning, I'd like to use this tool to fix the docstrings and
> > commit this so that the development sources are ANSI compliant.
> >
> > Do I have a go signal for this change?
> >
> > Which version would you like me to use? \n\ or "..." "..." ?
>
> On second thought, I like "..." "..." better, ignore my previous
> message to the contrary. Let's have the docstrings not contain newlines
> except explicit ones for paragraph breaks.
Just be careful about not forgetting the whitespace at the end of the
strings. E.g., the below is *wrong*:
"This function does something."
"Here is what it does. It takes this arg and"
"that arg, etc."
Instead, be sure we get:
"This function does something. "
"Here is what it does. It takes this arg and "
"that arg, etc. "
And I think it may be better to actually have a newline at the end of
the synopsis string:
"This function does something.\n"
"Here is what it does. It takes this arg and "
"that arg, etc. "
but I don't think the Emacs commands should do that.
Be sure to test with the docstrings in numbers.c -- there are embedded
backslashed quotes there that may bite your regular expressions. You
may want to consider just tweaking my script to do the conversion
(although using "" has more cases to handle than \n\, so its a little
bit harder).
Greg