From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Musings: Supposed places of safety, guaranteed by parse-partial-sexp are not safe. Date: Sun, 04 Dec 2011 22:33:37 -0500 Message-ID: References: <20111203232301.GD4566@acm.acm> <4EDB4E50.1060202@gmx.at> <4EDBA888.2060202@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1323056030 23406 80.91.229.12 (5 Dec 2011 03:33:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Dec 2011 03:33:50 +0000 (UTC) Cc: Alan Mackenzie , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 05 04:33:46 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 1RXPJJ-0003ZU-Bp for ged-emacs-devel@m.gmane.org; Mon, 05 Dec 2011 04:33:45 +0100 Original-Received: from localhost ([::1]:53763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXPJI-00033l-8V for ged-emacs-devel@m.gmane.org; Sun, 04 Dec 2011 22:33:44 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXPJF-00033e-CH for emacs-devel@gnu.org; Sun, 04 Dec 2011 22:33:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXPJE-0000zK-DE for emacs-devel@gnu.org; Sun, 04 Dec 2011 22:33:41 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:56121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXPJE-0000zA-AY for emacs-devel@gnu.org; Sun, 04 Dec 2011 22:33:40 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EANU63E64rweH/2dsb2JhbABEqjeBBoFyAQEEAVYjEAs0EhQYDSSIGrRWiyEEiC2aFoRP X-IronPort-AV: E=Sophos;i="4.71,297,1320642000"; d="scan'208";a="150886809" Original-Received: from 184-175-7-135.dsl.teksavvy.com (HELO ceviche.home) ([184.175.7.135]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Dec 2011 22:33:39 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id D5526660D4; Sun, 4 Dec 2011 22:33:37 -0500 (EST) In-Reply-To: <4EDBA888.2060202@gmx.at> (martin rudalics's message of "Sun, 04 Dec 2011 18:06:16 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.183 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:146486 Archived-At: >>> If you change (nth 5 ppss) you would still have to say that (nth 4 ppss) >>> is unreliable in this special case. >> Not if (nth 5 ppss) says that the buffer position is the one *after* the >> "/*" sequence. Of course for "*/" we'd conversely want to use the state >> *before* "*/". > What I meant was that the caller would have to care about (nth 5 ppss) > too, wherever she now looked only at (nth 3 ppss) and (nth 4 ppss). That's what I understood and my suggestion does address this issue (tho it means that (nth 5 ppss) will sometimes refer to a buffer position after (point) and sometimes before). A case that needs to work is "/*/" in C mode, for example. Stefan