GNU bug report logs - #78053
[PATCH] Support strings for electric-pairs.

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Fri, 25 Apr 2025 00:31:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
To: Rudolf Schlatte <rudi <at> constantly.at>
Cc: eliz <at> gnu.org, 78053 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#78053: [PATCH] Support strings for electric-pairs.
Date: Sat, 14 Jun 2025 22:41:54 -0600
Rudolf Schlatte <rudi <at> constantly.at> 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.




This bug report was last modified 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.