diff --git a/tools/clog-builder-repl.clog b/tools/clog-builder-repl.clog
index e415e0f..b2d840a 100644
--- a/tools/clog-builder-repl.clog
+++ b/tools/clog-builder-repl.clog
@@ -1,6 +1,6 @@
-
\ No newline at end of file
diff --git a/tools/clog-builder-repl.lisp b/tools/clog-builder-repl.lisp
index ab785e2..04a70c0 100644
--- a/tools/clog-builder-repl.lisp
+++ b/tools/clog-builder-repl.lisp
@@ -6,15 +6,15 @@
(let ((panel
(change-class
(clog:create-div clog-obj :content
- ""
+ ""
:hidden hidden :class class :html-id html-id
:auto-place auto-place)
'clog-builder-repl)))
(setf (slot-value panel 'package-div)
- (attach-as-child clog-obj "CLOGB3868051527" :clog-type
+ (attach-as-child clog-obj "CLOGB3868568691" :clog-type
'clog:clog-form-element :new-id t))
(setf (slot-value panel 'terminal)
- (attach-as-child clog-obj "CLOGB3868051526" :clog-type
+ (attach-as-child clog-obj "CLOGB3868568690" :clog-type
'clog-terminal:clog-terminal-element :new-id t))
(let ((target (terminal panel)))
(declare (ignorable target))
diff --git a/tools/clog-builder.lisp b/tools/clog-builder.lisp
index bffc526..762e3d5 100644
--- a/tools/clog-builder.lisp
+++ b/tools/clog-builder.lisp
@@ -2147,6 +2147,7 @@ of controls and double click to select control."
(btn-esel (create-button tool-bar :content "Eval Sel" :class (format nil "w3-tiny ~A" btn-class)))
(btn-test (create-button tool-bar :content "Eval" :class (format nil "w3-tiny ~A" btn-class)))
(content (center-panel box))
+ (pac-line (create-form-element content :text :class "w3-black"))
(ace (clog-ace:create-clog-ace-element content))
(status (create-div content :class "w3-tiny w3-border"))
(lisp-file t)
@@ -2180,8 +2181,12 @@ of controls and double click to select control."
(setf (width btn-test) "40px")
(setf (positioning ace) :absolute)
(setf (positioning status) :absolute)
+ (set-geometry pac-line :units "" :top "20px" :left "0px"
+ :right "0px" :height "22px" :width "100%")
+ (setf (place-holder pac-line) "Current Package")
+ (setf (text-value pac-line) "clog-user")
(set-geometry ace :units "" :width "" :height ""
- :top "0px" :bottom "20px" :left "0px" :right "0px")
+ :top "22px" :bottom "20px" :left "0px" :right "0px")
(clog-ace:resize ace)
(set-geometry status :units "" :width "" :height "20px"
:bottom "0px" :left "0px" :right "0px")
@@ -2193,19 +2198,29 @@ of controls and double click to select control."
(flet ((open-file-name (fname)
(window-focus win)
(when fname
- (cond ((or (equalp (pathname-type fname) "lisp")
- (equalp (pathname-type fname) "asd"))
- (setf (clog-ace:mode ace) "ace/mode/lisp")
- (setf lisp-file t)
- (setf (current-editor-is-lisp app) t))
- (t
- (setf lisp-file nil)
- (setf (current-editor-is-lisp app) nil)
- (setf (clog-ace:mode ace) (clog-ace:get-mode-from-extension ace fname))))
(setf file-name fname)
(setf (window-title win) fname)
- (setf (clog-ace:text-value ace)
- (or (read-file fname) "")))))
+ (let ((c (or (read-file fname) ""))
+ loc)
+ (cond ((or (equalp (pathname-type fname) "lisp")
+ (equalp (pathname-type fname) "asd"))
+ (setf (clog-ace:mode ace) "ace/mode/lisp")
+ (setf lisp-file t)
+ (setf (current-editor-is-lisp app) t)
+ ;; set package
+ (with-input-from-string (ins c)
+ (loop
+ (let ((form (read ins nil)))
+ (unless form (return))
+ (unless (consp form) (return))
+ (when (eq (car form) 'in-package)
+ (setf (text-value pac-line) (string-downcase (second form)))
+ (return))))))
+ (t
+ (setf lisp-file nil)
+ (setf (current-editor-is-lisp app) nil)
+ (setf (clog-ace:mode ace) (clog-ace:get-mode-from-extension ace fname))))
+ (setf (clog-ace:text-value ace) c)))))
(when open-file
(open-file-name open-file))
(set-on-click btn-load (lambda (obj)
@@ -2243,7 +2258,7 @@ of controls and double click to select control."
(let ((val (clog-ace:selected-text ace)))
(unless (equal val "")
(let ((result (capture-eval val :clog-obj obj
- :eval-in-package "CLOG-USER")))
+ :eval-in-package (text-value pac-line))))
(clog-web-alert (connection-body obj) "Result"
(format nil "~&result: ~A" result)
:color-class "w3-green"
@@ -2252,7 +2267,7 @@ of controls and double click to select control."
(let ((val (text-value ace)))
(unless (equal val "")
(let ((result (capture-eval val :clog-obj obj
- :eval-in-package "CLOG-USER")))
+ :eval-in-package (text-value pac-line))))
(clog-web-alert (connection-body obj) "Result"
(format nil "~&result: ~A" result)
:color-class "w3-green"
diff --git a/tools/projects.lisp b/tools/projects.lisp
index d1f23d3..ada6ee4 100644
--- a/tools/projects.lisp
+++ b/tools/projects.lisp
@@ -1,4 +1,3 @@
-
(in-package "CLOG-TOOLS")
(defclass projects (clog:clog-panel)
((reload-project-button :reader reload-project-button)
@@ -186,4 +185,4 @@
(let ((sel (text-value (project-list panel))))
(asdf/system-registry:clear-system sel)
(projects-populate panel))))
- panel))
\ No newline at end of file
+ panel))