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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9484 in the body.
You can then email your comments to 9484 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9484; Package emacs. (Mon, 12 Sep 2011 16:10:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to 彥瑾 <coldnew.tw <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 12 Sep 2011 16:10:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 彥瑾 <coldnew.tw <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: scheme-indent-function bug?
Date: Mon, 12 Sep 2011 22:59:42 +0800
[Message part 1 (text/plain, inline)]
Dear:
             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
                                )

               and this will make my scheme compiler error ( I try both
gambit-c and racket)

               if I write a simple emacs lisp

              (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

               maybe this is a scheme-mode's bug ?
[Message part 2 (text/html, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9484; Package emacs. (Tue, 13 Sep 2011 04:08:02 GMT) Full text and rfc822 format available.

Message #8 received at 9484 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: coldnew.tw <at> gmail.com
Cc: 9484 <at> debbugs.gnu.org
Subject: Re: 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.




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Tue, 13 Sep 2011 07:06:01 GMT) Full text and rfc822 format available.

Notification sent to 彥瑾 <coldnew.tw <at> gmail.com>:
bug acknowledged by developer. (Tue, 13 Sep 2011 07:06:02 GMT) Full text and rfc822 format available.

Message #13 received at 9484-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 9484-done <at> debbugs.gnu.org
Subject: Re: bug#9484: scheme-indent-function bug?
Date: Tue, 13 Sep 2011 03:01:05 -0400
I have given scheme-indent-function a doc-string and am closing this.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 Oct 2011 11:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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