rutils icon indicating copy to clipboard operation
rutils copied to clipboard

:+ and :- break indentation of + and - in SLIME

Open orivej opened this issue 11 years ago • 3 comments
trafficstars

Since incf and decf are macros, and macro definitions alter SLIME indentation of all symbols with the same name regardless of their package, loading rutils alters indentation of + and -.

In SBCL, before loading rutils:

(+ (f)
   1
   2)

after loading rutils:

(+ (f)
    1
    2)

This can be fixed either by evaluating (put '+ 'common-lisp-indent-function '(as nil)) (same with '-) in Emacs (and describing this workaround in rutils wherever :+ and :- and defined or documented), or by altering swank:*application-hints-tables* accordingly (as implemented in trivial-indent).

orivej avatar Nov 07 '14 21:11 orivej

I see your point. So, are there any actions that can be taken here on the rutils side?

vseloved avatar Nov 07 '14 22:11 vseloved

Yes; I could propose a patch. Do you prefer to introduce dependency on trivial-indent, or to manipulate swank:*application-hints-tables* directly?

orivej avatar Nov 07 '14 23:11 orivej

I think, using trivial-indent is ok. I have a few more indent changes for other things in mind, as well.

vseloved avatar Nov 08 '14 07:11 vseloved