[movitz-cvs] CVS update: movitz/losp/lib/readline.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Mon Oct 31 09:17:08 UTC 2005


Update of /project/movitz/cvsroot/movitz/losp/lib
In directory common-lisp.net:/tmp/cvs-serv28332

Modified Files:
	readline.lisp 
Log Message:
For contextual-readline, make NIL designate a global context.

Date: Mon Oct 31 10:17:08 2005
Author: ffjeld

Index: movitz/losp/lib/readline.lisp
diff -u movitz/losp/lib/readline.lisp:1.7 movitz/losp/lib/readline.lisp:1.8
--- movitz/losp/lib/readline.lisp:1.7	Thu Dec  9 15:16:13 2004
+++ movitz/losp/lib/readline.lisp	Mon Oct 31 10:17:07 2005
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Fri Nov  2 13:58:58 2001
 ;;;;                
-;;;; $Id: readline.lisp,v 1.7 2004/12/09 14:16:13 ffjeld Exp $
+;;;; $Id: readline.lisp,v 1.8 2005/10/31 09:17:07 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -270,6 +270,8 @@
 	     (make-readline-buffer :string (make-string line-length))))
     context))
 
+(defvar *global-readline-context-state* nil)
+
 (defun replace-buffer (to from)
   (setf (readline-buffer-cursor-position to)
     (readline-buffer-cursor-position from))
@@ -293,7 +295,10 @@
   (with-accessors ((scratch readline-context-state-scratch)
 		   (buffers readline-context-state-buffers)
 		   (current-buffer readline-context-state-current-buffer))
-      context
+      (or context
+	  *global-readline-context-state*
+	  (setf *global-readline-context-state*
+	    (make-readline-context)))
     (let* ((edit-buffer current-buffer)
 	   (buffer (readline-buffer-string (aref buffers edit-buffer))))
       (cond




More information about the Movitz-cvs mailing list