`racket-hash-lang-mode` should turn off `electric-pair-open-newline-between-pairs`
usaoc opened this issue · comments
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-local
electric-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?).