[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Loading a module before and after adding a load path
From: |
Diogo F. S. Ramos |
Subject: |
Re: Loading a module before and after adding a load path |
Date: |
Sat, 19 Jan 2013 04:05:02 -0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Noah Lavine <address@hidden> writes:
> As a workaround, remove your module from the list "autoloads-done".
> (actually, there will be a pair
> in that list, where the cdr of the pair is the name of the module as a
> string. remove that.)
Nice! Thank you.
Here is a little procedure that might help someone (it needs srfi-1):
(define (remove-from-autoloads-done module)
(define (make-item module)
(let ((strings-module (map symbol->string module)))
(cons (string-join (drop-right strings-module 1) "/" 'suffix)
(last strings-module))))
(set! autoloads-done
(delete (make-item module) autoloads-done)))
And an example:
scheme@(guile-user)> (use-modules (foo bar))
While compiling expression:
ERROR: no code for module (foo bar)
scheme@(guile-user)> (add-to-load-path "/tmp")
scheme@(guile-user)> (use-modules (foo bar))
While compiling expression:
ERROR: no code for module (foo bar)
scheme@(guile-user)> (remove-from-autoloads-done '(foo bar))
scheme@(guile-user)> (use-modules (foo bar))
scheme@(guile-user)> (hello)
hello, world
scheme@(guile-user)>