[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10094: 24.0.91; M-C-q indents LOOP wrong
From: |
Helmut Eller |
Subject: |
bug#10094: 24.0.91; M-C-q indents LOOP wrong |
Date: |
Mon, 21 Nov 2011 17:49:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) |
* Lars Magne Ingebrigtsen [2011-11-21 16:05] writes:
> If you use `common-lisp-indent-function', and you type in the following
> function (using TAB) to indent, you get the following:
>
> (defun foo ()
> (loop for z from 1 upto 5
> do (princ z)
> (terpri)))
>
> If you then `M-C-q' to fill the function, you end up with this:
>
> (defun foo ()
> (loop for z from 1 upto 5
> do (princ z)
> (terpri)))
>
> I've debugged this slightly, and the problem seems to be that
> `calculate-lisp-indent' is called to compute the indentation of the DO,
> but then isn't called to compute the indentation of the forms.
>
> I don't have time to debug this further right now, but unless anybody
> has an obvious solution to this, I'll try to fix this myself.
This is my fix for the problem:
(setq lisp-simple-loop-indentation 1)
(setq lisp-loop-keyword-indentation 6)
(setq lisp-loop-forms-indentation 6)
It's an old problem:
http://lists.gnu.org/archive/html/emacs-devel/2009-10/threads.html#00649
Helmut