bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#53661: 29.0.50; electric-pair-mode not respecting electric-pair-inhi


From: Ergus
Subject: bug#53661: 29.0.50; electric-pair-mode not respecting electric-pair-inhibit-predicate.
Date: Mon, 31 Jan 2022 20:20:01 +0100

On Mon, Jan 31, 2022 at 08:04:02PM +0200, Eli Zaretskii wrote:
Date: Mon, 31 Jan 2022 18:29:31 +0100
From: Ergus <spacibba@aol.com>
Cc: 53661@debbugs.gnu.org

>> (memq syntax '(?\( ?\" ?\$))
>>
>> So, for other pairs, the function electric-pair-inhibit-predicate is
>> never called.
>
>The above condition looks at the _syntax_ of a character, not at the
>character itself.  So what do you find "hard-coded" there,and what
>kind of pairs of characters did you want to add that don't have one of
>those syntaxes?

Hi Eli:

I wanted to add "<>" so I added to my init:

(add-to-list 'electric-pair-pairs '(?< . ?>))

And it didn't work because of the hard-coded syntaxes?

Adding to the list worked correctly, What didn't work was to use the
electric-pair-inhibit-predicate that was never called, so a < always
inserted a >.

What is the syntax of ?< in the mode where you wanted to add that?

It is just c++-mode.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]