From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via CC-Mode-help Newsgroups: gmane.emacs.cc-mode.general,gmane.emacs.devel Subject: Re: feature/android a5b74e2ff62: Initialize text conversion hooks for each C Mode buffer Date: Fri, 27 Oct 2023 21:18:55 -0400 Message-ID: References: <168629733551.31969.16984560043233541806@vcs2.savannah.gnu.org> <20230609075536.0E919C1924D@vcs2.savannah.gnu.org> <87fs1vy51y.fsf@yahoo.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29384"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org To: Po Lu Original-X-From: cc-mode-help-bounces@lists.sourceforge.net Sat Oct 28 03:19:26 2023 Return-path: Envelope-to: sf-cc-mode-help@m.gmane-mx.org Original-Received: from lists.sourceforge.net ([216.105.38.7]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qwXz3-0007SI-Sy for sf-cc-mode-help@m.gmane-mx.org; Sat, 28 Oct 2023 03:19:26 +0200 Original-Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qwXyv-0004fS-G4; Sat, 28 Oct 2023 01:19:17 +0000 Original-Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qwXyu-0004fL-PP for cc-mode-help@lists.sourceforge.net; Sat, 28 Oct 2023 01:19:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:MIME-Version:Date:References: Message-ID:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZB5pSeYR38HzVuxECyq9yGP3Tkv0V2bz9h0kNJpFHLM=; b=m6b9v7u1hnPcTh2/f/wX0YKLya zykxJLBeGJNFBSzEiEkfSwW1pZqvH6F5b0vqqcRDJEHfVC0Jz50FHQ3idRfqq1t2dT2qlHBVhjknP SeMqFkNmu3cPzJ7rNFt2NqkgZGWlepdF3FFJCfT+c/nFSL9or7h0zXGPojR67c4oU/1s=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:MIME-Version:Date:References:Message-ID:In-Reply-To:Subject: Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ZB5pSeYR38HzVuxECyq9yGP3Tkv0V2bz9h0kNJpFHLM=; b=O7bxbQKSx9e5cr4ecsYfTjUc9e A+5wIaxMj6lfk2UgcbZtewM9Q6DqyzICwLDArMG+t7lBQKptoxbKItA+ime+9jM/orACXwPuHpp5G K8LNkfx554H+4cvcIHMYjFVKP9x+jiEcicMVYHpb3XB9rcRCrlFKrteMS6+CHSDisnZ8=; Original-Received: from eggs.gnu.org ([209.51.188.92]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qwXys-0005iq-OO for cc-mode-help@lists.sourceforge.net; Sat, 28 Oct 2023 01:19:16 +0000 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwXyc-00059N-Td; Fri, 27 Oct 2023 21:19:00 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DD1CD4424A4; Fri, 27 Oct 2023 21:18:56 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1698455936; bh=bdWb46fmEN7VR22nWqNI9NfT1KFR9/KQupKi72EZ7lI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Bq2y1D1pWvCecRWKqiqdByUvknJhpxH3rf40tEjXUnCFpTExOBJkQmbpXjsO+No01 fvUfrpLsUd1yiWMWqBQ6M9FjDHQoECvHGWCK/W4IKzKomq10dhP+Jr6X0Vv+FL3lNm 96zUA5cKtCAa6py5KD609BlUnDnOzJSp4JykRvsUB297LSiNzPTu6SRRprxj3tns00 Ny6wsIssrUNXTl3sV1eZzC1qgtnnlFxR96+GorG18ywTS4R6qx7CJrDXp2v0v9EIkk gcVyq2k+7L0fXDzbCGMSyJCMpC/sitY1Li2srt4HXRPa/SH9kNn9NWh/mHpUB9Dadm DHYlMxuf/DPbA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0480744248D; Fri, 27 Oct 2023 21:18:56 -0400 (EDT) Original-Received: from pastel (unknown [45.72.195.71]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CF69A1202CE; Fri, 27 Oct 2023 21:18:55 -0400 (EDT) In-Reply-To: <87fs1vy51y.fsf@yahoo.com> (Po Lu's message of "Sat, 28 Oct 2023 08:16:41 +0800") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Headers-End: 1qwXys-0005iq-OO X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Bug reports, feature requests, and general talk about CC Mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cc-mode-help-bounces@lists.sourceforge.net Xref: news.gmane.io gmane.emacs.cc-mode.general:8552 gmane.emacs.devel:311945 Archived-At: >> Why is this specific to CC-mode? >> Is it because other modes handle electricity via the >> `post-self-insert-hook` instead? > Correct. Thanks for confirming. >> And why is the hook function added globally? >> Wouldn't it be better to add it buffer-locally instead? > It's installed buffer-locally, since the hook variable itself is > buffer-local. Ah, I missed that. I just changed the code to make it explicit. Stefan