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.")
;;;###autodef
(defun set-repl-handler! (mode command)
"Define a REPL for a mode. MODE is a major mode symbol and COMMAND is a
function that creates and returns the REPL buffer."
(push (cons mode command) +eval-repls))
(defun set-repl-handler! (modes command)
"Define a REPL for MODES. MODES is either a single major mode symbol or a list
of them. COMMAND is a function that creates and returns the REPL buffer."
(dolist (mode (doom-enlist modes))
(setf (alist mode +eval-repls) command)))
;; FIXME obsolete :repl
;;;###autoload