[slime-devel] indentation ???
Pascal J.Bourguignon
pjb at informatimago.com
Mon Oct 11 17:45:04 UTC 2004
Indentation without slime:
(DEFMACRO DEFTRANSLATION (TABLE TEXT LANGUAGE TRANSLATION
&REST LANGS-TRANS)
`(PROGN
(DEFVAR ,TABLE (MAKE-HASH-TABLE :TEST (FUNCTION EQUAL)))
(SETF ,@(DO ((LT (CONS LANGUAGE (CONS TRANSLATION LANGS-TRANS)))
(RESULT ,()))
((NULL LT) (NREVERSE RESULT))
(PUSH `(GETHASH (CONS ,TEXT ,(POP LT)) ,TABLE))
(LET ((TRANS (POP LT)))
(IF (EQ TRANSLATION :IDEM) `,TEXT `,TRANSLATION)))))
);;deftranslation
(DEFUN LOCALIZE (TABLE LANGUAGE TEXT)
"
RETURN: A version of the text in the given language.
"
(LET ((SYM (INTERN-SOFT TEXT TABLE)))
(IF SYM
(LET ((RESULT (GET SYM LANGUAGE)))
(IF RESULT
RESULT
(LOCALIZE TABLE :EN TEXT)))
TEXT)));;localize
Indentation with slime:
(DEFMACRO DEFTRANSLATION (TABLE TEXT LANGUAGE TRANSLATION
&REST LANGS-TRANS)
`(PROGN
(DEFVAR ,TABLE (MAKE-HASH-TABLE :TEST (FUNCTION EQUAL)))
(SETF ,@(DO ((LT (CONS LANGUAGE (CONS TRANSLATION LANGS-TRANS)))
(RESULT ,()))
((NULL LT) (NREVERSE RESULT))
(PUSH `(GETHASH (CONS ,TEXT ,(POP LT)) ,TABLE))
(LET ((TRANS (POP LT)))
(IF (EQ TRANSLATION :IDEM) `,TEXT `,TRANSLATION)))))
);;DEFTRANSLATION
(DEFUN LOCALIZE (TABLE LANGUAGE TEXT)
"
RETURN: A version of the text in the given language.
"
(LET ((SYM (INTERN-SOFT TEXT TABLE)))
(IF SYM
(LET ((RESULT (GET SYM LANGUAGE)))
(IF RESULT
RESULT
(LOCALIZE TABLE :EN TEXT)))
TEXT)));;LOCALIZE
The slime-indentation of &REST is right, but all the rest is wrong.
How could I disable it?
--
__Pascal Bourguignon__ http://www.informatimago.com/
Voting Democrat or Republican is like choosing a cabin in the Titanic.
More information about the slime-devel
mailing list