From 6b31cd5a246ada814327aaffd3fcfe38eaa7dbcf Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 30 Oct 2010 23:48:18 +0200 Subject: Guile: really support R6RS libs --- elisp/geiser-guile.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el index 51de947..c406d88 100644 --- a/elisp/geiser-guile.el +++ b/elisp/geiser-guile.el @@ -134,7 +134,10 @@ This function uses `geiser-guile-init-file' if it exists." (t (format "ge:%s %s" proc (geiser-guile--linearize-args args))))) (defconst geiser-guile--module-re - "(\\(?:define-module\\|library\\) +\\(([^)]+)\\)") + "(define-module +\\(([^)]+)\\)") + +(defconst geiser-guile--library-re + "(library +\\(([^)]+)\\)") (defun geiser-guile--get-module (&optional module) (cond ((null module) @@ -142,7 +145,8 @@ This function uses `geiser-guile-init-file' if it exists." (ignore-errors (while (not (zerop (geiser-syntax--nesting-level))) (backward-up-list))) - (if (re-search-backward geiser-guile--module-re nil t) + (if (or (re-search-backward geiser-guile--module-re nil t) + (looking-at geiser-guile--library-re)) (geiser-guile--get-module (match-string-no-properties 1)) :f))) ((listp module) module) -- cgit v1.2.3