From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#38406: 27.0.50; post-self-insert-hook does not hold its contract in cc-mode derived modes Date: Thu, 5 Dec 2019 19:14:59 +0000 Message-ID: <20191205191459.GB6252@ACM> References: <20191130143638.GA6716@ACM> <20191201150738.GB5085@ACM> <83imn0lyed.fsf@gnu.org> <20191201192709.GE5085@ACM> <83blsrn58a.fsf@gnu.org> <20191204204159.GA7587@ACM> <798bda88-41a7-361c-c01b-22ca4d6138e0@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="100656"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: yyoncho@gmail.com, 38406@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 05 20:16:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1icwbj-000Q3v-SK for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Dec 2019 20:16:11 +0100 Original-Received: from localhost ([::1]:60026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icwbi-0008IA-Jc for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Dec 2019 14:16:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60872) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icwbb-0008HD-Tp for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2019 14:16:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icwba-0002xR-Sh for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2019 14:16:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39245) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icwba-0002wT-Mi for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2019 14:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1icwba-0001H1-6u for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2019 14:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Dec 2019 19:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38406 X-GNU-PR-Package: emacs Original-Received: via spool by 38406-submit@debbugs.gnu.org id=B38406.15755733044769 (code B ref 38406); Thu, 05 Dec 2019 19:16:02 +0000 Original-Received: (at 38406) by debbugs.gnu.org; 5 Dec 2019 19:15:04 +0000 Original-Received: from localhost ([127.0.0.1]:45218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1icwae-0001Eq-DC for submit@debbugs.gnu.org; Thu, 05 Dec 2019 14:15:04 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:54479 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1icwac-0001E9-3W for 38406@debbugs.gnu.org; Thu, 05 Dec 2019 14:15:02 -0500 Original-Received: (qmail 37995 invoked by uid 3782); 5 Dec 2019 19:15:00 -0000 Original-Received: from acm.muc.de (p4FE15A39.dip0.t-ipconnect.de [79.225.90.57]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 05 Dec 2019 20:14:59 +0100 Original-Received: (qmail 6471 invoked by uid 1000); 5 Dec 2019 19:14:59 -0000 Content-Disposition: inline In-Reply-To: <798bda88-41a7-361c-c01b-22ca4d6138e0@yandex.ru> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:172926 Archived-At: Hello, Dmitry. On Wed, Dec 04, 2019 at 23:04:27 +0200, Dmitry Gutov wrote: > On 04.12.2019 22:41, Alan Mackenzie wrote: > > +(defvar c--unsafe-post-self-insert-hook-functions > > + '(smie-blink-matching-open > > + electric-pair-post-self-insert-function > > + blink-paren-post-self-insert-function > > + electric-indent-post-self-insert-function > > + electric-layout-post-self-insert-function > > + electric-quote-post-self-insert-function) > > + "Known unsafe functions when members of `post-self-insert-hook' in CC Mode") > I don't see how filtering out a bunch of popular consumers of > post-self-insert-hook can make it "act as per its contract again". Think of it more as "filtering in" all functions on post-self-insert-hook _except_ the ones mentioned, which are harmful in CC Mode. > More surprisingly, what did smie-blink-matching-open and > blink-paren-post-self-insert-function ever do so wrong? Neither of them > modifies the buffer's contents. No, but if allowed to run, they would probably double the blink time on the paren match, which would be a Bad Thing. -- Alan Mackenzie (Nuremberg, Germany).