Subject: Re: bug#79047: Add some multi-character pairs to some major modes.

From: john muhl <[email-masked]>
Date: Sat, 19 Jul 2025 13:51:39 -0500

Eli Zaretskii <[email-masked]> writes:

>> From: Elijah Gabe Pérez <[email-masked]>
>> Date: Fri, 18 Jul 2025 20:04:12 -0600
>> 
>> Since `electric-pair-mode` now supports multi-character pairs, it would
>> be better if some major modes add some of these pairs.
>> 
>> Before making the patch for this (and to avoid doing another regression
>> like bug#77823), here is a list of the modes and their possible pairs:
>> 
>>  - c-like modes
>>      "/*" "*/"
>>  - lua-ts-mode
>>      "--[" "--]"
>>  - texinfo-mode (idk which others one) (based in a Stefan Monnier idea)
>>      "``" "''"
>>  - lisp-mode (common-lisp-mode)
>>     "#|" "|#"
>> 
>> What do you think?
>
> When discussing in a bug report issues related to some specific
> packages, it is usually a good idea to CC the authors/developers of
> those packages, because we cannot be sure they track the bug-gnu-emacs
> list all the time.
>
> I've now added people who I think are relevant to your proposal.
>
> Thanks.

I’m not sure what the question is here but in general if someone finds
something useful to add to lua-ts-mode I’m fine with it; especially if
it comes with tests for the change.

Just reading the above I’d point out that Lua multi-line comments aren’t
symmetrical:

  --[[
  Here is a very
  long comment.
  ]]

and electric-pair-mode already works in that case.

Some people like to add a second pair of dashes before the closing
brackets but they are stylistic, not a requirement.

Elijah, if I missed the point then maybe you could show the proposed
patch to lua-ts-mode.

Thanks.