From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: info faces for strings and quotations Date: Thu, 07 Oct 2004 17:13:47 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1097162587 32756 80.91.229.6 (7 Oct 2004 15:23:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Oct 2004 15:23:07 +0000 (UTC) Cc: Juri Linkov , bob@rattlesnake.com, Drew Adams , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 07 17:23:02 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CFa0Z-0003SP-00 for ; Thu, 07 Oct 2004 17:16:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CFa7J-0006pP-8F for ged-emacs-devel@m.gmane.org; Thu, 07 Oct 2004 11:23:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CFa55-0005gW-NV for emacs-devel@gnu.org; Thu, 07 Oct 2004 11:21:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CFa52-0005eE-Mm for emacs-devel@gnu.org; Thu, 07 Oct 2004 11:21:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CFa52-0005dj-EN for emacs-devel@gnu.org; Thu, 07 Oct 2004 11:21:20 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CFZxo-0005CW-6I for emacs-devel@gnu.org; Thu, 07 Oct 2004 11:13:52 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1CFZxl-0001YM-Ad; Thu, 07 Oct 2004 11:13:49 -0400 Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Thu, 07 Oct 2004 10:58:55 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28033 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28033 Stefan Monnier writes: >> 2. The pb of not interpreting " to begin a string if it is escaped (\") is >> no doubt fixable, at the risk of complicating the regexp. Suggested fixes >> welcome. > > Prefix the regexp with "\\(^\\|[^\\]\\)\\(\\\\\\\\\\)*". The (match-end) of > this regexp is guaranteed to not be preceded by an odd number > of backspashes. > > You can find this regexp used by various major modes for comment-start-skip. If you don't need regexps, it is usually quite faster just to check with (zerop (mod (save-excursion (skip-chars-backward "\\\\")) 2)) whether you have an even number of preceding backslashes. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum