all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: help-gnu-emacs@gnu.org
Subject: Re: C and C++ highlighting is not working properly (font-lock)
Date: Sun, 1 Jul 2007 18:50:55 +0100	[thread overview]
Message-ID: <20070701175055.GB1735@muc.de> (raw)
In-Reply-To: <1183302449.587716.13630@57g2000hsv.googlegroups.com>

Hi!

On Sun, Jul 01, 2007 at 03:07:29PM -0000, deccard wrote:
> On 30 kes?, 13:13, Alan Mackenzie <a...@muc.de> wrote:
> > Hi!
> >
> > That looks wierd.
> >
> > OK.  To begin with, can you tell me EXACTLY what I have to do to
> > reproduce the problem, beginning with how you start Emacs?

> I'm using emacs through ssh connection on my university's server. The
> problem may lay on their end of the line. So maybe I should direct my
> university's Unix administrator here. I just was wondering if I'm
> doing something wrong.

Ah, ssh!  I don't think you're doing anything wrong at all.  The colours
on your buffer are just so wierd that I don't think it's (solely) Emacs.
However, they're not totally random, either.

> I get the problem very simple way. I start emacs (gemacs myproc.cc)
> and enable the "Syntax Highlighting (Global Font Lock mode)" (F10 s o)

OK.

> > Does it happen as you're
> > typing the C++ program, or when you load an existing C++ file?

> The problem occurs in both cases.

Further evidence that it's possibly not Emacs at fault.

> > It's always best with problems like this to say explicitly what
> > version of Emacs you're using (M-x emacs-version).

> As you can see from the screen shot the version is GNU emacs 21.3.4
> (x86_64-redhat-linux-gnu, X toolkit, Xaw3d scroll bars).
 
Sorry, yes I missed that.
 
> > Often, it's good to dump CC Mode's configuration (C-c C-b); this can
> > be _very_ helpful in diagnosing bugs.

> huh? dump Mode's configuration? Sorry, but I'm pretty new to emacs

Sorry again, I should have explained better.  Welcome to Emacs!

The "major mode" you're in determines the way Emacs works.  For example,
when you're in "Text Mode", Emacs behaves differently from when you're
in "C++ Mode", or "Makefile Mode".  The mode you're in is displayed on
the "Modeline", the second bottom line on your screen.  In your screen
dump, you were in C++ Mode.

"CC Mode" is a family of seven modes for editing C, C++, Java, Objective
C, IDL, Pike and AWK.  In each of them the key binding C-c C-b ("Ctrl-C
followed by Ctrl-B") will create a template bug-report form.  This form
contains the values of the (Lisp) variables which are the CC Mode
configuration.  For some bugs this is VERY helpful for fixing them.  But
I don't think it would help here, though.

> > > I have not added anything to my .emacs.
> >
> > Hmmm.  Since when?  What was in it before you didn't add anything to it?
> > ;-)  If you start emacs with "emacs -q", does the problem go away?
> >
> > Do you have a site-start file (M-x locate-library <CR> site-start.el
> > <CR>)?  If so, what happens when you start emacs with "emacs -q
> > --no-site-file"?
> >

> I meant that I don't have .emacs file at all. I deleted it when I
> noticed the problem, because I wanted to be sure that I had not caused
> the problem by goofing around with it.
 
Ah, OK.
 
> And No, the problem still comes about with "gemacs -q" as well as
> "gemacs -q --no-site-file".

It looks to me like there's something weird happening on your ssh link.
I think your best bet would be to ask your sysadmin for help - show him
the emails/usenet postings from this thread.

Hope you get it sorted out soon.

-- 
Alan Mackenzie (Ittersbach, Germany).

      reply	other threads:[~2007-07-01 17:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-30  1:45 C and C++ highlighting is not working properly (font-lock) deccard
2007-06-30  8:34 ` Enselic
2007-07-01 14:51   ` deccard
2007-06-30 10:13 ` Alan Mackenzie
     [not found] ` <mailman.2833.1183193218.32220.help-gnu-emacs@gnu.org>
2007-07-01 15:07   ` deccard
2007-07-01 17:50     ` Alan Mackenzie [this message]

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=20070701175055.GB1735@muc.de \
    --to=acm@muc.de \
    --cc=help-gnu-emacs@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.