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
racket-repl visits racket-repl-command-file (without visibly selecting
the buffer) and does racket--repl-run. Unless the major-mode is
racket-mode or racket-hash-lang-mode, the run will complain with an
error message.
Typically this won't happen because visiting a .rkt file will, in
general, automatically set the buffer's major-mode to racket-mode due
to us setting auto-mode-alist by default. Or maybe the user changes
auto-mode-alist to use racket-hash-lang-mode.
But a user's configuration could override this, intentionally or not,
possibly with surprising results. There are various mechanisms for
choosing the mode:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html
A user probably will want to figure out and change their configuration
to set a major-mode consistently when opening .rkt files generally.
Regardless/meanwhile, we can at least avoid the racket-repl error
message by forcing the racket-repl-command-file buffer to use
racket-mode. (Even if a user prefers racket-hash-lang-mode for
editing, it shouldn't matter if we use racket-mode here.)
0 commit comments