From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#18826: 24.3.94; c++-mode bad indentation after programmatic insert with locally changed syntax table Date: Mon, 27 Oct 2014 17:21:48 +0700 Message-ID: <544E1CBC.4000206@yandex.ru> References: <20141026173849.82988.qmail@mail.muc.de> <544D9AA6.5@yandex.ru> <20141027085328.GA2771@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1414405417 32027 80.91.229.3 (27 Oct 2014 10:23:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Oct 2014 10:23:37 +0000 (UTC) Cc: 18826@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 27 11:23:30 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1XihST-0008AC-67 for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Oct 2014 11:23:29 +0100 Original-Received: from localhost ([::1]:60579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XihSS-00050r-LU for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Oct 2014 06:23:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XihSI-0004zE-30 for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2014 06:23:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XihSA-0000eU-Jo for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2014 06:23:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XihS2-0000e5-9o; Mon, 27 Oct 2014 06:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XihS1-0000Zv-PQ; Mon, 27 Oct 2014 06:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Mon, 27 Oct 2014 10:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18826 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 18826-submit@debbugs.gnu.org id=B18826.14144053222157 (code B ref 18826); Mon, 27 Oct 2014 10:23:01 +0000 Original-Received: (at 18826) by debbugs.gnu.org; 27 Oct 2014 10:22:02 +0000 Original-Received: from localhost ([127.0.0.1]:36395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XihR3-0000YS-BG for submit@debbugs.gnu.org; Mon, 27 Oct 2014 06:22:01 -0400 Original-Received: from mail-pd0-f180.google.com ([209.85.192.180]:61901) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XihR0-0000YB-Bi for 18826@debbugs.gnu.org; Mon, 27 Oct 2014 06:21:58 -0400 Original-Received: by mail-pd0-f180.google.com with SMTP id ft15so3448174pdb.39 for <18826@debbugs.gnu.org>; Mon, 27 Oct 2014 03:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=PVWJQni8P5H2SoQRVYPmbsebmCpUbqigugbcTOKX4xE=; b=xDv94r560eNszpiF63uheE05v9iUNDT4BO+szuwMIlL8YFWTgCfecOyJmUQxPMzVwW OXltvDq0Xh9/ZevwJZNEoLjURbU3ZtZKDcSy7P3fRO5wL7NieU3qPXmUl88cThzXHjFj zzkuxRP2UWdry2+S/PZpJ0faUR1t6ZidFBhzNmlviWbzygQUH7QdsVDTZfPzFOh3r/Tp 0vkOyfG1hgZu/hyISFB1gsfVpGGlxKrdvOg7eK2BVXE51LAEvKiLQH9qXyk28FDw0loT PgJZGMrNLZJ0Xp5jjARZ2MvcTg85AG1efyGGu4Dz++bhdVxE9npo1GlnkyNnZA+Fe70L CEIg== X-Received: by 10.67.22.1 with SMTP id ho1mr23774381pad.4.1414405312022; Mon, 27 Oct 2014 03:21:52 -0700 (PDT) Original-Received: from [192.168.2.52] ([113.160.248.69]) by mx.google.com with ESMTPSA id cq3sm9299730pbc.28.2014.10.27.03.21.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Oct 2014 03:21:51 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: <20141027085328.GA2771@acm.acm> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95150 On 10/27/2014 03:53 PM, Alan Mackenzie wrote: > They (that is, the c-is-sws and c-in-sws properties) mark syntactic > whitespace. They're set during calls to c-forward-syntactic-ws and > c-backward-syntactic-ws, which are used all over the place, just as much > in the indentation engine, and the commands, as in font lock. They're > intended to mark CPP structures and, especially, massive comments, such > as are frequently found at the beginning of source files. They're > intended to speed up the skipping of WS. It sounds like it can be implemented in syntax-propertize-function without much trouble. Adding such props in movement commands sounds counter-intuitive, although I can see how this can be useful from the performance perspective. > It's already implemented and running. :-) The syntax-table properties > in the vicinity of a buffer change are removed and re-applied with tender > loving care. Cool. It'll require a patch to syntax.el in the trunk, right? > No it's not. Apologies. I hadn't read your email properly. That's good. I'll take that to mean that < and > having belonging to paren class won't stop them from being propertized in the before/after-change hooks like you described. Then I'll keep the code as-is, thanks!