GNU bug report logs - #9484
scheme-indent-function bug?

Previous Next

Package: emacs;

Reported by: 彥瑾 <coldnew.tw <at> gmail.com>

Date: Mon, 12 Sep 2011 16:10:03 UTC

Severity: minor

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Glenn Morris <rgm <at> gnu.org>
To: coldnew.tw <at> gmail.com
Cc: 9484 <at> debbugs.gnu.org
Subject: bug#9484: scheme-indent-function bug?
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.




This bug report was last modified 13 years and 253 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.