[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-gauche 698a685 038/119: Fix eval and compile
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-gauche 698a685 038/119: Fix eval and compile |
Date: |
Sun, 1 Aug 2021 18:27:53 -0400 (EDT) |
branch: elpa/geiser-gauche
commit 698a68502e3990bd06ef2fde96d9f65fa86a8f7d
Author: András Simonyi <andras.simonyi@gmail.com>
Commit: András Simonyi <andras.simonyi@gmail.com>
Fix eval and compile
---
geiser-gauche.el | 12 ++++++------
geiser.scm | 14 ++++++++------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/geiser-gauche.el b/geiser-gauche.el
index cd931d5..b3e13ca 100644
--- a/geiser-gauche.el
+++ b/geiser-gauche.el
@@ -82,8 +82,11 @@
(defun geiser-gauche--geiser-procedure (proc &rest args)
;; (with-current-buffer "*scratch*"
;; (goto-char (point-max))
- ;; (insert (format "\nGeiser FORM: %s" args)))
+ ;; (insert (format "\nGeiser PROC: %s, ARGS: %s \ntranslated to:\n" proc
args))
+ ;; (insert (let ((form (mapconcat 'identity args " ")))
+ ;; (format "(eval '(geiser:%s %s) (find-module 'geiser))" proc
form))))
(cl-case proc
+ ;; Eval and compile are (module) context sensitive
((eval compile)
(let ((form (mapconcat 'identity (cdr args) " "))
(module (cond ((string-equal "'()" (car args))
@@ -93,13 +96,10 @@
(t
"#f"))))
(format "(eval '(geiser:eval %s '%s) (find-module 'geiser))" module
form)))
- ((load-file compile-file)
- (format "(geiser:load-file %s)" (car args)))
- ((no-values)
- "(geiser:no-values)")
+ ;; The rest of the commands are all evaluated in the geiser module
(t
(let ((form (mapconcat 'identity args " ")))
- (format "(geiser:%s %s)" proc form)))))
+ (format "(eval '(geiser:%s %s) (find-module 'geiser))" proc form)))))
(defconst geiser-gauche--module-re
"(define-module +\\([[:alnum:].]+\\)")
diff --git a/geiser.scm b/geiser.scm
index 24a7bdd..e3d75ed 100644
--- a/geiser.scm
+++ b/geiser.scm
@@ -7,6 +7,7 @@
geiser:newline
geiser:autodoc
geiser:load-file
+ geiser:compile-file
geiser:no-values
geiser:completions
geiser:module-completions
@@ -18,7 +19,6 @@
;; geiser:object-signature
;; geiser:symbol-location
;; geiser:find-file
- ;; geiser:compile-file
;; geiser:compile
))
@@ -70,17 +70,20 @@
(output . ,(get-output-string output))))))
(define (geiser:load-file filename)
- (load filename))
+ (geiser:eval 'user `(load ,filename)))
-(define (geiser:newline)
+(define (geiser:compile-file filename)
+ (geiser:load-file filename))
+
+(define (geiser:newline . rest)
(newline))
-(define (geiser:no-values)
+(define (geiser:no-values . rest)
(values))
;;; Completions
-(define (geiser:completions prefix)
+(define (geiser:completions prefix . rest)
(delete-duplicates
(remove
(^x (or (string=? x "")
@@ -209,4 +212,3 @@
;; TODO We add the load-path at the end. Is this correct?
(define-macro (geiser:add-to-load-path dir)
`(add-load-path ,dir :after))
-
- [nongnu] elpa/geiser-gauche 30f4558 052/119: Fix no-values, (continued)
- [nongnu] elpa/geiser-gauche 30f4558 052/119: Fix no-values, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 429ad45 055/119: Add special handling for compile-file in the elisp eval proc, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 72f5107 054/119: Minor fixes, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche b702719 057/119: Simplify elisp-side eval, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche bdd8976 017/119: First version with working autocomplete, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 94546ce 016/119: Add ^_ to the keyword lists, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 32b94a9 008/119: Remove diagnostic message, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 0de6385 025/119: Finish key argument handling in autodoc, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche dc40919 026/119: Correct a comment, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 652927a 041/119: Pass the module as a last argument to geiser: functions, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 698a685 038/119: Fix eval and compile,
Philip Kaludercic <=
- [nongnu] elpa/geiser-gauche 8adaf75 037/119: Improvements, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 5d8264b 033/119: Add (commented out) debugging logging of commands in *scratch*, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche a90a648 032/119: Implement module location, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 558a52e 034/119: Fix module-re, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 530f4f2 040/119: Add rest arguments to all geiser: procedures, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 206f5be 045/119: Lots of cleanups, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 6110849 067/119: Add dash to module name regex, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 060b7ee 062/119: Finish symbol location, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 9ffc5bd 058/119: Add comments, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 3d540b3 061/119: Symbol location work, Philip Kaludercic, 2021/08/01