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

Re: xemacs and c++ //-type comments

[Please don't Cc me when replying to messages on the list]


On Sat, Mar 1 1997, root (you?) wrote:

> The c++ mode in xemacs does not appear to recognize the double-slash
> comments in c++ code (these comments start with // and end at the following
> new-line -- like the '#' comment character in ksh scripts).

Works fine for me in C++ mode. AFAIK  //-comments are illegal in ANSI C
and Xemacs only helps you to adhere to that standard when it's buffer is
in C-mode.

> Does anyone know if there is a patch or modification for the c++ mode so
> that it will recognize these comments (i.e. for the file
> /usr/lib/xemacs-19.14/lisp/modes/cc-mode.el) ?

If your files are C++ source (e.g. class decls in .h files) put a line

// -*- mode: C++ -*-

at the top of your file to put the buffer into C++ major mode.

 -- Siggy
Siggy Brentrup <bsb@debian.org> aka: bsb@uni-muenster.de
PGP fingerprint = C8 95 66 8C 75 7E 10 A2  05 61 C7 7F 05 B6 A4 DF

Reply to: