[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Speaking of Syntax
Date: Tue, 10 Nov 87 07:03:43 PST
From: David Kriegman <kriegs@coyote.stanford.edu>
Speaking of defining syntaxes, I've defined some syntaxes such as
has been mentioned, and I'd like the editor to be "smart" about the
syntax when it formats the s-expression. The default s-expression
puts in too many spaces. My syntax looks something like this:
(def-animal BABOON
:species monkey
:weight (0 100)
:color brown)
You get the picture. def-animal, followed by an atom followed by
a list of keywords. I'd like zmacs to format it as above but it
formats it like this:
(def-animal BABOON
:species monkey
:weight (0 100)
:color brown)
It does what you want when I try it.
(defmacro def-animal (animal-name &body properties)
`(defprop ,animal-name ,(copy-list properties) animal-properties))
(def-animal BABOON
:species monkey
:weight (0 100)
:color brown)
If you make the mistake of using &REST instead of &BODY you get
(def-animal BABOON
:species monkey
:weight (0 100)
:color brown)
I don't know how you managed to get the indentation you got.
barmar