You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally, if you have electric-indent-mode disabled, then RET (aka C-m) does nothing more than insert a newline; if you want to insert a newline and automatically indent the next line, you'd type C-j to invoke newline-and-indent. However, gnuplot-mode clobbers the existing definition of RET to behave the same as C-j, which forces this behavior on users who have explicitly chosen not to use it:
(define-key map "\C-m"#'newline-and-indent)
The proper thing to do is to simply not do this at all; gnuplot-mode already sets the indent-line-function variable, and that's really all that's needed for electric-indent-mode to automatically indent whenever a newline is inserted. gnuplot-mode should be leaving all electricity-related functionality in the hands of that minor mode (this includes its remapping of the } key to gnuplot-electric-insert, which also shouldn't be done).
The text was updated successfully, but these errors were encountered:
Normally, if you have
electric-indent-mode
disabled, thenRET
(akaC-m
) does nothing more than insert a newline; if you want to insert a newline and automatically indent the next line, you'd typeC-j
to invokenewline-and-indent
. However, gnuplot-mode clobbers the existing definition ofRET
to behave the same asC-j
, which forces this behavior on users who have explicitly chosen not to use it:The proper thing to do is to simply not do this at all; gnuplot-mode already sets the
indent-line-function
variable, and that's really all that's needed forelectric-indent-mode
to automatically indent whenever a newline is inserted. gnuplot-mode should be leaving all electricity-related functionality in the hands of that minor mode (this includes its remapping of the}
key tognuplot-electric-insert
, which also shouldn't be done).The text was updated successfully, but these errors were encountered: