I'm trying to diagnose why my slime setup sometimes indents 'WITH' and other macros correctly, and other times indents them too far to the right. If I edit the file in lisp mode, it often doesn't work, but in slime mode, it usually does, depending on if I loaded the file before or after slime mode was running. At least I think that's correct.
What variables or settings can I track down to figure out why lisp mode and slime mode are not indenting the same way?
jcm@sdf.lonestar.org writes:
I'm trying to diagnose why my slime setup sometimes indents 'WITH' and other macros correctly, and other times indents them too far to the right. If I edit the file in lisp mode, it often doesn't work, but in slime mode, it usually does, depending on if I loaded the file before or after slime mode was running. At least I think that's correct.
What variables or settings can I track down to figure out why lisp mode and slime mode are not indenting the same way?
If you load code into the image, Swank transmits indentation information to Emacs based on a macro's arglist.
-T.
jcm@sdf.lonestar.org writes:
I'm trying to diagnose why my slime setup sometimes indents 'WITH' and other macros correctly, and other times indents them too far to the right. If I edit the file in lisp mode, it often doesn't work, but in slime mode, it usually does, depending on if I loaded the file before or after slime mode was running. At least I think that's correct.
What variables or settings can I track down to figure out why lisp mode and slime mode are not indenting the same way?
If you load code into the image, Swank transmits indentation information to Emacs based on a macro's arglist.
So 'correct' indentation depends on editing code from within a running image?
jcm@sdf.lonestar.org writes:
If you load code into the image, Swank transmits indentation information to Emacs based on a macro's arglist.
So 'correct' indentation depends on editing code from within a running image?
Yes.
Alternatively, you can manually add the necessary information for Emacs by putting the respective symbol and its indentation spec on the plist of `common-lisp-indent-function' in your .emacs, or in the local variables list in your .lisp files. See 13.7 in the Elisp manual for a description of the indentation specs.
Or hack up some elisp to look for something like DECLAIM-INDENTATION whenever you open a .lisp file and retrieve the indentation spec from that.
-T.