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

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

[nongnu] elpa/geiser-guile 1421a71 225/284: Guile: find module when curs


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-guile 1421a71 225/284: Guile: find module when cursor is before define-module (#33497)
Date: Sun, 1 Aug 2021 18:29:49 -0400 (EDT)

branch: elpa/geiser-guile
commit 1421a7172cd41e3660a5f2eab23b32bb652ebaf9
Author: jao <jao@gnu.org>
Commit: jao <jao@gnu.org>

    Guile: find module when cursor is before define-module (#33497)
    
    If we didn't find a define-module form after the cursor, or an
    enclosing R6RS library form, we search forward for a module
    definition.  That way, things like C-c C-a work also from the top of
    the file.
---
 elisp/geiser-guile.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index 648c64e..da14b4e 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -162,7 +162,8 @@ This function uses `geiser-guile-init-file' if it exists."
              (while (not (zerop (geiser-syntax--nesting-level)))
                (backward-up-list)))
            (if (or (re-search-backward geiser-guile--module-re nil t)
-                   (looking-at geiser-guile--library-re))
+                   (looking-at geiser-guile--library-re)
+                   (re-search-forward geiser-guile--module-re nil t))
                (geiser-guile--get-module (match-string-no-properties 1))
              :f)))
         ((listp module) module)



reply via email to

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