*Notice:* I don't believe this is a bug, but I would like to bring up a discussion about the issue. To illustrate the matter, using `emacs -Q', please evaluate the following snippet: #+begin_src emacs-lisp (progn (elisp-enable-lexical-binding 'interactive) (defun org-electric-pair-inhibit (char) (let ((pairs '(?* ?/ ?_ ?= ?~ ?+))) (or (when (member char pairs) (not (region-active-p))) (electric-pair-default-inhibit char)))) (autoload #'setq-mode-local "mode-local") (setopt electric-pair-mode t) (setq-mode-local org-mode electric-pair-pairs (append electric-pair-pairs '((?* . ?*) (?/ . ?/) (?_ . ?_) (?= . ?=) (?~ . ?~) (?+ . ?+))) electric-pair-inhibit-predicate #'org-electric-pair-inhibit) (find-file "temp.org")) #+end_src Results in: - The `org-electric-pair-inhibit' function is ignored, and the characters that should only be inserted in pairs when the region is active are inserted in pairs regardless. After a bit of investigation, I found that characters listed in `electric-pair-pairs' are always inserted in pairs unconditionally. The function defined in `electric-pair-inhibit-predicate' is called only for the pairs defined in the syntax table of the corresponding major mode. Although I believe this was a design decision, in my view, the `electric-pair-inhibit-predicate' function should also apply to characters in the `electric-pair-pairs' list. I'm not sure about the implications for other use cases, but a little change made to the `electric-pair-post-self-insert-function' solves the issue (diff attached). Do you think a change like this could be considered? Thanks in advance. -- Regards, Fernando de Morais.