GNU bug report logs -
#78053
[PATCH] Support strings for electric-pairs.
Previous Next
Full log
Message #62 received at submit <at> debbugs.gnu.org (full text, mbox):
Elijah Gabe Pérez <eg642616 <at> gmail.com> writes:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> This is a kind of property for pairs (only for strings pairs), that
>>> tells to `electric-pairs` to insert a space before the first pair.
>>>
>>> I couldn't find a better way to document this in that limited-size tag.
>>
>> If you explain to me what it does, I can try finding more clear
>> wording.
>
> That must be a list of 3 elements where specifies: pair start, pair end,
> and a non-nil value which specifies to insert an extra space after `pair
> start` was typed.
>
> Thus, if electric-pair-pairs is set like this:
> (setq electric-pair-pairs '(("/*" " */" t)))
>
> After the pair start was typed it expands to this:
> /* | */
> ^ cursor
Instead of hard-coding the extra space, how about allowing the third
element to also be a string, with that string being inserted after the
pair start? In java-mode, I'd then add an element ("\"\"\"" "\"\"\""
"\n") since Java-style multi-line strings start with a mandatory
linebreak after the opening triple-quote.
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.