From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.bugs Subject: bug#7882: 24.0.50; Bad regexp for javascript regexps Date: Fri, 21 Jan 2011 18:50:29 +0100 (CET) Message-ID: <20110121.185029.1304555966254424651.hanche@math.ntnu.no> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1295632501 12231 80.91.229.12 (21 Jan 2011 17:55:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 21 Jan 2011 17:55:01 +0000 (UTC) To: 7882@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 21 18:54:57 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PgLCL-0000bx-CO for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Jan 2011 18:54:57 +0100 Original-Received: from localhost ([127.0.0.1]:43451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgLCK-0002pw-Is for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Jan 2011 12:54:56 -0500 Original-Received: from [140.186.70.92] (port=35921 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgLCD-0002oL-0d for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 12:54:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgLCB-00044y-9C for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 12:54:48 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgLCB-00044t-7M for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 12:54:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PgL0o-0006YW-MG; Fri, 21 Jan 2011 12:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Harald Hanche-Olsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jan 2011 17:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7882 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.129563177625186 (code B ref -1); Fri, 21 Jan 2011 17:43:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jan 2011 17:42:56 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgL0h-0006YB-De for submit@debbugs.gnu.org; Fri, 21 Jan 2011 12:42:55 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgL0f-0006Xy-7W for submit@debbugs.gnu.org; Fri, 21 Jan 2011 12:42:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgL8I-0003PJ-Tv for submit@debbugs.gnu.org; Fri, 21 Jan 2011 12:50:47 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:47065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgL8I-0003P0-DE for submit@debbugs.gnu.org; Fri, 21 Jan 2011 12:50:46 -0500 Original-Received: from [140.186.70.92] (port=49743 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgL8D-0001uM-Op for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 12:50:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgL88-0003O6-78 for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 12:50:38 -0500 Original-Received: from anne.math.ntnu.no ([129.241.15.150]:55370) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PgL87-0003EN-PH for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 12:50:36 -0500 Original-Received: (qmail 7630 invoked from network); 21 Jan 2011 17:50:30 -0000 Original-Received: from gauss.math.ntnu.no (HELO localhost) (hanche@129.241.15.102) by anne.math.ntnu.no with ESMTPA; 21 Jan 2011 17:50:30 -0000 X-URL: http://www.math.ntnu.no/~hanche/ X-Mailer: Mew version 6.3.50 on Emacs 24.0.50 / Mule 6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 21 Jan 2011 12:43:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43510 Archived-At: Put the following four line code snippet in a new buffer: replace(/\\/g,something); // Now we're in trouble: // Still in trouble. // And all's well again. and activate js-mode and font-lock-mode. The syntax colouring is now off: The code starting with the first slash on the first line and ending with the first slash on the second line is coloured as a regexp; now the syntax highlighter is unaware that we are in a comment, and reads the single quote as the start of a string. After the second single quote things return to normal. The problem seems to lie with the constant js--regexp-literal declared in js.el, as this regexp does not treat backslashes with sufficient care. In GNU Emacs 24.0.50.1 (x86_64-apple-darwin10.5.0, NS apple-appkit-1038.35) of 2010-12-27 on mack Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--with-ns'' - Harald