From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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: Sun, 01 Dec 2019 19:59:54 +0200 Message-ID: <83imn0lyed.fsf@gnu.org> References: <20191130143638.GA6716@ACM> <20191201150738.GB5085@ACM> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="177471"; mail-complaints-to="usenet@blaine.gmane.org" Cc: yyoncho@gmail.com, 38406@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 01 19:01:16 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 1ibTX0-000jyg-Ja for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Dec 2019 19:01:14 +0100 Original-Received: from localhost ([::1]:53882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibTWz-0004V6-Dd for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Dec 2019 13:01:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52552) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibTWr-0004Ui-Mi for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 13:01:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibTWp-0006Af-DJ for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 13:01:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58929) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ibTWo-00069l-J1 for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 13:01:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ibTWo-0000uB-IP for bug-gnu-emacs@gnu.org; Sun, 01 Dec 2019 13:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Dec 2019 18:01: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.15752232213421 (code B ref 38406); Sun, 01 Dec 2019 18:01:02 +0000 Original-Received: (at 38406) by debbugs.gnu.org; 1 Dec 2019 18:00:21 +0000 Original-Received: from localhost ([127.0.0.1]:36669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibTW9-0000t7-50 for submit@debbugs.gnu.org; Sun, 01 Dec 2019 13:00:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ibTW6-0000sp-W0 for 38406@debbugs.gnu.org; Sun, 01 Dec 2019 13:00:19 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ibTW0-0005IZ-9E; Sun, 01 Dec 2019 13:00:13 -0500 Original-Received: from [176.228.60.248] (port=2184 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ibTVx-0008JR-5F; Sun, 01 Dec 2019 13:00:11 -0500 In-reply-to: <20191201150738.GB5085@ACM> (message from Alan Mackenzie on Sun, 1 Dec 2019 15:07:38 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:172723 Archived-At: > Date: Sun, 1 Dec 2019 15:07:38 +0000 > From: Alan Mackenzie > Cc: 38406@debbugs.gnu.org > > > > There are other possible "fixes", for example modifying these functions > > > so that they don't use self-insert-command at all, but somehow I don't > > > think that's what you want. > > > I don't think that the code that is implemented against the contract listed > > in the hook documentation should be rewritten. If electric stuff is so > > that important and there is no way to disable it by default then at > > least a function to unbind the electric functionality the > > documentation of post-self-insert-hook should state: "Don't rely on > > this hook in cc derived modes because of {implementation details}. If > > you still want to use post-self-insert-hook disable use > > {implementation details} to turn electric off." > > The problem you have stumbled over is more of a political problem than a > technical one. Can we please make it technical again? Why can't the CC Mode function which temporarily disables post-self-insert-hook call the hook functions after it does its thing? (I think I already asked this in the past, but I cannot find that question of any discussion of it.)