From: David Vazquez Date: Wed, 16 Jan 2013 03:21:30 +0000 (+0000) Subject: Replace INTERNP by FIND-SYMBOL X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=25fa7dc525c432ea68bdae231748b279a2ab65ef;p=jscl.git Replace INTERNP by FIND-SYMBOL --- diff --git a/ecmalisp.lisp b/ecmalisp.lisp index 2da30af..562f1f8 100644 --- a/ecmalisp.lisp +++ b/ecmalisp.lisp @@ -71,17 +71,13 @@ (defmacro while (condition &body body) `(block nil (%while ,condition ,@body))) - (defun internp (name) - (in name *package*)) - - (defun intern (name) - (if (internp name) - (oget *package* name) - (oset *package* name (make-symbol name)))) - (defun find-symbol (name) (oget *package* name)) + (defun intern (name) + (let ((s (find-symbol name))) + (if s s (oset *package* name (make-symbol name))))) + (defvar *gensym-counter* 0) (defun gensym (&optional (prefix "G")) (setq *gensym-counter* (+ *gensym-counter* 1))