Okay, the implementation of electric-pair-mode is pretty ridiculous. The global hook electric-pair-open-newline-between-pairs-psif, even when electric-pair-mode is locally “turned off”, can cause weird behavior. For example,
#lang racket/base
(lambda () |(void))
Suppose point is at | (not an actual character in the buffer), breaking the line with RET will result in something like
#lang racket/base
(lambda ()
|
(void))
To accommodate for this, racket-hash-lang-mode should setq-localelectric-pair-open-newline-between-pairs to nil. Probably this should also be considered a upstream bug, but electric-pair-mode is already crazy enough (why the hell do they use global hooks?).
Okay, the implementation of
electric-pair-mode
is pretty ridiculous. The global hookelectric-pair-open-newline-between-pairs-psif
, even whenelectric-pair-mode
is locally “turned off”, can cause weird behavior. For example,Suppose point is at
|
(not an actual character in the buffer), breaking the line withRET
will result in something likeTo accommodate for this,
racket-hash-lang-mode
shouldsetq-local
electric-pair-open-newline-between-pairs
tonil
. Probably this should also be considered a upstream bug, butelectric-pair-mode
is already crazy enough (why the hell do they use global hooks?).