Subject: Re: bug#78053: [PATCH] Support strings for electric-pairs.

From: Elijah Gabe Pérez <[email-masked]>
Date: Sat, 14 Jun 2025 22:41:54 -0600

Rudolf Schlatte <[email-masked]> writes:

> FWIW, I'd love to have this customizable instead of being a hard-coded
> space character.  The use case is the multi-line strings of recent Java
> versions, which start with three quotation marks (") and a mandatory
> line break, and end with three quotation marks.
>
> String exampleString = """
>       This is a muli-line Java string.  The shortest sequence of leading
>       white space (4 spaces in this case) will be ignored.
>       """;
>
> It would be nice if, in java-mode, after typing three quotation marks
> the buffer would end up like this (with "|" denoting the cursor
> position):
>
> String exampleString = """
>     |"""

In my tests that behavior is possible.

Ofc, this kind of pairs is limited to comparasion of characters one
(this only inserts), but I think it's more than enough for most cases.

-- 
                                          - E.G via GNU Emacs and Org.