lang/ruby: don't pop up console on startup

This shouldn't compromise the features that robe provides (like code
completion), it only hides the REPL.
This commit is contained in:
Henrik Lissner 2018-07-11 13:02:00 +02:00
parent 287460cb05
commit 1fc43dacfc
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -77,7 +77,8 @@ environment variables."
(defun +ruby|init-robe () (defun +ruby|init-robe ()
(when (executable-find "ruby") (when (executable-find "ruby")
(cl-letf (((symbol-function #'yes-or-no-p) (lambda (_) t))) (cl-letf (((symbol-function #'yes-or-no-p) (lambda (_) t)))
(ignore-errors (robe-start)) (save-window-excursion
(ignore-errors (robe-start)))
(when (robe-running-p) (when (robe-running-p)
(add-hook 'kill-buffer-hook #'+ruby|cleanup-robe-servers nil t))))) (add-hook 'kill-buffer-hook #'+ruby|cleanup-robe-servers nil t)))))
(add-hook 'enh-ruby-mode-hook #'+ruby|init-robe) (add-hook 'enh-ruby-mode-hook #'+ruby|init-robe)