Import readline function dynamically when necessary.
This commit is contained in:
parent
7edf178eee
commit
9124ba8de6
2 changed files with 16 additions and 5 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2002-11-04 Neil Jerram <neil@ossau.uklinux.net>
|
||||
|
||||
* debugger/command-loop.scm (read-and-dispatch-command): Import
|
||||
set-readline-prompt dynamically if we need to. (Previous
|
||||
arrangement didn't work if this module was loaded before (ice-9
|
||||
readline).)
|
||||
|
||||
2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
|
||||
|
||||
* format.scm (format): Wrap a monitor around format:format since
|
||||
|
|
|
|||
|
|
@ -48,10 +48,6 @@
|
|||
debugger-command-loop-quit)
|
||||
#:no-backtrace)
|
||||
|
||||
(if (memq 'readline *features*)
|
||||
(define-module (ice-9 debugger command-loop)
|
||||
:use-module (ice-9 readline)))
|
||||
|
||||
;;; {Interface used by (ice-9 debugger).}
|
||||
|
||||
(define (debugger-command-loop state)
|
||||
|
|
@ -93,9 +89,17 @@
|
|||
(lambda args
|
||||
*unspecified*)))
|
||||
|
||||
(define set-readline-prompt! #f)
|
||||
|
||||
(define (read-and-dispatch-command state port)
|
||||
(if (using-readline?)
|
||||
(set-readline-prompt! debugger-prompt debugger-prompt)
|
||||
(begin
|
||||
;; Import set-readline-prompt! if we haven't already.
|
||||
(or set-readline-prompt!
|
||||
(set! set-readline-prompt!
|
||||
(module-ref (resolve-module '(ice-9 readline))
|
||||
'set-readline-prompt!)))
|
||||
(set-readline-prompt! debugger-prompt debugger-prompt))
|
||||
(display debugger-prompt))
|
||||
(force-output) ;This should not be necessary...
|
||||
(let ((token (read-token port)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue