unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42654: Using electric-pair-inihibit-predicate won't work for all members of electric-pair-pairs
@ 2020-08-01 17:31 ej32u--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-06-06 15:28 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: ej32u--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-08-01 17:31 UTC (permalink / raw)
  To: 42654

[-- Attachment #1: Type: text/plain, Size: 999 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 3199 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-07  9:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-01 17:31 bug#42654: Using electric-pair-inihibit-predicate won't work for all members of electric-pair-pairs ej32u--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-06 15:28 ` Lars Ingebrigtsen
2022-06-07  2:08   ` ej32u--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-07  9:53     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).