From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: Re: Syntax tables for multiple modes [was: bug#22983: syntax-ppss returns wrong result.] Date: Mon, 21 Mar 2016 15:42:22 +0100 Message-ID: <87lh5bevu9.fsf@gmail.com> References: <20160311151512.GD2888@acm.fritz.box> <20160311212410.GG2888@acm.fritz.box> <73903215-f94b-e194-7bfe-0d6350c95769@yandex.ru> <20160311221540.GH2888@acm.fritz.box> <2c301ec9-041d-9172-d628-479062314b23@yandex.ru> <20160314151621.GF1894@acm.fritz.box> <874mc2dqtk.fsf@gmail.com> <87egb5cpmg.fsf@gmail.com> <87a8lsd4j3.fsf@gmail.com> <328c7461-62c6-4228-f622-626349613a1d@yandex.ru> <87fuvkf1gx.fsf@gmail.com> <87y49bewum.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458571372 1757 80.91.229.3 (21 Mar 2016 14:42:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2016 14:42:52 +0000 (UTC) Cc: Alan Mackenzie , Stefan Monnier , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 15:42:47 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 1ai12a-0007TA-La for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2016 15:42:44 +0100 Original-Received: from localhost ([::1]:58227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai12Z-0005MR-A4 for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2016 10:42:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai12K-0005M9-GJ for emacs-devel@gnu.org; Mon, 21 Mar 2016 10:42:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai12G-0007oJ-Lm for emacs-devel@gnu.org; Mon, 21 Mar 2016 10:42:28 -0400 Original-Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:37913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai12G-0007oE-DV for emacs-devel@gnu.org; Mon, 21 Mar 2016 10:42:24 -0400 Original-Received: by mail-wm0-x234.google.com with SMTP id l68so124706117wml.1 for ; Mon, 21 Mar 2016 07:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=wyZKwq4cZnvDnj6UwGfVx6Q57qpPuAU3vs5Nj5rOUZM=; b=mSIT/tOJQ/SX1pM4XgdOSXy9/Ko0JfWhuCOFPn7XZMpVrkDJ4L2zllEvkNTKyYiKT2 oDxKv2OqRf6e6G/ifVK+T/Jv/z/MhGFMQW+ZxNZULAfduBzQhktAtvy+3NtvkO+cOBVZ 4OQCe0G53k290cXR7vmb5g4q+5pZPP5/bogSyxVPo03b1HfrX36sjJtTfgjJj99Zqdq3 K9nEReCrTwioPbKzDwcRGqeUm9+Il+lwB4S1d1mkR7M41sD0qy6gp3rL1xiksA7NtOQY Vr2ydNYsjJDm9kzYRzoenogM0H+67QE/QdOWf610NU1TmeedwG8bhLHnnVLGHGRky6bv Coag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=wyZKwq4cZnvDnj6UwGfVx6Q57qpPuAU3vs5Nj5rOUZM=; b=lD3eoLUxWZGJv+ZeXkZI+bWDQ0yEDFyVLRkRks+pGNM2bFvvcGicO6ryeFpQspBpH7 cNDwGAokk3MasfGZFRYEij1KK8EC/xiqq5ZXFUusEaNR/lDNDa41utI53pSNVR2K49Tq /cCNYDrwsesV7VHxN1+FFSTT/7jP94ToR+3Gl6rhNP7ZX0M6buko48twVtoWVGShNmFs IQTLdZr/aDLcNrsNm6NLduoVwRq7Sq6RuwtHJKqLzWFvTn2eGMqwMAeAfna63dOiyzN9 5Vh2ZnrHjQx5YoQfQV+PHMHsf7goNqEJ4PIBACD0tnJO7zpy12ZHTo5EoN288vJMQnRp GUGA== X-Gm-Message-State: AD7BkJLEcmJxjTwPVOx6ZMevZb/ZDmYWuqmeDwcq+oS+v1St3YyoffSYF+l5tIKo5ml+Mw== X-Received: by 10.194.60.200 with SMTP id j8mr30322965wjr.124.1458571343712; Mon, 21 Mar 2016 07:42:23 -0700 (PDT) Original-Received: from localhost ([143.176.214.220]) by smtp.gmail.com with ESMTPSA id j10sm25622039wjb.46.2016.03.21.07.42.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Mar 2016 07:42:22 -0700 (PDT) In-Reply-To: (Dmitry Gutov's message of "Mon, 21 Mar 2016 16:29:57 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::234 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:202000 Archived-At: >> On Mon, Mar 21 2016 16:29, Dmitry Gutov wrote: >> Sorry. What proposal do you mean? > """ > Instead, if you want to know what indentation an inner mode would return if > STRING-BEFORE was before it, insert that string into the buffer (while > inhibiting undo history). Call the indentation function, then remove the string. > """ Inner mode might decide to operate on string directly, or put stuff in a temp buffer, work on last line only, or simply ignore it. Why to hard-wire the usage of STRING-BEFORE so badly? My gut feeling is to avoid modifying buffer context in indentation engine at all costs. In the future, if performance with temp buffers will be a real issue, we can add more low level functions for fast operation on string to do some common parsing tasks. We can even extend parse-ppss to deal with BEFORE-STRING. Vitalie