all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oleh Krehel <oleh@oremacs.com>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: CC-mode highlight change between 24.5 and 25
Date: Tue, 06 Sep 2016 15:37:55 +0200	[thread overview]
Message-ID: <874m5tp2rw.fsf@oremacs.com> (raw)
In-Reply-To: <20160905152034.GA4899@acm.fritz.box> (Alan Mackenzie's message of "Mon, 5 Sep 2016 15:20:35 +0000")

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

Hi Alan,

Alan Mackenzie <acm@muc.de> writes:

> I was a little over confident in my brace counting.  The code was
> landing at the "class" inside the template delimiters, and moving
> forward over the "{", then saying "I'm now at the top level inside a
> class".  Rubbish!
>
> I've (hopefully) corrected that in the patch that follows which, again,
> is the full patch which should apply to the savannah master.  (Please
> just discard the patch from yesterday.)
>
> So, please try out the following, and let me know, again, how it copes
> with real C++ code.  Thanks!

I'm testing the updated code. Looks much better. But I attach an example
where it still highlights a variable as a function. It's a strange
example as well: the comments and previous statements are significant. I
reduced the code to around 10 lines and it's not easy to reduce further.

Here's how I test it:

    emacs -Q cctest.cc

The variable `gfs' is highlighted as a function. The highlight is quite
volatile: adding a newline before the line removes the highlight.

Oleh


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: cctest.cc --]
[-- Type: text/x-c++src, Size: 552 bytes --]

template<class GV>
void example01b_Q2 (const GV& gv)
{
  // <<<1>>> Choose domain and range field type
  typedef typename GV::Grid::ctype Coord;
  typedef double Real;

  // <<<2>>> Make grid function space
  typedef Dune::PDELab::QkLocalFiniteElementMap<GV,Coord,Real,2> FEM;
  FEM fem(gv);
  // typedef Dune::PDELab::NoConstraints CON;
  typedef Dune::PDELab::ConformingDirichletConstraints CON; // constraints class
  typedef Dune::PDELab::ISTLVectorBackend<> VBE;
  typedef Dune::PDELab::GridFunctionSpace<GV,FEM,CON,VBE> GFS;
  GFS gfs(gv,fem);
}

  reply	other threads:[~2016-09-06 13:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02 11:58 CC-mode highlight change between 24.5 and 25 Oleh Krehel
2016-09-02 13:27 ` Alan Mackenzie
2016-09-02 14:10   ` Yuri Khan
2016-09-02 14:40     ` Alan Mackenzie
2016-09-02 17:39       ` Davis Herring
2016-09-02 17:48         ` Eli Zaretskii
2016-09-04 22:29         ` Alan Mackenzie
2016-09-02 14:18   ` Oleh Krehel
2016-09-02 14:31     ` Alan Mackenzie
2016-09-02 17:21       ` Davis Herring
2016-09-04 15:38     ` Alan Mackenzie
2016-09-05  9:27       ` Oleh Krehel
2016-09-05 15:20         ` Alan Mackenzie
2016-09-06 13:37           ` Oleh Krehel [this message]
2016-09-06 17:02             ` Alan Mackenzie
2016-09-07 14:10               ` Alan Mackenzie
2016-09-09 10:01                 ` Oleh Krehel
2016-09-11 21:22                   ` 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

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

  git send-email \
    --in-reply-to=874m5tp2rw.fsf@oremacs.com \
    --to=oleh@oremacs.com \
    --cc=acm@muc.de \
    --cc=emacs-devel@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.