all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#1953: Syntax Highlighting Problem in c++-mode
@ 2009-01-19  3:28 Jordan Saunders
  2009-01-20 12:13 ` Alan Mackenzie
  0 siblings, 1 reply; 3+ messages in thread
From: Jordan Saunders @ 2009-01-19  3:28 UTC (permalink / raw)
  To: bug-gnu-emacs

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

Given the following circumstance in c++-mode:

class blah
{
    blah(int) {}
};

blah::blah is not recognized by the syntax highlighter as a constructor and
the syntax highlighting is incorrect. If we give the first parameter an
actual name (i.e. int a, for example), it is recognized and things are
peachy.

Thank you.


In GNU Emacs 22.3.1 (i386-mingw-nt6.0.6001)
 of 2008-09-06 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 6.0.6001
configured using `configure --with-gcc (3.4)'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENC
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: C++/l

Minor modes in effect:
  encoded-kbd-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  abbrev-mode: t

Recent input:
<wheel-down> <wheel-down> <wheel-down> <wheel-down>
<wheel-down> <wheel-down> <wheel-up> <double-wheel-up>
<triple-wheel-up> <wheel-down> <help-echo> <C-up> <C-up>
<C-up> <C-up> <down> <down> <end> <left> <left> SPC
b a <backspace> l a h <C-backspace> <backspace> C-x
C-s <help-echo> <help-echo> <help-echo> M-x r e p o
r t - e m <tab> <return>

Recent messages:
("C:\\emacs-22.3\\bin\\emacs.exe" "C:\\home\\ogawd\\util\\matrix.h")
Loading encoded-kb...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading cc-mode...done
Wrote c:/home/ogawd/util/matrix.h
Loading emacsbug...done

[-- Attachment #2: Type: text/html, Size: 2342 bytes --]

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

* bug#1953: Syntax Highlighting Problem in c++-mode
@ 2009-01-19 15:18 Chong Yidong
  0 siblings, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2009-01-19 15:18 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: Jordan Saunders, 1953

Hi Alan,

Here's a bug report about C++ highlighting (for Emacs 22, I didn't check
if it exists with CVS Emacs).


"Jordan Saunders" <jmsaunders@gmail.com> wrote:

> Given the following circumstance in c++-mode:
>
> class blah
> {
>     blah(int) {}
> };
>
> blah::blah is not recognized by the syntax highlighter as a constructor
> and
> the syntax highlighting is incorrect. If we give the first parameter an
> actual name (i.e. int a, for example), it is recognized and things are
> peachy.






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

* bug#1953: Syntax Highlighting Problem in c++-mode
  2009-01-19  3:28 bug#1953: Syntax Highlighting Problem in c++-mode Jordan Saunders
@ 2009-01-20 12:13 ` Alan Mackenzie
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Mackenzie @ 2009-01-20 12:13 UTC (permalink / raw)
  To: Jordan Saunders, 1953; +Cc: bug-gnu-emacs

Hi, Jordan,

On Sun, Jan 18, 2009 at 10:28:04PM -0500, Jordan Saunders wrote:
> Given the following circumstance in c++-mode:

> class blah
> {
>     blah(int) {}
> };

> blah::blah is not recognized by the syntax highlighter as a constructor and
> the syntax highlighting is incorrect.

I'm not quite sure what you mean here.  When a function is used (as
opposed to being declared), it is not given a special font; when it is
declared, it gets font-lock-function-name-face.  Class members, including
its constructors, count as "functions" here.

> If we give the first parameter an actual name (i.e. int a, for
> example), it is recognized and things are peachy.

Would you please supply an actual short example of what is going wrong.
C++ is an unusually difficult and complicated language to parse, and
there are certainly some bugs in C++ Mode at the moment.  It would be
nice to fix them.

> Thank you.

Thanks for taking the trouble to report the bug.

-- 
Alan Mackenzie (Nuremberg, Germany).






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

end of thread, other threads:[~2009-01-20 12:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19  3:28 bug#1953: Syntax Highlighting Problem in c++-mode Jordan Saunders
2009-01-20 12:13 ` Alan Mackenzie
  -- strict thread matches above, loose matches on Subject: below --
2009-01-19 15:18 Chong Yidong

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.