emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/geiser-racket 4e68ebc 140/191: racket: C-u C-c C-z on a su


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-racket 4e68ebc 140/191: racket: C-u C-c C-z on a submodule enters it
Date: Sun, 1 Aug 2021 18:32:16 -0400 (EDT)

branch: elpa/geiser-racket
commit 4e68ebc5abaf4f19f142de268770dc1fc703c501
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>

    racket: C-u C-c C-z on a submodule enters it
---
 geiser/user.rkt | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/geiser/user.rkt b/geiser/user.rkt
index 96b6431..5ce003d 100644
--- a/geiser/user.rkt
+++ b/geiser/user.rkt
@@ -32,12 +32,19 @@
   (current-namespace (module->namespace mod))
   (last-entered name))
 
+(define (file-mod? mod)
+  (and (list? mod)
+       (= 2 (length mod))
+       (eq? 'file (car mod))
+       (path-string? (cadr mod))))
+
 (define (submod-path mod)
   (and (list? mod)
        (eq? 'submod (car mod))
        (> (length mod) 1)
        (let ([parent (cadr mod)])
          (cond [(path-string? parent) `(submod (file ,parent) ,@(cddr mod))]
+               [(file-mod? parent) mod]
                [(symbol? parent) mod]
                [else #f]))))
 
@@ -47,10 +54,7 @@
          (last-entered "")]
         [(symbol? mod) (do-enter mod (symbol->string mod))]
         [(path-string? mod) (do-enter `(file ,mod) mod)]
-        [(and (list? mod)
-              (= 2 (length mod))
-              (eq? 'file (car mod))
-              (path-string? (cadr mod))) (do-enter mod (cadr mod))]
+        [(file-mod? mod) (do-enter mod (cadr mod))]
         [(submod-path mod) => (lambda (m) (do-enter m m))]
         [else (raise-syntax-error #f "Invalid module path" stx mod)]))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]