Edit: to make it clear, I am asking whether anyone knows of a mode that would be better than lisp-mode.
I'm currently using lisp-mode for [The Knowledge Machine](https://www.cs.utexas.edu/~mfkb/km.html) .km files, but it is not indenting things the way the documentation shows it. For example, this is how the handbook represents the following:
(parts has
(instance-of (Slot))
(domain (Physobj))
(range (Physobj))
(cardinality (1-to-N))
(inverse (part-of))
(subslots (mechanical-parts body-parts)))
(mechanical-parts has
(instance-of (Slot))
(superslots (parts)))
(wheel-count has
(instance-of (Slot))
(domain (Vehicle))
(range (Integer))
(cardinality (N-to-1)))
but when I indent the region containing it in lisp-mode, I get:
(parts has
(instance-of (Slot))
(domain (Physobj))
(range (Physobj))
(cardinality (1-to-N))
(inverse (part-of))
(subslots (mechanical-parts body-parts)))
(mechanical-parts has
(instance-of (Slot))
(superslots (parts)))
(wheel-count has
(instance-of (Slot))
(domain (Vehicle))
(range (Integer))
(cardinality (N-to-1)))
the problem (stuff pushed way out to the right) is worse for concepts that have longer names than `wheel-count`. I'm sure that there must be, if not a dedicated KM mode that I simply cannot find, an existing mode that can be customized to produce the handbook formatting, but I can't find it.
Edit 2: added a couple of more example declarations, all from page 12 of the [KM user manual](https://www.cs.utexas.edu/users/mfkb/km/userman.pdf) (pdf).