bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#8438: 24.0.50; C++ macro make indentation fail


From: Andrea Crotti
Subject: bug#8438: 24.0.50; C++ macro make indentation fail
Date: Wed, 13 Apr 2011 11:44:00 +0200
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

Daniel Colascione <address@hidden> writes:

>
> The problem actually has nothing to do with the macro:
> c-forward-decl-or-cast-1 is choking on the const because it's mistaking
> it for something that might be part of a member function pointer.
> Because c-forward-decl-or-cast-1 fails inside
> c-just-after-func-arglist-p, c-guess-basic-offset tries the next best
> thing, which happens to be a template argument continuation.
>
> The attached patch resolves the issue.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
>
> iEYEARECAAYFAk2la/kACgkQ17c2LVA10VtGawCeLYuZ7f1QKHsFgkrYzgWCNevZ
> nwQAoNStOC5JvnSs1G5sU92UrogmFAQW
> =mxeQ
> -----END PGP SIGNATURE-----
>
> === modified file 'lisp/progmodes/cc-engine.el'
> --- lisp/progmodes/cc-engine.el       2011-03-06 17:03:45 +0000
> +++ lisp/progmodes/cc-engine.el       2011-04-13 09:18:47 +0000
> @@ -6475,7 +6475,7 @@
>        ;; `c-font-lock-declarators'.)
>        (while (and (looking-at c-type-decl-prefix-key)
>                 (if (and (c-major-mode-is 'c++-mode)
> -                        (match-beginning 2))
> +                        (match-beginning 3))
>                     ;; If the second submatch matches in C++ then
>                     ;; we're looking at an identifier that's a
>                     ;; prefix only if it specifies a member pointer.

This patch solves the problem for me, also the constructor indentation
is now as it was in emacs 23.





reply via email to

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