Lisp HUG Maillist Archive

Create a executable - force redefine function

Hey there,

we want to create an executable and redefine the quit function. In the LispWorks Environment I easily can click "Ok" to "Redefine it anyway". But when I create the executable it just quit with the Error:

Quitting because of error:
   Redefining function QUIT visible from package LISPWORKS.

Is there any way to force redefine the function in the build?

Regards,
Phil

Re: Create a executable - force redefine function

Philipp Bach <philipp.wilfried.bach@gmail.com> writes:

> Hey there,
>
> we want to create an executable and redefine the quit function. In the
> LispWorks Environment I easily can click "Ok" to "Redefine it anyway". But
> when I create the executable it just quit with the Error:
>
> Quitting because of error:
>    Redefining function QUIT visible from package LISPWORKS.
>
> Is there any way to force redefine the function in the build?

You can put the defun in a handler-bind that invokes the "Redefine it
anyway" restart.

Zach

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Create a executable - force redefine function

Philipp Bach wrote on Wed, 27 Nov 2013 13:25:32 +0100 16:25:

| we want to create an executable and redefine the quit function. In the 
| LispWorks Environment I easily can click "Ok" to "Redefine it anyway". 
| But when I create the executable it just quit with the Error:
| 
| Quitting because of error:
|    Redefining function QUIT visible from package LISPWORKS.
| 
| Is there any way to force redefine the function in the build?

The following shoud do the trick:

(let ((lw:*handle-warn-on-redefinition* :quiet))
  (defun ...))
--
Sincerely,
Dmitry Ivanov
lisp.ystok.ru

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Create a executable - force redefine function

Have you looked at *packages-for-warn-on-redefinition* and friends?

If this isn't it mail me directly as I have done just this but would need to dig out the code

On 27 Nov 2013, at 12:25, Philipp Bach wrote:

> Hey there,
> 
> we want to create an executable and redefine the quit function. In the LispWorks Environment I easily can click "Ok" to "Redefine it anyway". But when I create the executable it just quit with the Error:
> 
> Quitting because of error:
>    Redefining function QUIT visible from package LISPWORKS.
> 
> Is there any way to force redefine the function in the build?
> 
> Regards,
> Phil


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:34 UTC