features/eval: fix #30 (part 2)
This commit is contained in:
parent
6a8b6dd041
commit
e55fdee640
1 changed files with 2 additions and 9 deletions
|
@ -10,18 +10,14 @@
|
||||||
"A hash-table of plists, containing functions for building source code. Used
|
"A hash-table of plists, containing functions for building source code. Used
|
||||||
by `+eval/build', and filled with the `:build' setting")
|
by `+eval/build', and filled with the `:build' setting")
|
||||||
|
|
||||||
(defvar +eval--repls nil
|
|
||||||
"A list of `rtog/add-repl' arguments.")
|
|
||||||
|
|
||||||
;; remove ellipsis when printing sexp in message buffer
|
;; remove ellipsis when printing sexp in message buffer
|
||||||
(setq eval-expression-print-length nil
|
(setq eval-expression-print-length nil
|
||||||
eval-expression-print-level nil)
|
eval-expression-print-level nil)
|
||||||
|
|
||||||
(def-setting! :repl (mode command)
|
(def-setting! :repl (mode command)
|
||||||
"Define a REPL for a mode. Takes same arguements as `rtog/add-repl'."
|
"Define a REPL for a mode. Takes same arguements as `rtog/add-repl'."
|
||||||
(if (featurep 'repl-toggle)
|
`(after! repl-toggle
|
||||||
(list 'rtog/add-repl mode command)
|
(rtog/add-repl ',mode ',command)))
|
||||||
`(push ',(list mode command) +eval--repls)))
|
|
||||||
|
|
||||||
(def-setting! :build (name mode pred-fn &optional build-fn)
|
(def-setting! :build (name mode pred-fn &optional build-fn)
|
||||||
"Define a build command function (BUILD-FN) for major-mode MODE, called NAME
|
"Define a build command function (BUILD-FN) for major-mode MODE, called NAME
|
||||||
|
@ -106,9 +102,6 @@ suitability for the current buffer."
|
||||||
(buffer-local-value 'repl-toggle-mode b))))
|
(buffer-local-value 'repl-toggle-mode b))))
|
||||||
:popup t :size 16)
|
:popup t :size 16)
|
||||||
|
|
||||||
(dolist (repl +eval--repls)
|
|
||||||
(apply 'rtog/add-repl repl))
|
|
||||||
|
|
||||||
(map! :map repl-toggle-mode-map
|
(map! :map repl-toggle-mode-map
|
||||||
:ei "C-n" 'comint-next-input
|
:ei "C-n" 'comint-next-input
|
||||||
:ei "C-p" 'comint-previous-input
|
:ei "C-p" 'comint-previous-input
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue