From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#9484: scheme-indent-function bug? Date: Tue, 13 Sep 2011 00:02:42 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1315886629 5618 80.91.229.12 (13 Sep 2011 04:03:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Sep 2011 04:03:49 +0000 (UTC) Cc: 9484@debbugs.gnu.org To: coldnew.tw@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 13 06:03:44 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R3KDo-0000ng-5x for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Sep 2011 06:03:44 +0200 Original-Received: from localhost ([::1]:47870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3KDn-0002D8-KT for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Sep 2011 00:03:43 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3KDj-00028v-SZ for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 00:03:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3KDi-0006qG-Fs for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 00:03:39 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3KDi-0006qC-D0 for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 00:03:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R3KHy-0006gx-Pr; Tue, 13 Sep 2011 00:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Sep 2011 04:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9484 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9484-submit@debbugs.gnu.org id=B9484.131588684225660 (code B ref 9484); Tue, 13 Sep 2011 04:08:02 +0000 Original-Received: (at 9484) by debbugs.gnu.org; 13 Sep 2011 04:07:22 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3KHC-0006fg-Qe for submit@debbugs.gnu.org; Tue, 13 Sep 2011 00:07:21 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3KH8-0006fU-DW for 9484@debbugs.gnu.org; Tue, 13 Sep 2011 00:07:12 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1R3KCo-0007FK-J9; Tue, 13 Sep 2011 00:02:42 -0400 X-Spook: bemd dictionary quarter John Kerry NATO MD5 Europol spy X-Ran: -XA=J5]oW%>(hN;`pW6%_JUnXg'\0nsrhw@_7>Ex!sQvZ-64J})jh,5+g ("=?UTF-8?Q?=E5=BD=A5=E7=91=BE?="'s message of "Mon, 12 Sep 2011 22:59:42 +0800") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 13 Sep 2011 00:08:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51084 Archived-At: > I want to make c-declare function likes following > > (c-declare #< > #include > 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 #< > #include > 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.