From 6efd9d4573237c31579b20c3b2138a1a9c7f568d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 14 Jul 2018 20:18:02 +0200 Subject: [PATCH] Allow set-repl-handler! to accept multiple modes As first argument. --- modules/feature/eval/autoload/settings.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/feature/eval/autoload/settings.el b/modules/feature/eval/autoload/settings.el index 443678f7d..c8505b6ec 100644 --- a/modules/feature/eval/autoload/settings.el +++ b/modules/feature/eval/autoload/settings.el @@ -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