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: [Emacs-diffs] master 8dafacd: * lisp/emacs-lisp/syntax.el (syntax-ppss-table): New var Date: Mon, 18 Jan 2016 17:12:50 -0500 Message-ID: References: <20160116200607.22534.62936@vcs.savannah.gnu.org> <569B734D.2030202@yandex.ru> <569D4EDE.6080605@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453155191 15381 80.91.229.3 (18 Jan 2016 22:13:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jan 2016 22:13:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 18 23:13:02 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aLI2o-000496-FH for ged-emacs-devel@m.gmane.org; Mon, 18 Jan 2016 23:13:02 +0100 Original-Received: from localhost ([::1]:34004 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLI2n-0003Qu-QC for ged-emacs-devel@m.gmane.org; Mon, 18 Jan 2016 17:13:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLI2j-0003Qo-Nf for emacs-devel@gnu.org; Mon, 18 Jan 2016 17:12:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLI2e-0003nE-Md for emacs-devel@gnu.org; Mon, 18 Jan 2016 17:12:57 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:53014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLI2e-0003mh-Gr for emacs-devel@gnu.org; Mon, 18 Jan 2016 17:12:52 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id u0IMCon7008106; Mon, 18 Jan 2016 17:12:51 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 1BAEF603E5; Mon, 18 Jan 2016 17:12:50 -0500 (EST) In-Reply-To: <569D4EDE.6080605@yandex.ru> (Dmitry Gutov's message of "Mon, 18 Jan 2016 23:45:18 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5554=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5554> : inlines <4194> : streams <1573098> : uri <2122691> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:198303 Archived-At: > Doesn't paren-matching code call syntax-ppss anyway? Not that I know, no. > I'm worried that we have _three_ different syntax tables now (including the > font-lock- one), without clear documentation on how they should relate. Yes, this whole area is rather murky. The font-lock syntax-table should mostly disappear (90% of the uses were to turn "_" syntax into "w" syntax so as to be able to use \< and \>, but this has been made obsolete by the new \_< and \_>), I think. But the interaction between the various syntax-tables as well as forward-sexp-function deserves a serious rethink. I think such a rethink will need to start by distinguishing "user-level dwimish" behavior and lower-level behavior which adheres to strict syntax rules. E.g. in TeX and HTML, we want to match parentheses even though the formal syntax does not give any special rule to parentheses. Similar thing for matching parens when the open and close parens are both inside comments, but not inside the same one. > So, forward-sexp can trigger syntax-ppss via syntax-propertize, which will > use syntax-ppss-table, but forward-sexp itself will use the main syntax > table? At least when called with positive argument. Right. > But up-list uses the return value of syntax-ppss, so it will be affected by > syntax-ppss-table? syntax-ppss is indeed used, but only to decide if we're strings or comments, so it should be OK. > It doesn't seem easy to reason about. Indeed, it's not. Stefan