emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c-offset-alist corner case failure?


From: Alan Mackenzie
Subject: Re: c-offset-alist corner case failure?
Date: Thu, 9 Mar 2006 10:40:37 +0000 (GMT)

Hi, Karl!

On Wed, 8 Mar 2006, Karl Fogel wrote:

>In GNU Emacs 22.0.50.5 (i686-pc-linux-gnu) of 2005-12-17:

>I was looking for a way to avoid this indentation in C mode:

>    return rtq_error_create(
>                            RTQ_ERR_NODE_UNKNOWN_KIND, NULL, <=========
>                            _("Unrecognized node kind: '%s'"),
>                            rtq_path_local_style(path, pool));

>I wanted (indeed, expected) to get something like this instead:

>    return rtq_error_create(
>      RTQ_ERR_NODE_UNKNOWN_KIND, NULL,
>      _("Unrecognized node kind: '%s'"),
>      rtq_path_local_style(path, pool));

>Luckily, ....

Hey man, this isn't luck!

> .... the variable 'c-offsets-alist' seemed to have a way to
>control this, via the 'arglist-cont' element:

>   arglist-cont -- Subsequent argument list lines when no
>                   arguments follow on the same line as the
>                   arglist opening paren.

The pertinent line is actually an arglist-intro, which you can see by
doing C-c C-s.  You could also do C-c C-o and play around with the
indentation interactively.

[ .... ]

>Does everyone else see the same behavior?  Am I misinterpreting the
>documentation of 'arglist-cont', or is there a buglet here?

The critical word in the description of arglist-cont is "Subsequent" - it
doesn't apply to the first such line.  However, perhaps it isn't obvious
that the line with the paren doesn't count as the first argument list
line.  Would it be better to make this

  arglist-cont -- Second and subsequent argument list lines
                  ^^^^^^^^^^^
                  when no arguments follow on the same line as
                  the arglist opening paren.

, or perhaps

  arglist-cont -- Subsequent argument list lines (after an
                                                 ^^^^^^^^^
                  arglist-intro) when no arguments follow on
                  ^^^^^^^^^^^^^^^
                  the same line as the arglist opening paren.

?  Or could you perhaps suggest a better way to remove the confusion?
There are several *-cont syntactic symbols described with "subsequent".

>-Karl

-- 
Alan Mackenzie (Munich, Germany)







reply via email to

[Prev in Thread] Current Thread [Next in Thread]