From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Morgan Willcock Newsgroups: gmane.emacs.devel Subject: Re: Accidental change of behaviour for electric-layout-mode? Date: Tue, 24 Sep 2024 20:39:42 +0100 Message-ID: <87r098n8n5.fsf@ice9.digital> References: <87wmj2dr4q.fsf@ice9.digital> <86v7yle1ma.fsf@gnu.org> <86cyktdx68.fsf@gnu.org> <871q18op24.fsf@ice9.digital> <86msjwdgcq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40339"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 24 21:40:36 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1stBOk-000AGY-3J for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Sep 2024 21:40:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stBO8-0001aH-IV; Tue, 24 Sep 2024 15:39:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stBO6-0001Zt-Bq for emacs-devel@gnu.org; Tue, 24 Sep 2024 15:39:54 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stBO0-0007Sa-09; Tue, 24 Sep 2024 15:39:53 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 0FCE7C0003; Tue, 24 Sep 2024 19:39:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital; s=gm1; t=1727206784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DLzZn7uGY7x2oR/NrFA9B0DaWjbaE7b2QgINE0INv7U=; b=KkbsICW6Ji5A9sLAPTGJvxG30ZKb90fjyoRtmyjrcERTt+Mwo2AZeEiYH+VewVvvOzgcOd LDs2GMcjF3yWRsYwgAXME621GSzR0uVWzLRoWGPPdvyTgVTGoV1H7JNMxk0uEdwJmI4TWX N+10D3ZghZKs+jXPhw76xD/SvowVCCO5paykYdstkl7kbtZQcA5312zl5UTiV7DslOBp9t a2Pzg1/B4Agc/am1KUed8U8jKoA9CxKfYq1CunwraiCiOEJeyRE/pMErCDEfD8OfKiG3ej GNHhSjiElDD94INwI2OCc7JGo6HThJQSg/ohGDDBUyWOAUD9Scli8gUBvOZ9vg== In-Reply-To: <86msjwdgcq.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Sep 2024 22:03:17 +0300") X-GND-Sasl: morgan@ice9.digital Received-SPF: pass client-ip=217.70.183.198; envelope-from=morgan@ice9.digital; helo=relay6-d.mail.gandi.net X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324045 Archived-At: Eli Zaretskii writes: >> From: Morgan Willcock >> Cc: emacs-devel@gnu.org >> Date: Tue, 24 Sep 2024 19:59:47 +0100 >> >> Eli Zaretskii writes: >> >> >> You can revert it (or make it optional), etc. >> > >> > Thanks. So Morgan, please post a patch that makes this feature >> > opt-in. >> >> Patch is attached. > > Thanks, but shouldn't the new variable be a defcustom, i.e. a user > option? AFAIU, the preference is on the user level. I am following the lead of electric-layout-allow-duplicate-newlines which is not a user option. For my use case, electric-layout-rules is being set by a major-mode and the functions in those rules would need to be paired with the ability to insert a newline within a comment. If you needed another example of a major-mode configuring it, python-mode is also setting rules at the mode level: https://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/progmodes/python.el?id=dfecd6037d5ebe5778c40ff7b38bfcbaa3ef779e If there is any doubt about the usage of the new variable I am happy to just put the original behaviour back and omit the new option for the moment. > Also, this needs a NEWS entry. Does it need a NEWS entry if it is not a user option and the default behaviour is the same as Emacs 29? -- Morgan Willcock