[slime-devel] question on auto-indenting

I'm having trouble with auto-indenting in the slime-1.0alpha tarball release. For instance, I have a macro fixfor, which takes an &body argument, and I'd want this to be indented just 2 spaces. It works fine in the REPL, but doesn't seem to work in files at all, whether they use the package that contains the macro or not. Looking at (swank:print-indentation-lossage), I see both fixfor and :fixfor, even though I don't define :fixfor anywhere as far as I know. Furthermore, neither of these are there when I first start CL --- I guess it must add them when it tries to indent the function or something? In any case, fixfor is only defined in a single package, although it's exported from that package, and that package is used by other packages. fixfor is just one example among many, more generally, I don't feel like autoindenting is "working" for me. Possibly relevant facts: swank:*configure-emacs-indentation* is true. In .emacs, my swank:*communiation-style* is :fd-handler. Any help is appreciated. Cheers, rif

rif <rif@MIT.EDU> writes:
I'm having trouble with auto-indenting in the slime-1.0alpha tarball release. For instance, I have a macro fixfor, which takes an &body argument, and I'd want this to be indented just 2 spaces.
What's your `lisp-indent-function' variable set to in Lisp buffers? You might need this in your lisp-mode-hook: (set (make-local-variable 'lisp-indent-function) 'common-lisp-indent-function) In the CVS version of SLIME you can call (slime-setup) to configure lisp-mode-hook to enable slime, cl indentation, and (optionally) slime autodoc mode.

What's your `lisp-indent-function' variable set to in Lisp buffers?
You might need this in your lisp-mode-hook:
(set (make-local-variable 'lisp-indent-function) 'common-lisp-indent-function)
In the CVS version of SLIME you can call (slime-setup) to configure lisp-mode-hook to enable slime, cl indentation, and (optionally) slime autodoc mode.
Ok, I added that to my lisp-mode-hook. It seemed to work. Maybe that should be in the manual? Or was it, and I just missed it? Also, why do I need it to be a local variable? rif

rif <rif@MIT.EDU> writes:
Ok, I added that to my lisp-mode-hook. It seemed to work. Maybe that should be in the manual? Or was it, and I just missed it?
Now (i.e. post-alpha) the README and manual tell you to use (slime-setup).
Also, why do I need it to be a local variable?
Just to avoid enabling it in e.g. Elisp or Scheme buffers.
participants (2)
-
Luke Gorrie
-
rif