[Top][All Lists]

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

Re: scheme with vim

From: Marc Chantreux
Subject: Re: scheme with vim
Date: Wed, 5 Feb 2020 14:49:41 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

hello Ricardo,

> I’m still not sure I understand exactly what the result of this should
> be (as I’m not familiar with ctags), but you can get a list of loaded
> modules and the symbols they export.

i deeply regret the way i turned my message. please forget everything
you read and start with a fresh base:

i need the list of the symbols that are available for completion. i
guess some are built-in (map, apply, define, use-module ...) and others
come from modules.

my question is: how to collect this list.

> This expression, for example, will print all symbols that are exported
> by the (texinfo) module

with GNU Guile 2.2.4, i got

    In procedure struct_vtable: Wrong type argument in position 1 (expecting 
struct): #f

but reading the code, i guess you just solved a part of the problem: get
the symbols available in 1 module.

so now i need all the default symbols. maybe we should just copy them
from a documentation instead of introspect the guile interpreter?

> You can get a hash table of all loaded modules with
>     (module-submodules (resolve-module '() #f #f #:ensure #f))

which means i need to run the current code. this is tricky...

probably i should write something that:

* parses the current source
* try to find the 'use-modules' s-expr
* run it
* run your code

not my current scheme level but it should be a good exercise. i guess i
need a reader.


reply via email to

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