Article View: gnu.emacs.bug
Article #87680[19.26]: comment-start-skip's value for c-mode is not quite right
From: Simon Marshall
Date: Fri, 09 Sep 1994 13:12
Date: Fri, 09 Sep 1994 13:12
32 lines
2088 bytes
2088 bytes
In GNU Emacs 19.26.1 (sparc-sun-sunos4.1.3C, X toolkit) of Fri Sep 9 1994 on penelope I noticed this in Font Lock mode, but I don't think it is a Font Lock mode problem. It is also not a problem specific to 19.26. In c-mode, comment-start-skip's value is "/\\*+ *". This swallows the first character of the comment end for comments of the form "/*BODY*/", where BODY only contains zero or more "*" characters. Therefore, using the value of this variable to skip comments will leave you in the wrong context when comments are of this form. I think comments of the form /*****************************************************************************/ are quite common. To see the effect, emacs -q, M-x c-mode RET, and put the text: #define foo "bar" /**/ #define foo "bar" /* */ #define foo "bar" in the buffer. Then M-x font-lock-mode RET. The third line string is not underlined (highlighted as a string). If you set comment-start-skip's value to "/\\* *" fontification works, but this probably isn't quite what is wanted either. Si. _______________________________________________________________________________ Simon Marshall, ESRIN (ESA), Via Galileo Galilei, Frascati 00044 (Roma), Italia "Diego Maradona---a flawed genius whose genius has become flawed." Bob Wilson. Email: Simon.Marshall@mail.esrin.esa.it Voice: +39 6 941 80 707 Fax: 80 361
Technical Details
Message-ID:
<9409091309.AA25380@plod.esrin.esa.it>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!mail.ESrin.ESa.IT!Simon.MarshallShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,54df8617348de25c,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-09-10 04:11:19 PST Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!mail.ESrin.ESa.IT!Simon.Marshall From: Simon.Marshall@mail.ESrin.ESa.IT (Simon Marshall) Newsgroups: gnu.emacs.bug Subject: [19.26]: comment-start-skip's value for c-mode is not quite right Date: 9 Sep 1994 09:12:58 -0400 Organization: GNUs Not Usenet Lines: 32 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9409091309.AA25380@plod.esrin.esa.it>