From unknown Tue Aug 19 05:28:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12641: Backslash in the end of comment lines in C/C++ Resent-From: Chen Fengyuan Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Oct 2012 05:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12641 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12641@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.135019184530414 (code B ref -1); Sun, 14 Oct 2012 05:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Oct 2012 05:17:25 +0000 Received: from localhost ([127.0.0.1]:43109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNGZn-0007uS-GI for submit@debbugs.gnu.org; Sun, 14 Oct 2012 01:17:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35655) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNEOi-0004ly-9Q for submit@debbugs.gnu.org; Sat, 13 Oct 2012 22:57:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNENe-0006nx-Bg for submit@debbugs.gnu.org; Sat, 13 Oct 2012 22:56:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:44331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNENe-0006nt-8O for submit@debbugs.gnu.org; Sat, 13 Oct 2012 22:56:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNENc-0001oJ-KC for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 22:56:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNENa-0006nS-FP for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 22:56:40 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:47729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNENa-0006nM-8Z for bug-gnu-emacs@gnu.org; Sat, 13 Oct 2012 22:56:38 -0400 Received: by mail-ie0-f169.google.com with SMTP id 10so8124917ied.0 for ; Sat, 13 Oct 2012 19:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version:x-mailer; bh=Z3awhTfnnGNM6qJUIe+hQLNS4oPvuAeko8e3MuP3lVk=; b=ocW7Ya4WIWsydnrmXAAeZ5AqXp4jFN3CrRo0WyHYz3fvLddE4tsxdKmTsT400xbem/ Zyvjp6ionqwyuYRSJ2cdPsoJCWBUtJ0UgYwpQg7y45xNuzVZBLwSj9oAf02aosJbs4ih EHtOCUGpx3ZncZkadMA8lOMIQQrJfeEteBPzHRCpO4wvXdsAU1alqhC1FSZhOqKm9EH8 uQrWybjeaC021C/lpOfZbw5wIUJuNuWoxi/9gil4KLP1BOTV3W8NKLx+NBy8NeabvRYp A3mxHbWN0OZK4o0CScUCnd470/EJHvQdJkYnno3iXIcRWmp+rdyIRb3CZEUuUTZkkXoz d2FQ== Received: by 10.50.33.147 with SMTP id r19mr5658881igi.73.1350183397415; Sat, 13 Oct 2012 19:56:37 -0700 (PDT) Received: from [199.180.254.101] ([199.180.254.36]) by mx.google.com with ESMTPS id hg2sm2744844igc.3.2012.10.13.19.56.33 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 13 Oct 2012 19:56:36 -0700 (PDT) From: Chen Fengyuan Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <2EC2551D-51D2-4782-AC39-4FF0047989CD@gmail.com> Date: Sun, 14 Oct 2012 10:56:24 +0800 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) 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 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Mailman-Approved-At: Sun, 14 Oct 2012 01:17:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) This bug report will be sent to the Bug-GNU-Emacs mailing list and the GNU bug tracker at debbugs.gnu.org. Please check that the From: line contains a valid email address. After a delay of up to one day, you should receive an acknowledgement at that address. Please write in English if possible, as the Emacs maintainers usually do not have translators for other languages. Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': int a=3D1; //some comment \ a++; printf("%d\n",a); //some comment ??/ a++; printf("%d\n",a); a++ is a part of comment, but emacs don't highlight a++ as a comment. = http://stackoverflow.com/questions/2384276/backslash-in-the-end-of-comment= -lines-in-c-c If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /Applications/Emacs.app/Contents/Resources/etc/DEBUG. In GNU Emacs 24.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2012-08-27 on bob.porkrind.org Windowing system distributor `Apple', version 10.3.1187 Configured using: `configure '--host=3Dx86_64-apple-darwin' '--build=3Di686-apple-darwin' '--with-ns' 'build_alias=3Di686-apple-darwin' 'host_alias=3Dx86_64-apple-darwin' 'CC=3Dgcc -mmacosx-version-min=3D10.5''= 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: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: C++/la Minor modes in effect: erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-netsplit-mode: t shell-dirtrack-mode: t keyfreq-autosave-mode: t keyfreq-mode: t savehist-mode: t erc-log-mode: t erc-services-mode: t erc-networks-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t desktop-save-mode: t global-auto-complete-mode: t auto-complete-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: r t C-g M-x M-p C-e =20 - q u b a c k s l a s h , m =20 c o m m e n t =20 =20 SPC =20 =20 =20 =20 =20 C-c C-o =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 n C-f C-f C-f =20 =20 C-S-e M-w =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 M-< =20 =20 C-x b M-x=20 M-p M-p Recent messages: widget-button-press: Buffer is read-only: # call-interactively: Buffer is read-only: # widget-apply-action: Attempt to perform action on inactive widget byte-code: End of buffer [6 times] byte-code: Beginning of buffer [17 times] call-interactively: Buffer is read-only: # widget-apply-action: Attempt to perform action on inactive widget Mark set byte-code: End of buffer [5 times] Mark set widget-apply-action: Attempt to perform action on inactive widget Load-path shadows: ~/gits/elisp/numbers hides ~/.lisp/numbers ~/.lisp/apel-10.8/timezone hides = /Applications/Emacs.app/Contents/Resources/lisp/timezone ~/.lisp/apel-10.8/env hides = /Applications/Emacs.app/Contents/Resources/lisp/env Features: (url-cache url-http url-gw url-auth url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse url-vars mailcap shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils time-stamp help-mode view vc-git network-stream starttls erc-menu erc-join erc-ring erc-pcomplete erc-track erc-match erc-button wid-edit erc-fill erc-stamp erc-netsplit org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-info org-gnus org-docview org-bibtex bibtex org-bbdb cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs auto-complete-autoloads bbdb-autoloads magit-autoloads paredit-autoloads popup-autoloads pretty-lambdada-autoloads numbers slime-tramp tramp tramp-compat auth-source eieio assoc gnus-util mm-util mail-prsvr password-cache shell tramp-loaddefs org-export-beamer org-latex org-export-latex org-beamer org-exp ob-exp org-exp-blocks find-func org-agenda footnote keyfreq dired-sort pretty-lambdada savehist ace-jump-mode paredit ielm slime-fancy slime-fontifying-fu slime-package-fu slime-references slime-scratch slime-presentations slime-fuzzy slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc slime-parse slime-repl slime hyperspec browse-url erc-view-log erc-log tls erc-services erc-networks erc-goodies erc erc-backend erc-compat thingatpt pp org-film org byte-opt warnings bytecomp byte-compile cconv macroexp ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys ob ob-eval org-pcomplete pcomplete comint ansi-color ring org-list org-faces org-compat org-entities org-macs noutline outline easy-mmode format-spec cal-menu easymenu calendar cal-loaddefs desktop mule-util advice help-fns advice-preload alist pym static apel-ver product elscreen server epa-file epa derived epg epg-config dired-single auto-complete-config auto-complete popup ido cl paren edmacro kmacro terminal-notifier dired regexp-opt package tabulated-list time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 15 15:42:00 2012 Received: (at control) by debbugs.gnu.org; 15 Oct 2012 19:42:00 +0000 Received: from localhost ([127.0.0.1]:45731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNqY3-0008RE-Jk for submit@debbugs.gnu.org; Mon, 15 Oct 2012 15:42:00 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:41369 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TNqY1-0008R6-AI for control@debbugs.gnu.org; Mon, 15 Oct 2012 15:41:58 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TNqWu-0004pp-BE for control@debbugs.gnu.org; Mon, 15 Oct 2012 15:40:48 -0400 Date: Mon, 15 Oct 2012 15:40:48 -0400 Message-Id: Subject: control message for bug 12641 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) merge 9383 12641 From unknown Tue Aug 19 05:28:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12641: Backslash in the end of comment lines in C/C++ In-Reply-To: <2EC2551D-51D2-4782-AC39-4FF0047989CD@gmail.com> Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 14 Oct 2016 22:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12641 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: To: Chen Fengyuan Cc: 9383@debbugs.gnu.org, 12641@debbugs.gnu.org Received: via spool by 12641-submit@debbugs.gnu.org id=B12641.147648466722774 (code B ref 12641); Fri, 14 Oct 2016 22:38:01 +0000 Received: (at 12641) by debbugs.gnu.org; 14 Oct 2016 22:37:47 +0000 Received: from localhost ([127.0.0.1]:56160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvB6o-0005vB-Mx for submit@debbugs.gnu.org; Fri, 14 Oct 2016 18:37:46 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:37450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvB6j-0005ua-Sl; Fri, 14 Oct 2016 18:37:45 -0400 Received: by mail-it0-f50.google.com with SMTP id m138so3707878itm.0; Fri, 14 Oct 2016 15:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version; bh=oxUwouf0pncCmSj8N96kM7wgjPW2ZrDv6AXS6v7oS1k=; b=PmiaAUv5XKdknzN/wK69kw1G0eK1dABNzbCnq/E41OzOjHCyyMKsRHu1iyc91d+a7z +wIpWB04dN1oSRX8GaWpPtKMy9IP0rS5eWSU6fyuFqIA2EpWbXwyNvmSbxqNetedw/ES x1yBpgtYUXax9uyF3YuLah2sKQE9dhf8SuoI3XyCiqnMfaa0lx1/UEVfTr+3deBM3Os3 GRTUzg4f1aPJg1rfmlyk4T4Rw99KzJpuCI5oq5Fm/NjWuHr9zZP3bY82T7cwK94KQeB9 OL6G3vI4IvFAc67fA1L/+aQnPRqfjRm1kkGqqrQmmUu8xSXfag4JEVpn4p42OqlibQbe KFAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:message-id :user-agent:mime-version; bh=oxUwouf0pncCmSj8N96kM7wgjPW2ZrDv6AXS6v7oS1k=; b=jMgjBBNIMqRrpKNRYpO00eaROCJ/7XZ49m11u78kiqRtH3J6hi9fBz7GfzO8XY9z0w mKzjr6rc/rDcw6kcr5t56ad3W7OXTenUyaWxPMQ8/2jJOqkUJTUswSZyd4Kdozp0BREV HkUN5D4dQZ2rXhOp8E9Uwxj6WdQHvfzBqo6dW6AajKOEUakYmvsrcO/mP2xfcNKD1L7O +3G1+XPFOLrO0xDoMwrndTxtoupYz9DVunhBBHNxuFncDRGK/3yVnvbGkRR+7hQcYG68 UBiZv7XB6xugj8kPxHebD/5KkoVzX3kDvv9kstWlGJrtbRKSOPUugEvzdrdsodhZ9MUz EUMg== X-Gm-Message-State: AA6/9Rlq55felkZae8HWhnJUIOGpO5B9gxg+m2LiwzaJO3QYwaHS3CBNnJH/wctk40v8KQ== X-Received: by 10.36.90.202 with SMTP id v193mr410068ita.120.1476484653424; Fri, 14 Oct 2016 15:37:33 -0700 (PDT) Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id 80sm8537453iot.36.2016.10.14.15.37.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Oct 2016 15:37:32 -0700 (PDT) From: Alex References: <2EC2551D-51D2-4782-AC39-4FF0047989CD@gmail.com> Date: Fri, 14 Oct 2016 16:37:30 -0600 Message-ID: <87eg3i8slx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) close 9383 25.1 quit Chen Fengyuan writes: > ... > > int a=1; > //some comment \ > a++; > printf("%d\n",a); > //some comment ??/ > a++; > printf("%d\n",a); > > a++ is a part of comment, but emacs don't highlight a++ as a comment. > http://stackoverflow.com/questions/2384276/backslash-in-the-end-of-comment-lines-in-c-c > > ... In Emacs 25.1 the first a++ is now commented correctly. The 2nd a++ is not commented, but this is a known limitation according to https://www.gnu.org/software/emacs/manual/html_node/ccmode/Limitations-and-Known-Bugs.html If trigraph support is desired, then I believe a new bug report should be opened.