Re: Question about *handle-warn-on-redefinition*.

Martin Simmons <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
Yes, this is how Common Lisp packages work so it is expected.

If you read a symbol with no package prefix, then it will be interned in the
current package.  If the current package uses lispworks, then that will find
the inherited symbol lispworks:*handle-warn-on-redefinition*.

BTW, it might be better to bind lispworks:*handle-warn-on-redefinition* to
:warn instead of setting it.  If you set it, then it will have that value for
subsequent files as well, which will be less safe.

-- 
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/



>>>>> On Thu, 24 Apr 2025 15:03:48 +0000, Uģis Lācis (as ugis dot lacis at equa dot se) said:
> 
> Hi LispWorks community,
> 
> We have been experimenting with LispWorks to see if it would be good to use as a LISP environment in our company. During our experiments, we have noticed following strange behaviour. If I define a package that uses common-lisp (but not lispworks), then setting *handle-warn-on-redefinition* does not seem to have an effect. It can be reproduced by loading attached file with (load "redefine_method_package.lisp"). But strangely, LispWorks does not complain that variable *handle-warn-on-redefinition* is not defined. If I use lispworks:*handle-warn-on-redefinition* instead, the behavior is as expected and I can control redefinition per our needs.
> 
> Is this the expected behaviour? Or is this potentially a bug?
> 
> Best wishes,
> Ugis
> 

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.