unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* C mode bug
@ 2006-06-28 11:11 Paul Pogonyshev
  2006-07-01 14:10 ` Alan Mackenzie
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Pogonyshev @ 2006-06-28 11:11 UTC (permalink / raw)


In template specialization (C++) C mode gives incorrect indentation
when function name is given on separate line:

  template <>
  struct test <int>
  {
    void
    function ()
    { }
  };

is indented as

  template <>
  struct test <int>
  {
    void
      function ()
    { }
  };

Paul

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: C mode bug
  2006-06-28 11:11 C mode bug Paul Pogonyshev
@ 2006-07-01 14:10 ` Alan Mackenzie
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Mackenzie @ 2006-07-01 14:10 UTC (permalink / raw)
  Cc: bug-cc-mode, emacs-devel

Hi, Paul.

On Wed, Jun 28, 2006 at 02:11:09PM +0300, Paul Pogonyshev wrote:
> In template specialization (C++) C mode gives incorrect indentation
> when function name is given on separate line:
> 
>   template <>
>   struct test <int>
>   {
>     void
>     function ()
>     { }
>   };
 
> is indented as
> 
>   template <>
>   struct test <int>
>   {
>     void
>       function ()
>     { }
>   };

Thanks for this!  I agree it is a bug.  Without the template stuff, the
syntactic context (do C-c C-s to get this) of the "void" line is

((inclass 3186) (topmost-intro 3184))

.  With the template stuff, it becomes

((defun-block-intro 3185))

.  I'll look into this and try and fix it.

Just for future reference, it would be appreciated if people could send a
cc to <bug-cc-mode@gnu.org> for CC Mode bugs.  Also, a complete
configuration dump (generated by C-c C-b) is often useful
(though it wasn't necessary for the current bug report).

Thanks again!

> Paul

-- 
Alan Mackenzie (Munich, Germany)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-01 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-28 11:11 C mode bug Paul Pogonyshev
2006-07-01 14:10 ` Alan Mackenzie

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).