How can I get
electric-pair-mode to not pair quotation marks (single or double)? I still want it to pair everything else (brackets, braces, etc.), just not quotes.
Add the following to your emacs init file:
(setq electric-pair-inhibit-predicate (lambda (c) (if (char-equal c ?\") t (electric-pair-default-inhibit c))))
Reference from my blog post: https://www.topbug.net/blog/2016/09/29/emacs-disable-certain-pairs-for-electric-pair-mode/
It appears you cannot. The various customizations only allow you to add pairs.
If you're willing to use a different package to do your pairing, you can try smartparens. You can set quotation marks to not pair as follows:
(sp-pair "'" nil :actions :rem) (sp-pair "\"" nil :actions :rem)
Update: @xuhdev's answer is preferable as it doesn't interfere with Emacs' code.
Might be worth a feature request having that customizable. For the moment, it looks trivial to modify the code in question.
Afterwards load your own variant of electric-pair-post-self-insert-function
Open elec-pair.el and copy from there
(defun electric-pair-post-self-insert-function () [ ... ] )
Then look into the body for any
(memq syntax '(?\( ?\) ?\" ?\$))
and delete the
?\" from there, i.e.
(memq syntax '(?\( ?\) ?\$))
but not delete ?\" at other places(!)
and reload i.e. evaluate the changed function.
To reload at next session put it into some file "my-changed-stuff.el" and load this from your init-file.