From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Li Feng Newsgroups: gmane.emacs.bugs Subject: bug#33973: Multi-line C++ raw string literal font lock is broken Date: Fri, 4 Jan 2019 16:21:02 +1100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000002d9861057e9b0c59" X-Trace: blaine.gmane.org 1546581067 22057 195.159.176.226 (4 Jan 2019 05:51:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 4 Jan 2019 05:51:07 +0000 (UTC) To: 33973@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 04 06:51:03 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfINo-0005ac-N2 for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Jan 2019 06:51:01 +0100 Original-Received: from localhost ([127.0.0.1]:59812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfIPv-0002LJ-9i for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Jan 2019 00:53:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfIPo-0002LC-Sk for bug-gnu-emacs@gnu.org; Fri, 04 Jan 2019 00:53:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfIPn-0005UE-C8 for bug-gnu-emacs@gnu.org; Fri, 04 Jan 2019 00:53:04 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43700) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gfIPm-0005To-81 for bug-gnu-emacs@gnu.org; Fri, 04 Jan 2019 00:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gfIPm-0006hn-4l for bug-gnu-emacs@gnu.org; Fri, 04 Jan 2019 00:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Li Feng Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Jan 2019 05:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33973 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154658112825695 (code B ref -1); Fri, 04 Jan 2019 05:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jan 2019 05:52:08 +0000 Original-Received: from localhost ([127.0.0.1]:46153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfIOt-0006gL-IP for submit@debbugs.gnu.org; Fri, 04 Jan 2019 00:52:08 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfHvM-0005u8-4n for submit@debbugs.gnu.org; Fri, 04 Jan 2019 00:21:37 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:39820) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gfHvL-0001vG-R4 for submit@debbugs.gnu.org; Fri, 04 Jan 2019 00:21:35 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfHvK-0002bz-Ek for bug-gnu-emacs@gnu.org; Fri, 04 Jan 2019 00:21:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfHvJ-0001qm-9V for bug-gnu-emacs@gnu.org; Fri, 04 Jan 2019 00:21:34 -0500 Original-Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:42779) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gfHvI-0001Q1-RI for bug-gnu-emacs@gnu.org; Fri, 04 Jan 2019 00:21:33 -0500 Original-Received: by mail-lf1-x135.google.com with SMTP id l10so24657999lfh.9 for ; Thu, 03 Jan 2019 21:21:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=snap.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=xVdPPoHbNjpF8azR+075sdDnLH7xnM7B670ScPtSE+w=; b=PewNkv45rInBjOCaVmW/Fb+yZ2XAKvlTqOhU/f6A7KWndukYjs+m1L2R2aY+gIZHoq VPykvtUyw5K1tEUTVqZkgWbfBfm8T5AmCqObz6nXMkoFoI4xEGVAe6UT5i6OxLRcMSgm Y35q5uGvnqKaN90u1F/ed87i5KdRuY+EGM0Kw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xVdPPoHbNjpF8azR+075sdDnLH7xnM7B670ScPtSE+w=; b=s9A6FzfefW72JPdYrlaWX61lVd6PCx22oa6P5S4v4pN3D01/Z6i+t3Z5s5h5NlMpPG j7HW/fenC9FL95eeTocmw2CjeiOgE8Ly7qlhnFjopaoAnnSO+e0vLcfGzbej/ZbmA6im 7a0D7B2yQTuJv6M3pQttPTpj3BlJheZfa60uUVn+OWNMu0MPv4sV+EuBPtjZ9GsWF++1 YwTFiWqfGXFibnOxxrsXUmBXgRrx21ZeUUdLRHjZRlFkgSZPgVYWjXIpuO2QbHD1z5qS snLxEE3pEnRdydhE56uH16FP/5N9k15nvwMxFDxRlpmceFcVMs8h+ZNeQzFTnabeWuWf 1okw== X-Gm-Message-State: AJcUukfrk5O0mcojoHQgG0Aw+fTMTcsSpXrgqSL5XEi/lZFHtxb9LUYI mHxdl0QE3rUjlauTVCpgJzp89Zi48MDwntWMU2sNV1GPHe1Vmw== X-Google-Smtp-Source: ALg8bN5T22dcSl9IJhP19sTasfdXuEvd/m/pSPaJ5S6uVlnqMtcsNKeo2L5I6lE/cAm9huYS/XS+RXC6Ztpd5qTbwbI= X-Received: by 2002:a19:4cc3:: with SMTP id z186mr4376379lfa.37.1546579272886; Thu, 03 Jan 2019 21:21:12 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Fri, 04 Jan 2019 00:52:06 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154124 Archived-At: --0000000000002d9861057e9b0c59 Content-Type: text/plain; charset="UTF-8" Write a multi-line raw string literal in c++-mode, and font lock doesn't show the correct syntax highlighting. Sample code: const char* s1 = R"foo( Hello World )foo"; const char* s2 = R"( Hello World )"; In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin17.7.0, NS appkit-1561.60 Version 10.13.6 (Build 17G65)) of 2019-01-04 built on C02WP42JHTD6 Repository revision: fe4922cbf01fa9161ffa142fc70972098d48186f Repository branch: master Windowing system distributor 'Apple', version 10.3.1561 System Description: Mac OS X 10.13.6 Recent messages: Mark set next-line: End of buffer [15 times] Mark set next-line: End of buffer [14 times] Saving file /Users/lifeng/Desktop/test.cpp... Wrote /Users/lifeng/Desktop/test.cpp Mark set [6 times] Undo! Making completion list... user-error: End of history; no default available [2 times] Configured using: 'configure --with-modules' Configured features: RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON LCMS2 GMP Important settings: value of $LANG: en_AU.UTF-8 locale-coding-system: utf-8-unix Major mode: C++//l Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils thingatpt cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib elec-pair tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 227619 13680) (symbols 48 22362 1) (strings 32 35100 1976) (string-bytes 1 1069317) (vectors 16 37950) (vector-slots 8 757597 18070) (floats 8 47 152) (intervals 56 520 0) (buffers 992 14)) --0000000000002d9861057e9b0c59 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Write a multi-line raw string literal in = c++-mode, and font
lock doesn't show the correct syntax highlighting= . Sample code:

const char* s1 =3D R"foo(
Hello
World
)= foo";

const char* s2 =3D R"(
Hello
World
)";=

In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin17.7.0, NS appkit= -1561.60 Version 10.13.6 (Build 17G65))
=C2=A0of 2019-01-04 built on C02= WP42JHTD6
Repository revision: fe4922cbf01fa9161ffa142fc70972098d48186f<= br>Repository branch: master
Windowing system distributor 'Apple'= ;, version 10.3.1561
System Description:=C2=A0 Mac OS X 10.13.6

R= ecent messages:
Mark set
next-line: End of buffer [15 times]
Mark = set
next-line: End of buffer [14 times]
Saving file /Users/lifeng/Des= ktop/test.cpp...
Wrote /Users/lifeng/Desktop/test.cpp
Mark set [6 tim= es]
Undo!
Making completion list...
user-error: End of history; no= default available [2 times]

Configured using:
=C2=A0'configu= re --with-modules'

Configured features:
RSVG GLIB NOTIFY KQUE= UE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
MODULES THREADS JSON L= CMS2 GMP

Important settings:
=C2=A0 value of $LANG: en_AU.UTF-8=C2=A0 locale-coding-system: utf-8-unix

Major mode: C++//l

= Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mod= e: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2= =A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-= mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
= =C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 au= to-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-num= ber-mode: t
=C2=A0 transient-mark-mode: t
=C2=A0 abbrev-mode: t
Load-path shadows:
None found.

Features:
(shadow sort mail-e= xtr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile ccon= v dired dired-loaddefs format-spec rfc822 mml
mml-sec password-cache epa= derived epg epg-config gnus-util rmail
rmail-loaddefs time-date mm-deco= de mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheade= r sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils thin= gatpt cc-mode cc-fonts
easymenu cc-guess cc-menus cc-cmds cc-styles cc-a= lign cc-engine cc-vars
cc-defs cl-loaddefs cl-lib elec-pair tooltip eldo= c electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/ns-w= in ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset i= mage
regexp-opt fringe tabulated-list replace newcomment text-mode elisp= -mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch tim= er
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core<= br>term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
v= ietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
heb= rew greek romanian slovak czech european ethiopic indian cyrillic
chines= e composite charscript charprop case-table epa-hook jka-cmpr-hook
help s= imple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button fac= es cus-face macroexp files text-properties overlay sha1 md5
base64 forma= t env code-pages mule custom widget hashtable-print-readable
backquote t= hreads kqueue cocoa ns lcms2 multi-tty make-network-process
emacs)
Memory information:
((conses 16 227619 13680)
=C2=A0(symbols 48 223= 62 1)
=C2=A0(strings 32 35100 1976)
=C2=A0(string-bytes 1 1069317)=C2=A0(vectors 16 37950)
=C2=A0(vector-slots 8 757597 18070)
=C2=A0(= floats 8 47 152)
=C2=A0(intervals 56 520 0)
=C2=A0(buffers 992 14))
--0000000000002d9861057e9b0c59--