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: Mon, 20 May 2019 14:51:11 +0100 Message-ID: <8736l9jkts.fsf@tcd.ie> References: <87muk7hc46.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="245227"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: handa , rms@gnu.org, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 20 15:52:00 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 1hSihs-0011ev-0V for ged-emacs-devel@m.gmane.org; Mon, 20 May 2019 15:52:00 +0200 Original-Received: from localhost ([127.0.0.1]:36043 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSihr-0007um-2E for ged-emacs-devel@m.gmane.org; Mon, 20 May 2019 09:51:59 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSihD-0007uf-Df for emacs-devel@gnu.org; Mon, 20 May 2019 09:51:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSihB-0005bj-Ga for emacs-devel@gnu.org; Mon, 20 May 2019 09:51:19 -0400 Original-Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]:42015) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSih9-0005Zq-Lv for emacs-devel@gnu.org; Mon, 20 May 2019 09:51:17 -0400 Original-Received: by mail-ed1-x542.google.com with SMTP id l25so23949614eda.9 for ; Mon, 20 May 2019 06:51:15 -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=29VAkA19xNGR1JUyHp0fJuU7EUvxumGTcEDLBQup1vQ=; b=JTiO8PkwmENiNSLndS13Nusbwqz1FYlETMn4nQ3Qj1PTB2pTcuIegTQZu7EUoXPqk2 vqIWZkwS/cGJXBQiDBiSIvkEMwyegL/MsUZf+1XJbG3MF1KHtYTbzwHTsV2mYzVAH6Vx +GNtNYsKf2Qcrw6IYJV4Rw//mhCn2s4IB4DgHdZMYmuqXVxR+rsgJExJkHmOwqNof1Tm eENjJ4kTIJ6FYduMR0DRu4mPNeBL7H9FepiKDdw9reklXyvG2aurkfgZFsiCOF6CdyYq VA/RU71xHUo49kaij3t/y1ltLxzQ3y4yfQdUNFvW3h1geRassSz8UbK1dRUaUSjVn76M fGKA== 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=29VAkA19xNGR1JUyHp0fJuU7EUvxumGTcEDLBQup1vQ=; b=FXQQ8VoHTrV+CYWRyq/0pFR/Bj4Vugq6gns789xnw8mCZ7h4URC55ILkQGcaKP6ttW cK9JQ20RMwakP/HfVxIdnixdV3pOwpI7rs73a5vvg6DH3UfIEF+HMvuHGtd/2VkvPmxa 7tDe62PVFdYPDJ3bkvK6RgRAI5bASEG5hv0yNqkN8KTn6itRS1lzkJnc0Y+4imO6/q3Z D9h6XYJcycKkP8EguVcX++asRfXCftMcvHf2kGZZUe+xeC2g8nQRa+CPnxKZJnO8s4MK 4Gdxs4hxT9YloOQZcbkWDpZz/kEI3aODik9EUBH/Fwrp3GzvXTnlpyLrs9EhE/CEvYKj 2W6Q== X-Gm-Message-State: APjAAAXFoshJN3YGHnwcmcdtmQqVZkPLSLjIpdgwI470ORQrhn1lSVP8 4EhovYEWE5UMajucP+tQqE1mxg== X-Google-Smtp-Source: APXvYqz/TDA1oMBWbYfcaegBvCVwj86jrJJBmvTP8BEGG7wHvPPK9GunOC1O+9svGuekTE72ZWpDwQ== X-Received: by 2002:a17:906:e282:: with SMTP id gg2mr3993452ejb.38.1558360273963; Mon, 20 May 2019 06:51:13 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:6fa:38d6:1fce:ddb3]) by smtp.gmail.com with ESMTPSA id dv13sm3105360ejb.32.2019.05.20.06.51.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 20 May 2019 06:51:13 -0700 (PDT) In-Reply-To: <87muk7hc46.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 30 Apr 2019 14:11:05 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::542 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:236794 Archived-At: "Basil L. Contovounesios" writes: > 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? Any thoughts on this? >>> 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