mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
(use-value-history): Use resolve-interface instead
of resolve-module so that only the exported bindings are searched. (save-value-history): Export the newly defined variable. Reported by Wolfgang Jaehrling.
This commit is contained in:
parent
366ecaec7a
commit
b66dde3c7d
1 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -23,7 +23,7 @@
|
|||
|
||||
(define (use-value-history x)
|
||||
(module-use! (current-module)
|
||||
(resolve-module '(value-history))))
|
||||
(resolve-interface '(value-history))))
|
||||
|
||||
(define save-value-history
|
||||
(let ((count 0)
|
||||
|
@ -34,6 +34,7 @@
|
|||
(s (string->symbol (simple-format #f "$~A" c))))
|
||||
(simple-format #t "~A = " s)
|
||||
(module-define! history s v)
|
||||
(module-export! history (list s))
|
||||
(set! count c))))))
|
||||
|
||||
(add-hook! before-eval-hook use-value-history)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue