From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.ciao.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Apropos 54f297904e0c: Temporarily comment out CC Mode from tests which are incompatible with it. Date: Mon, 21 Jan 2019 22:41:07 +0000 Message-ID: <875zuhab24.fsf@gmail.com> References: <20190118175437.GA4095@ACM> <20190118225303.GB4095@ACM> <87fttppc7o.fsf@gmail.com> <20190119110729.GA4644@ACM> <875zukpxe2.fsf@gmail.com> <20190119174505.GA4749@ACM> <87k1j0sble.fsf@gmail.com> <20190119205833.GB4749@ACM> <20190121204544.GC4514@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.org; posting-host="ciao.gmane.org:195.159.176.228"; logging-data="203774"; mail-complaints-to="usenet@ciao.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 21 23:41:32 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gliFz-000qqm-WB for ged-emacs-devel@m.gmane.org; Mon, 21 Jan 2019 23:41:28 +0100 Original-Received: from localhost ([127.0.0.1]:35282 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gliFz-0005yx-1j for ged-emacs-devel@m.gmane.org; Mon, 21 Jan 2019 17:41:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gliFt-0005ye-9D for emacs-devel@gnu.org; Mon, 21 Jan 2019 17:41:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gliFr-0000lW-4b for emacs-devel@gnu.org; Mon, 21 Jan 2019 17:41:21 -0500 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:54717) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gliFq-0000i8-JR for emacs-devel@gnu.org; Mon, 21 Jan 2019 17:41:18 -0500 Original-Received: by mail-wm1-x32a.google.com with SMTP id a62so12340109wmh.4 for ; Mon, 21 Jan 2019 14:41:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=W4gXF4PYq9nPs0PZyDP2gpj74wNVKVf6h61WzMp/fTk=; b=r82XcbFlNZKyD+1gaxWOs8vrdvA39D74moQbQJr7ScS5P6SjuD2BHgtNl/JQ1fEDlX BFLOHX8IGz3z7hDlG/ofeMWLU3ZPAOumUEfATem0dlrxcmtXRXn1WCMketZ+NphEo+nW XdW+X1CCVlWHjVZcOwIsbsS3x4VaanLdJID8Soni+7CU/9tRhUuRqPHQGO+oCGLFKhQ6 d4yuMVma4i5vagMGb8W8ronlpZcmWgYaSFFK/xnDYaz9ooCtpnHudhqnj0080Rbe18xP DcCLhutAHRkjsJG8MCJOdtEPUwz2QsvRHX1uQE9CJLm/0PJt3j+C/bq66qsjdExXmur0 ++Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=W4gXF4PYq9nPs0PZyDP2gpj74wNVKVf6h61WzMp/fTk=; b=KhOx7Lwo/kBRU/jJmVDC8+MDCQIqS2N6JyzmCpa/6jdCVgCOiq8RfYzsKyKgjhUEZI F0AKAXNOgB81kz3n5IGYbtFy1eeKMhUq4t2xsRCFot6vMbWXi8dospXxDHVvVQ5e+RS1 ExN7kyhzY87t5R4/2vbTzvIuMJLOMWHY2sZPdWwptcpkrR/dKTf48T/w0JBz4Rty6hJs W2yR0k1ksHP2KjKM/Yu2bT8uVZPt7w4YVLvvJCxkQhuhInYscmWBel7CDBT1ORIBDoZh VUWcqoxBv7HEmbhkSAkido2xf4CGeXtyHovab3zI+VlbbnbXEiOHUZw68QTTmfzJTllD rH5w== X-Gm-Message-State: AJcUukfcaAFSb/bxLY4Myj0OZM9edlLyx0PuZU6lAYtxfyvVEoxlsP7/ 8SsMD+hooWLMBlXvi73kTt8fprmo X-Google-Smtp-Source: ALg8bN7/6MuvKzfhztRZD1TJjvdxj1Fclrrwr/hTKqhwsmju2TFr2NGXIBjyPvuCL4WGnNYnB+4pyA== X-Received: by 2002:a7b:c757:: with SMTP id w23mr1036344wmk.59.1548110473559; Mon, 21 Jan 2019 14:41:13 -0800 (PST) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id q3sm103542828wrn.84.2019.01.21.14.41.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jan 2019 14:41:12 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Mon, 21 Jan 2019 16:46:13 -0500") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:232588 Archived-At: Stefan Monnier writes: >>> If you use electric-layout-mode and electric-pair-mode, then all that's >>> left for c-electric-brace is to call self-insert-command. >> No. There's more to it than that. > You mean the c-cleanup-list, I guess. Indeed, before c-electric-brace > can be turned into an alias for self-insert-command, we'd need to add > another post-self-insert-hook which implements the > c-cleanup-list feature. According to its docstring, c-cleanup-list only takes effect when c-auto-newline is on. So, in the interim we could consider doing either this: (let ((post-self-insert-hook (unless c-auto-newline post-self-insert-hook= ))) (self-insert-command arg)) Or maybe just (let ((electric-layout-mode (not c-auto-newline)) (electric-pair-mode (not c-auto-newline))) (self-insert-command arg)) As fair as I read the code, it is only when c-auto-newline is turned on that any problems stated thus far exist. My proposal is that e-l-m and e-p-m defer to c-auto-newline, if is turned on. This buys us time while we develop a potentially better alternative that could, if Alan accepts it, effectively _become_ c-auto-newline. Or, if Alan chooses not to, become just an alternative way to do the same. It's not optimal, but I could live with that. But during that time (and notably if i.e. Emacs 27 is frozen), then users that _don't_ use c-auto-newline can enjoy an electric-pair-mode, electric-layout-mode, or any other global minor-mode that uses on post-self-insert-hook without any regressions in behaviour. As the code stands now, if we don't do anything, there's a good chance that users will complain (I remind everyone that CC-mode is used for the C++/C/Java modes). Users that _do_ use c-auto-newline see improved behaviour in some cc-mode areas, such as partial e-p-m support, and perhaps degraded behaviour in others, namely if they use other global minor-modes. Jo=C3=A3o