[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: iff?
From: |
Marius Vollmer |
Subject: |
Re: iff? |
Date: |
30 Apr 2001 17:19:30 +0200 |
User-agent: |
Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 |
Rob Browning <address@hidden> writes:
> Marius Vollmer <address@hidden> writes:
>
> > If this is too tricky, what about having a special form `doc' that
> > applies to the current body (via special recognition in
> > scm_m_expand_body).
> >
> > (define (foo)
> > (doc
> > :short "Foo around."
> > "Foo around a little.")
> > ...)
>
> Clear designations like this seem good to me, though don't you have a
> problem with a function that calls a sub-function named doc?
>
> (define (doc x) ...)
>
> (define (foo)
> (doc "Is this a doc string or not?"))
No, `doc' would just be binding, like `let' and `lambda'. You could
overwrite it normally.
> An alternative would be to embed notation in the strings, [...]
I don't like that, stylistically. We should use Lisp syntax for
markup, ideally.
Instead of `doc', we could just use `quote' and stay portable:
(define (foo)
'((summary "Foo around.")
(main "Foo around a little."))
...)
It would be a straight generalization of a docstring: a doclist.
Parsing this should be trivial compared to a SGMLish markup. We
already use TeXinfo markup in the docstrings, so if anything we should
use TeXinfo style, I'd say.
(define (foo)
"@summary{Foo around.}
Foo around a little."
...)
> Actually, what I'd *really* like is an easy way to have fill-paragraph
> work properly on the doc strings :>
Yes! I didn't look carefully enough at what people have already
produced for Emacs, but maybe such a thing already exists?
- Re: iff?, (continued)
- Re: iff?, Neil Jerram, 2001/04/21
- Re: iff?, Yuk-Wah Wong, 2001/04/21
- Re: iff?, Keith Wright, 2001/04/21
- Re: iff?, Jim Blandy, 2001/04/21
- Re: iff?, Rob Browning, 2001/04/24
- Re: iff?, Jim Blandy, 2001/04/24
- Re: iff?, Marius Vollmer, 2001/04/24
- Re: iff?, Rob Browning, 2001/04/25
- Re: iff?, Ivan Toshkov, 2001/04/25
- Re: iff?, Matthias Koeppe, 2001/04/25
- Re: iff?,
Marius Vollmer <=
- Re: iff?, Jim Blandy, 2001/04/25
- Re: iff?, thi, 2001/04/27
Re: iff?, Florian Weimer, 2001/04/25