X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=gacela_misc.lisp;h=e19f3a2fe5e4aa0213ee8fd9e7710ff312109244;hb=6a3d1ffb69036e6d4f1c239fd7d52f9bfc48d50c;hp=7010b0965f32bc23941e53181b89fa51d1d58c8a;hpb=5d9f784170bb7cf0a360e7e545d38049a354e160;p=gacela.git diff --git a/gacela_misc.lisp b/gacela_misc.lisp index 7010b09..e19f3a2 100755 --- a/gacela_misc.lisp +++ b/gacela_misc.lisp @@ -14,6 +14,12 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with this program. If not, see . + +(eval-when (compile load eval) + (when (not (find-package 'gacela)) (make-package 'gacela :nicknames '(gg) :use '(lisp))) + (in-package 'gacela :nicknames '(gg) :use '(lisp))) + + (defconstant INFINITY MOST-POSITIVE-LONG-FLOAT) (defun append-if (new test tree &key (key #'first) (test-if #'equal)) @@ -71,9 +77,10 @@ `(block secure (defun si::universal-error-handler (error-name correctable function-name continue-format-string error-format-string &rest args) ,(when output-stream - `(format ,output-stream - (cond ((eq error-name :WRONG-TYPE-ARGUMENT) (string error-name)) - (t error-format-string)))) + `(write-line + (cond ((eq error-name :WRONG-TYPE-ARGUMENT) (string error-name)) + (t error-format-string)) + ,output-stream)) (setf (symbol-function 'si::universal-error-handler) ,error-handler) (return-from secure)) (let (result-eval)