From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: [handa@m17n.org: C indentation problem] Date: Tue, 30 Apr 2019 14:11:05 +0100 Message-ID: <87muk7hc46.fsf@tcd.ie> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="56303"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Alan Mackenzie , rms@gnu.org, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 30 15:11:49 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLSXz-000EWC-PS for ged-emacs-devel@m.gmane.org; Tue, 30 Apr 2019 15:11:47 +0200 Original-Received: from localhost ([127.0.0.1]:47098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLSXy-0000Nb-RP for ged-emacs-devel@m.gmane.org; Tue, 30 Apr 2019 09:11:46 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLSXO-0000KU-TP for emacs-devel@gnu.org; Tue, 30 Apr 2019 09:11:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLSXN-0008EG-QE for emacs-devel@gnu.org; Tue, 30 Apr 2019 09:11:10 -0400 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:33700) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLSXN-0008Cq-3v for emacs-devel@gnu.org; Tue, 30 Apr 2019 09:11:09 -0400 Original-Received: by mail-wm1-x32a.google.com with SMTP id z6so2341824wmi.0 for ; Tue, 30 Apr 2019 06:11:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=HNoMRbF+seEy3qlgnGWdqI8GO4kkeiKWEXxdObgTIvY=; b=srr6+xCSAdCzQBltwk6tB/RHfWxRsRoaVNG0JUuNlwm0gg2oQf++S/SIwzbmdrTpSY pJyBGBcE0y/7CPH1E7S6qoV8GJ99PPuEsXosCT1RZx6Yc5QZipfQLf7rGzYmDqBITa0V v3G43nTZaEwNdICFm2pzRArWvlf+tnyZ8tSQq56WAv0LHi4yByTRrPcQEd5l51z3hNIs tiqMZYsrn+KZJPtXmixJezgCivD5gRCli5Aj/OXyXUgGBqoEmAuj+GGeczkbD8Za48H3 Q47+4psA81vK8NrcxOAKk8M44rz0xXet57288cz+lz07NV5WKuQpYSn7d8Z+Cjg1ZAZ6 E/Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=HNoMRbF+seEy3qlgnGWdqI8GO4kkeiKWEXxdObgTIvY=; b=jyHqkIApBrQ2rMjxRnXwwqVJzthp570XxNzV5ikW1D3NM0zi9jHCjMoCuEJJ4rfdcm dWrfI7wbXGL+GD9wG0vnSEZgG7v7koLUWGUwY6vULTChA2a6rRhaaMf2c+YJpFUZskRw NlETfycjYK7TwHx/C9rmMP54zEb1JRaIqfrkdSPQWwAbnICXUJvPegUV5hJtO+FzHVOm AHiG2plJptSn621eS3+1MIZS5WZ5KT+Te6LU/Qw0UfMoqQbfGPBp2LnQ/eHO0PLM42SS /Iy1aYfG/l1OiIn0YrUjXXf+H+8Dlyqb960heE/zRe+GZ2BRNmXyjuSlHna1u2xiSYEf 43gw== X-Gm-Message-State: APjAAAVreNq7CwvMHFi39qyAC42Ex/Y+0skGCMmlOaB2c8DwS/imD57G nZVk+YiGjEp7gPrVUuOWdeSZMg== X-Google-Smtp-Source: APXvYqwhGbRE6Dx5+7/B/+Gr5Ypl10hVFU8+fpRzLzCoIqTQ8KZegDSrI40hTxarDsmYLW2OyUbYug== X-Received: by 2002:a1c:f119:: with SMTP id p25mr3080386wmh.4.1556629867902; Tue, 30 Apr 2019 06:11:07 -0700 (PDT) Original-Received: from localhost ([163.172.211.46]) by smtp.gmail.com with ESMTPSA id d11sm33643718wrc.32.2019.04.30.06.11.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Apr 2019 06:11:07 -0700 (PDT) In-Reply-To: (Kenichi Handa's message of "Wed, 19 Apr 2006 10:30:18 +0900") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236049 Archived-At: Kenichi Handa writes: > In article , Alan Mackenzie writes: > >> Sometime between Emacs 21 and Emacs 22 CVS, the indentation in the actual >> source code was changed from: > >> Emacs 21 sources: >> ######################################################################### >> DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "p", >> "Move point right N characters (left if N is negative).\n\ >> On reaching end of buffer, stop and signal error.") >> (n) <====== indentation of 2 columns. >> Lisp_Object n; <====== indentation of 5 columns. >> ######################################################################### > >> to > >> Emacs 22 sources: >> ######################################################################### >> DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "p", >> doc: /* Move point right N characters (left if N is negative). >> On reaching end of buffer, stop and signal error. */) >> (n) <====== indentation of 5 columns. >> Lisp_Object n; <====== indentation of 5 columns. >> ######################################################################### > > Ah! Yes. I personally prefer Emacs 21 style (perhaps just > because I used to it for long time). > >> However, CC Mode 5.28 seems to me to indent like the Emacs 22 sources are >> indented, i.e. column 5, and 5. CC Mode 5.33.2 also indents "Emacs 22-style", i.e. to 5 columns, but the current sources, AFAICS, are indented to 2 columns, "Emacs 21-style". >> I suggest the following: a new lineup function, >> c-lineup-gnu-DEFUN-intro-cont which would be active only in GNU style, >> and would give the offset knr-argdecl-intro (i.e. 5) for the lines >> between DEFUN's closing paren and the function's opening brace. This new >> function would be tried only if the existing c-lineup-topmost-intro-cont >> returns nil. Shouldn't the now-existing c-lineup-gnu-DEFUN-intro-cont be changed accordingly, to indent to 2 columns instead of 5? >> Question: Are there any other C macros, besides DEFUN, whose indentation >> is also broken at the moment? (I do not know the C source at all well.) > > All I noticed is the DEFUN case. I too have yet to notice a problem with other macros. Thanks, -- Basil