Skip to content

Instantly share code, notes, and snippets.

@twopoint718
Created August 16, 2022 15:10
Show Gist options
  • Save twopoint718/7c531d9c68881c195b03a6a814e318f6 to your computer and use it in GitHub Desktop.
Save twopoint718/7c531d9c68881c195b03a6a814e318f6 to your computer and use it in GitHub Desktop.
Create a Java repl in Emacs
(define-derived-mode
jshell-mode comint-mode "JShell"
"An Emacs mode to interact with an inferior JShell
process. JShell is an interacive Java REPL included from JDK 9
and up."
:syntax-table java-mode-syntax-table
(setq comint-prompt-regexp (concat "^" (regexp-quote "jshell>")))
(make-comint-in-buffer "JShell" nil "jshell"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment