To reproduce: emacs -Q --eval '(setq debug-on-error t)' M-x electric-pair-mode RET C-x h DEL Then Emacs signals an error. The backtrace is attached.