From bffc5489a918dab7fa238c25154d34480b8aab85 Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Thu, 28 Nov 1991 21:08:54 +0000
Subject: [PATCH] Added *read-eval*.  If a #. is encountered while *read-eval*
 is NIL, an error is signaled.  It defaults to T.

---
 code/sharpm.lisp | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/code/sharpm.lisp b/code/sharpm.lisp
index 31d37d97f..0a43d8c82 100644
--- a/code/sharpm.lisp
+++ b/code/sharpm.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sharpm.lisp,v 1.6 1991/08/22 16:01:29 ram Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sharpm.lisp,v 1.7 1991/11/28 21:08:54 wlott Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -118,15 +118,21 @@
 		 (error "Illegal terminating character after a colon."))))
 	  (T (make-symbol token)))))
 
+;;;; #. handling.
+
+(export '(*read-eval*))
+
+(defvar *read-eval* t
+  "If false, then the #. read macro is disabled.")
+
 (defun sharp-dot (stream ignore1 ignore2)
   (declare (ignore ignore1 ignore2))
-  (let ((token (read stream t nil t)))
-    (unless *read-suppress*  (eval token))))
+  (if *read-eval*
+      (let ((token (read stream t nil t)))
+	(unless *read-suppress*
+	  (eval token)))
+      (error "Attemt to read #. while *READ-EVAL* is bound to NIL.")))
 
-(defun sharp-comma (stream ignore1 ignore2)
-  (declare (ignore ignore1 ignore2))
-  (let ((token (read stream t nil t)))
-    (unless *read-suppress*  (eval token))))
 
 (defun sharp-R (stream ignore radix)
   (declare (ignore ignore))
-- 
GitLab