Allow set-repl-handler! to accept multiple modes

As first argument.
This commit is contained in:
Henrik Lissner 2018-07-14 20:18:02 +02:00
parent 6d136f249f
commit 6efd9d4573
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -9,10 +9,11 @@
`+eval/open-repl' and filled with the `:repl' setting.") `+eval/open-repl' and filled with the `:repl' setting.")
;;;###autodef ;;;###autodef
(defun set-repl-handler! (mode command) (defun set-repl-handler! (modes command)
"Define a REPL for a mode. MODE is a major mode symbol and COMMAND is a "Define a REPL for MODES. MODES is either a single major mode symbol or a list
function that creates and returns the REPL buffer." of them. COMMAND is a function that creates and returns the REPL buffer."
(push (cons mode command) +eval-repls)) (dolist (mode (doom-enlist modes))
(setf (alist mode +eval-repls) command)))
;; FIXME obsolete :repl ;; FIXME obsolete :repl
;;;###autoload ;;;###autoload