all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ej32u--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 42654@debbugs.gnu.org
Subject: bug#42654: Using electric-pair-inihibit-predicate won't work for all members of electric-pair-pairs
Date: Sat, 01 Aug 2020 17:31:55 +0000	[thread overview]
Message-ID: <1TK38SyOLkqabqkCrOYwMFSlY5dxH2-9LZVgtl-xgLwFmdAta5cLCMcWRLXya124ex_cHppAJJOM0nyVVS16JUlTv7zWNdB2oy68gM1cNYw=@protonmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2020-08-01 17:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-01 17:31 ej32u--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-06-06 15:28 ` bug#42654: Using electric-pair-inihibit-predicate won't work for all members of electric-pair-pairs 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='1TK38SyOLkqabqkCrOYwMFSlY5dxH2-9LZVgtl-xgLwFmdAta5cLCMcWRLXya124ex_cHppAJJOM0nyVVS16JUlTv7zWNdB2oy68gM1cNYw=@protonmail.com' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=42654@debbugs.gnu.org \
    --cc=ej32u@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.