From 35ddcb2fad9d38f7a204b38824a14304cec55124 Mon Sep 17 00:00:00 2001
From: Andreas Fuchs <asf@boinkor.net>
Date: Wed, 7 Jul 2010 17:46:34 +0200
Subject: [PATCH] spr37149: Plug leak of the #\{ dispatch character.

This change eval-whens out the definition of the #\{ macro character
so that it happens only at compile time. The definition was leaked
into customer environments, and affected the system readtable when
loading CLIM from a clinit.cl file, which resulted in an error.

Tested by building & loading the resulting clim fasls on windows &
linux.
---
 utils/reader.lisp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/utils/reader.lisp b/utils/reader.lisp
index 1304e393..f6c8452d 100644
--- a/utils/reader.lisp
+++ b/utils/reader.lisp
@@ -26,6 +26,8 @@
 ;;; This is a compile-time tool to make it easier for us to install lisp-system
 ;;; dependent code.
 
+;;; Install the #{ reader, only when compiling.
+(eval-when (:compile-toplevel :execute)
 ;;; Tool to temporarily add a macro character.
 (defmacro with-macro-character ((char function) &body body)
   (let ((existing (make-symbol (symbol-name 'existing))))
@@ -95,6 +97,5 @@
   (declare (ignore stream arg))
   (throw 'stop t))
 
-;;; Install the #{ reader.
-(set-dispatch-macro-character #\# #\{ #'|READ-#-{|)
+  (set-dispatch-macro-character #\# #\{ #'|READ-#-{|))
 
-- 
GitLab