diff --git a/ports/sbcl.lisp b/ports/sbcl.lisp index 929cc952af5f639d05efd2fd7749c8688d7528f2..61057e669bacf8f3bf29fd96f9e250f673f31ba6 100644 --- a/ports/sbcl.lisp +++ b/ports/sbcl.lisp @@ -1,5 +1,5 @@ -;; Copyright (c) 2003 Nikodemus Siivola -;; +;; Copyright (c) 2003, 2011 Nikodemus Siivola +;; ;; Permission is hereby granted, free of charge, to any person obtaining ;; a copy of this software and associated documentation files (the ;; "Software"), to deal in the Software without restriction, including @@ -7,10 +7,10 @@ ;; distribute, sublicense, and/or sell copies of the Software, and to ;; permit persons to whom the Software is furnished to do so, subject to ;; the following conditions: -;; +;; ;; The above copyright notice and this permission notice shall be included ;; in all copies or substantial portions of the Software. -;; +;; ;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -60,7 +60,7 @@ preserved with the :WRAP-CURRENT T." (handler-case (linedit:formedit :prompt1 prompt - :prompt2 (make-string (length prompt) + :prompt2 (make-string (length prompt) :initial-element #\Space)) (end-of-file (e) (if eof-quits @@ -68,18 +68,18 @@ preserved with the :WRAP-CURRENT T." ;; Hackins, I know. "#.''end-of-file")))))) (setf sb-int:*repl-prompt-fun* (constantly "")) - (setf sb-int:*repl-read-form-fun* + (setf sb-int:*repl-read-form-fun* (if wrap-current (lambda (in out) (declare (type stream out in)) ;; FIXME: Yich. (terpri) - (with-input-from-string (in (meta-escape (repl-reader in out))) + (with-input-from-string (in (repl-reader in out)) (funcall read-form-fun in out))) (lambda (in out) (declare (type stream out in)) (handler-case (read-from-string (repl-reader in out)) - (end-of-file () + (end-of-file () ;; We never get here if eof-quits is true, so... (fresh-line) (write-line "#") diff --git a/utility-functions.lisp b/utility-functions.lisp index f6e79b4300b37c88db35687af6d2132d79b5f281..d6a1ca84567942a58c1b22a4d705ad8acff81c87 100644 --- a/utility-functions.lisp +++ b/utility-functions.lisp @@ -69,20 +69,6 @@ open-args passed to `open'." "Like min, except ignores NILs." (apply #'min (remove-if #'null args))) -(defun meta-escape (string) - (declare (simple-string string)) - (let (stack) - (loop with last - for i from 1 upto (length string) - for char across string - ;; KLUDGE: Deal with character literals. Not quite sure this is - ;; the right and robust way to do it, though. - when (and (eql #\\ char) (not (eql #\# last))) - do (push #\\ stack) - do (push char stack) - (setf last char)) - (coerce (nreverse stack) 'simple-string))) - (defun eof-handler (lisp-name quit-fn) (handler-case (loop