From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.devel Subject: Re: [BUG] Regexp compiler, problem with character classes Date: Mon, 18 Sep 2006 10:43:09 +0200 Message-ID: References: <87fyeu5937.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1158569075 4252 80.91.229.2 (18 Sep 2006 08:44:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 18 Sep 2006 08:44:35 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 18 10:44:34 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GPEjd-0006dh-QL for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2006 10:44:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GPEjd-00034h-70 for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2006 04:44:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GPEj4-0002qm-9w for emacs-devel@gnu.org; Mon, 18 Sep 2006 04:43:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GPEj2-0002pm-NB for emacs-devel@gnu.org; Mon, 18 Sep 2006 04:43:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GPEj2-0002pD-D6 for emacs-devel@gnu.org; Mon, 18 Sep 2006 04:43:36 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GPElq-000535-3o for emacs-devel@gnu.org; Mon, 18 Sep 2006 04:46:30 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GPEij-0006Qq-Vc for emacs-devel@gnu.org; Mon, 18 Sep 2006 10:43:17 +0200 Original-Received: from gamma02.me.chalmers.se ([129.16.50.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Sep 2006 10:43:17 +0200 Original-Received: from bojohan+news by gamma02.me.chalmers.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Sep 2006 10:43:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-To: emacs-devel@gnu.org Original-Lines: 33 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: gamma02.me.chalmers.se Mail-Copies-To: never User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:Nhx94cH3gwmHPffCXbzSzYNQRCA= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:59957 Archived-At: Chong Yidong writes: > Richard Stallman writes: > >> The easiest way to fix that bug is to make each element of the >> compiled regexp cache specify the syntax table that it corresponds >> to, and make modify-syntax-entry clear the cache. That way, no >> change in regex.c is needed. >> >> Could someone please do this and then ack? > > Does this patch look OK? [...] The "make each element of the compiled regexp cache specify the syntax table that it corresponds to" part is still needed. Here's an example: $ emacs -Q Evaluate in *scratch*: (list (string-match "x[[:space:]]" "x\n") (with-temp-buffer (string-match "x[[:space:]]" "x\n"))) => (nil nil) Expected: (nil 0) -- Johan Bockgård