diff options
author | Andy Wingo <wingo@pobox.com> | 2011-02-09 20:54:36 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-02-09 20:56:04 +0100 |
commit | 15b06ca9cee69509fef83928fa492c51c8292bb7 (patch) | |
tree | 6bf300d54f184b93d78f0b1748c9cada09516a4f /guile-readline | |
parent | c5f30c4cba204114008b8ddc8ecea5a081be69b7 (diff) |
readline uses define-once
* guile-readline/ice-9/readline.scm: Use define-once.
Diffstat (limited to 'guile-readline')
-rw-r--r-- | guile-readline/ice-9/readline.scm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/guile-readline/ice-9/readline.scm b/guile-readline/ice-9/readline.scm index 36f805f6c..a9f7cdc6d 100644 --- a/guile-readline/ice-9/readline.scm +++ b/guile-readline/ice-9/readline.scm @@ -1,6 +1,6 @@ ;;;; readline.scm --- support functions for command-line editing ;;;; -;;;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2006, 2009, 2010 Free Software Foundation, Inc. +;;;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2006, 2009, 2010, 2011 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by @@ -73,11 +73,11 @@ ;;; Dirk:FIXME:: If the-readline-port, input-port or output-port are closed, ;;; guile will enter an endless loop or crash. -(define new-input-prompt "") -(define continuation-prompt "") -(define input-port (current-input-port)) -(define output-port (current-output-port)) -(define read-hook #f) +(define-once new-input-prompt "") +(define-once continuation-prompt "") +(define-once input-port (current-input-port)) +(define-once output-port (current-output-port)) +(define-once read-hook #f) (define (make-readline-port) (let ((history-buffer #f)) @@ -115,10 +115,10 @@ ;;; everything except the prompt. And don't forget the ;;; compile/load/run phase distinctions. Also, the readline library ;;; isn't reentrant. -(define the-readline-port #f) +(define-once the-readline-port #f) -(define history-variable "GUILE_HISTORY") -(define history-file (string-append (getenv "HOME") "/.guile_history")) +(define-once history-variable "GUILE_HISTORY") +(define-once history-file (string-append (getenv "HOME") "/.guile_history")) (define-public readline-port (let ((do (lambda (r/w) @@ -215,7 +215,7 @@ (lambda () (set! *readline-completion-function* old-completer))))) -(define readline-repl-reader +(define-once readline-repl-reader (let ((boot-9-repl-reader repl-reader)) (lambda* (repl-prompt #:optional (reader (fluid-ref current-reader))) (let ((port (current-input-port))) |