diff --git a/src/cmp/cmpvar.lsp b/src/cmp/cmpvar.lsp index cb86bffda..9977590a9 100644 --- a/src/cmp/cmpvar.lsp +++ b/src/cmp/cmpvar.lsp @@ -99,7 +99,7 @@ ;;; value. (defun check-global (name) - (member name *global-vars* :test #'eq)) + (member name *global-vars* :test #'eq :key #'var-name)) ;;; ;;; Check if the symbol has a symbol macro @@ -301,9 +301,11 @@ (mapc #'si::register-global globals)) (defun si::register-global (name) - (push (c1make-global-variable name :kind 'GLOBAL - :type (or (get-sysprop name 'CMP-TYPE) 'T)) - *vars*)) + (unless (check-global name) + (push (c1make-global-variable name :kind 'GLOBAL + :type (or (get-sysprop name 'CMP-TYPE) 'T)) + *global-vars*)) + (values)) (defun c1setq (args) (let ((l (length args)))