mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
allow eval to console
This commit is contained in:
parent
46cda1c223
commit
a9d0ce3c43
4 changed files with 36 additions and 11 deletions
|
|
@ -48,6 +48,7 @@
|
|||
(title-class *builder-title-class*)
|
||||
lisp-package
|
||||
regex
|
||||
(editor-use-console-for-evals *editor-use-console-for-evals*)
|
||||
maximized)
|
||||
"Open a new text editor"
|
||||
(let ((win (window-to-top-by-title obj open-file)))
|
||||
|
|
@ -429,21 +430,33 @@
|
|||
(when (> cp p) (return lf)))
|
||||
(when lf
|
||||
(let ((result (capture-eval lf
|
||||
:capture-console (not editor-use-console-for-evals)
|
||||
:capture-result (not editor-use-console-for-evals)
|
||||
:clog-obj (connection-body obj)
|
||||
:eval-in-package (text-value pac-line))))
|
||||
(on-open-file obj :title-class "w3-blue" :title "form eval" :text result)))))
|
||||
(if editor-use-console-for-evals
|
||||
(on-open-console obj)
|
||||
(on-open-file obj :title-class "w3-blue" :title "form eval" :text result))))))
|
||||
(eval-selection (obj)
|
||||
(let ((val (clog-ace:selected-text ace)))
|
||||
(unless (equal val "")
|
||||
(let ((result (capture-eval val :clog-obj obj
|
||||
:capture-console (not editor-use-console-for-evals)
|
||||
:capture-result (not editor-use-console-for-evals)
|
||||
:eval-in-package (text-value pac-line))))
|
||||
(on-open-file obj :title-class "w3-blue" :title "selection eval" :text result)))))
|
||||
(if editor-use-console-for-evals
|
||||
(on-open-console obj)
|
||||
(on-open-file obj :title-class "w3-blue" :title "selection eval" :text result))))))
|
||||
(eval-file (obj)
|
||||
(let ((val (text-value ace)))
|
||||
(unless (equal val "")
|
||||
(let ((result (capture-eval val :clog-obj obj
|
||||
:capture-console (not editor-use-console-for-evals)
|
||||
:capture-result (not editor-use-console-for-evals)
|
||||
:eval-in-package (text-value pac-line))))
|
||||
(on-open-file obj :title-class "w3-blue" :title "file eval" :text result))))))
|
||||
(if editor-use-console-for-evals
|
||||
(on-open-console obj)
|
||||
(on-open-file obj :title-class "w3-blue" :title "file eval" :text result)))))))
|
||||
(set-on-click btn-esel (lambda (obj)
|
||||
(eval-selection obj)))
|
||||
(set-on-click m-esel (lambda (obj)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue