Subject: bug#9484: scheme-indent-function bug?

From: Glenn Morris <[email-masked]>
Date: Tue, 13 Sep 2011 00:02:42 -0400

> I want to make c-declare function likes following
>
>              (c-declare #<<c-declare-end
>
>               #include <stdio.h>
>               c-declare-end
>               )
>
> but if I use (put 'c-decare 'scheme-indent-function 0) whitch is
> according to scheme wiki
>
> the scheme code will looks like:
>
>              (c-declare #<<c-declare-end
>
>                                #include <stdio.h>
>                                c-declare-end
>                                 )

If the scheme wiki says that

(put 'c-declare 'scheme-indent-function 0)

will give everything 0 indentation, then I believe it is incorrect.
It's a shame scheme-indent-function doesn't have a doc-string, but it
works like the function lisp-indent-function, which does. Quoting that:

* an integer N, meaning indent the first N arguments specially
  like ordinary function arguments and then indent any further
  arguments like a body;

A value of 0 means to indent like `progn' (for example), not "to column 0".

> (defun scheme-indent-dummy (state indent-point normal-indent) 0)
> (put 'c-declare 'scheme-indent-function 'scheme-indent-dummy)
>
> and the scheme's c-declare function will indent as I want

I don't think there is a standard way to say "indent to column N", so
writing a function like that seems the correct way to do it.

I think scheme-indent-function should get a doc-string, but other than
that I do not think there is a bug.