unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Kenichi Handa <handa@m17n.org>
Cc: Alan Mackenzie <acm@muc.de>, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [handa@m17n.org: C indentation problem]
Date: Tue, 30 Apr 2019 14:11:05 +0100	[thread overview]
Message-ID: <87muk7hc46.fsf@tcd.ie> (raw)
In-Reply-To: <E1FW1WM-0001Mg-00@etlken> (Kenichi Handa's message of "Wed, 19 Apr 2006 10:30:18 +0900")

Kenichi Handa <handa@m17n.org> writes:

> In article <Pine.LNX.3.96.1060418211302.439V-100000@acm.acm>, Alan Mackenzie <acm@muc.de> 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



  reply	other threads:[~2019-04-30 13:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1FTnAc-0004Fk-15@fencepost.gnu.org>
2006-04-18 22:15 ` [handa@m17n.org: C indentation problem] Alan Mackenzie
2006-04-19  1:30   ` Kenichi Handa
2019-04-30 13:11     ` Basil L. Contovounesios [this message]
2019-05-20 13:51       ` Basil L. Contovounesios
2019-05-21 10:32       ` Alan Mackenzie
2019-05-21 10:57         ` Basil L. Contovounesios
2019-05-21 12:00           ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87muk7hc46.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).