Merge pull request #4675 from samspills/scala-open-repl

+scala/open-repl don't kill non-existant sbt buffer
This commit is contained in:
Henrik Lissner 2021-02-24 11:00:17 -05:00 committed by GitHub
commit 71281bb52e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ Meant to be used for `scala-mode's `comment-line-break-function'."
(if (and (require 'sbt-mode nil t) (if (and (require 'sbt-mode nil t)
(sbt:find-root)) (sbt:find-root))
(let ((buffer-name (sbt:buffer-name))) (let ((buffer-name (sbt:buffer-name)))
(unless (comint-check-proc buffer-name) (when (and (get-buffer buffer-name) (not (comint-check-proc buffer-name)))
(kill-buffer buffer-name)) (kill-buffer buffer-name))
(run-scala) (run-scala)
(get-buffer buffer-name)) (get-buffer buffer-name))