Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 155292 - syntax highlighting wrong for c++
Summary: syntax highlighting wrong for c++
Alias: None
Product: Fedora
Classification: Fedora
Component: emacs
Version: 3
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jens Petersen
QA Contact:
Depends On:
Blocks: EmacsFontLockProblem
TreeView+ depends on / blocked
Reported: 2005-04-18 19:55 UTC by bertrand3000
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 21.4-5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-05-20 20:44:20 UTC

Attachments (Terms of Use)

Description bertrand3000 2005-04-18 19:55:53 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1

Description of problem:
Syntax highlighting is wrong in C++ mode : variables and function names are incorrectly colored like type names.

This works correctly in C-mode, and this even works in C++ mode in Emacs 21.3 shipped with other distributions like Slackware 10, so I believe this is a Fedora-only bug.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Open a new buffer, then copy-paste the following code :

static int var = 0;

void foo()

Actual Results:  Type M-x c-mode. Observe that static is magenta, int and void are green, var is yellow and foo is blue.

Now, type M-x c++-mode : var and foo turns green.

Expected Results:  var should be yellow and foo should be blue.

Additional info:

Emacs with X11, global-font-lock-mode on, tested with .emacs temporary deleted.

Comment 1 Jens Petersen 2005-05-18 03:49:47 UTC
I'm not able to reproduce this either.

Comment 2 Jens Petersen 2005-05-19 21:46:41 UTC
I updated cc-mode in emacs-21.4-5 to the latest version, since
that is apparently where the problem is.

Could you please test that to see if it fixes the problem for you,
and if so close this bug as fixed in rawhide.  Thanks.

[Alternatively if you're not able to test the latest emacs from
FC development or rebuild the srpm, you make like to try to install the latest
cc-mode release yourself separately and test that.  See the tracker bug 158044
for the location.]

Comment 3 bertrand3000 2005-05-20 13:30:39 UTC
I have updated to emacs-21.4-5 from FC development and my problem is now fixed !
Thanks ! This bug can be closed now.

Comment 4 Jens Petersen 2005-05-20 20:44:20 UTC
Thanks for testing it.

Note You need to log in before you can comment on or make changes to this bug.