GNU bug report logs - #42654
Using electric-pair-inihibit-predicate won't work for all members of electric-pair-pairs

Previous Next

Package: emacs;

Reported by: ej32u <at> protonmail.com

Date: Sat, 1 Aug 2020 18:26:01 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: ej32u <at> protonmail.com
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: Using electric-pair-inihibit-predicate won't work for all members of
 electric-pair-pairs
Date: Sat, 01 Aug 2020 17:31:55 +0000
[Message part 1 (text/plain, inline)]
Hello,

This is what I understood from testing (Emacs 28.0.50) and the code of electric-pair-mode.

- More pairs can be defined by adding to electric-pair-pairs.
- To use electric-pair-inhibit-predicate, the syntax of the character must be one of '(?\( ?\" ?\$).

- In Org mode, it is convenient to have pairs for "~", "+", "_", and "/". These characters are not in the syntax classes required to run the inhibition function.
- The syntax class of the characters can be modified, such as with (modify-syntax-entry ?* "$").

- Once the syntax class is modified, the characters are automatically paired by electric-pair-mode. This means that the characters then do no need to be added to electric-pair-pairs.

I think it is a bug that electric-pair-inhibit-predicate won't be run when checking members of electric-pair-pairs. Yes, the syntax can be modified, but that makes the adding of the pair to electric-pair-pairs redundant, no?

Am I misunderstanding the purpose of these variables?

Thank you.
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 39 days ago.

Previous Next


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