From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Musings: Supposed places of safety, guaranteed by parse-partial-sexp are not safe. Date: Sun, 04 Dec 2011 11:41:20 +0100 Message-ID: <4EDB4E50.1060202@gmx.at> References: <20111203232301.GD4566@acm.acm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1322995292 29607 80.91.229.12 (4 Dec 2011 10:41:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 4 Dec 2011 10:41:32 +0000 (UTC) Cc: Alan Mackenzie , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 04 11:41:27 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RX9Ve-0007dy-NI for ged-emacs-devel@m.gmane.org; Sun, 04 Dec 2011 11:41:26 +0100 Original-Received: from localhost ([::1]:56993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RX9Ve-00011p-BF for ged-emacs-devel@m.gmane.org; Sun, 04 Dec 2011 05:41:26 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:37753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RX9Vc-00011j-Pg for emacs-devel@gnu.org; Sun, 04 Dec 2011 05:41:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RX9Vb-0004TK-HB for emacs-devel@gnu.org; Sun, 04 Dec 2011 05:41:24 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:44694) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RX9Vb-0004TE-48 for emacs-devel@gnu.org; Sun, 04 Dec 2011 05:41:23 -0500 Original-Received: (qmail invoked by alias); 04 Dec 2011 10:41:21 -0000 Original-Received: from 62-47-37-45.adsl.highway.telekom.at (EHLO [62.47.37.45]) [62.47.37.45] by mail.gmx.net (mp011) with SMTP; 04 Dec 2011 11:41:21 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18jtzgOJAMjM9GKsWrrsO9RPGD3YQsL0HtsG2MkfL G1WH8dNMlLlvYQ User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 213.165.64.23 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146476 Archived-At: > The better way to fix it is probably to change the (nth 5 ppss) value so > it holds something like "buffer position actually described by PPSS in > case the requested buffer position is in the middle of a lexeme" and > so it can be used for both backslashes and multi-char comment markers. If you change (nth 5 ppss) you would still have to say that (nth 4 ppss) is unreliable in this special case. I think Daniel is right here: Check whether the character following TO completes a comment begin (or comment end) lexeme and in that case return consistently the in-comment value. martin