I would like electric-pair-mode to be enabled only in the buffers where I am editing, say, Emacs Lisp.
But it seems that electric-pair-mode is a "global minor mode": if it is activated in one buffer, it automatically becomes active in all buffers. Thus, including
(electric-pair-mode) in the
emacs-lisp-mode-hook does not behave in a useful way.
Is there a way to configure Emacs to only use electric pairs in some buffers?