all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Morgan Willcock <morgan@ice9.digital>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Accidental change of behaviour for electric-layout-mode?
Date: Tue, 24 Sep 2024 20:39:42 +0100	[thread overview]
Message-ID: <87r098n8n5.fsf@ice9.digital> (raw)
In-Reply-To: <86msjwdgcq.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Sep 2024 22:03:17 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Morgan Willcock <morgan@ice9.digital>
>> Cc: emacs-devel@gnu.org
>> Date: Tue, 24 Sep 2024 19:59:47 +0100
>> 
>> Eli Zaretskii <eliz@gnu.org> 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



  reply	other threads:[~2024-09-24 19:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23 20:58 Accidental change of behaviour for electric-layout-mode? Morgan Willcock
2024-09-24 11:23 ` Eli Zaretskii
2024-09-24 12:12   ` João Távora
2024-09-24 12:59     ` Eli Zaretskii
2024-09-24 18:59       ` Morgan Willcock
2024-09-24 19:03         ` Eli Zaretskii
2024-09-24 19:39           ` Morgan Willcock [this message]
2024-09-25 11:27             ` Eli Zaretskii
2024-09-25 13:50               ` Morgan Willcock
2024-09-25 15:57                 ` Eli Zaretskii
2024-10-03 16:22                   ` Morgan Willcock
2024-10-03 18:06                     ` Eli Zaretskii
2024-10-05 10:13                       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r098n8n5.fsf@ice9.digital \
    --to=morgan@ice9.digital \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.