axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Fix thinko in src/interp/vmlisp.lisp


From: Stephen Wilson
Subject: Re: [Axiom-developer] Fix thinko in src/interp/vmlisp.lisp
Date: 30 Jun 2007 20:15:14 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Hi Gaby,

Looks like I missed your commit.

MACERRORCOUNT appears unused and could be taken out as well.  No idea
what the (setq ... (.. (eval ..))) nonsense is about.  Any idea?

Thanks,
Steve


Stephen Wilson <address@hidden> writes:

> Hi Gaby,
> 
> This is untested but I wanted to get it out before you commited.
> 
> Consider:
> 
> (defun macro-missingargs (name ignore n)
>     (declare (ignore ignore))
>     (setq macerrorcount (+ 1 (eval 'macerrorcount)))
>     (let ((nargs (abs n)))
>       (error "~A requires ~:[exactly~;at least~] ~D argument~P"
>              (symbol-name name) (minusp n) nargs nargs)))
> 
> Note also your version still (I think) as a problem when N is
> negative, as it will fall through the CASE and wind up printing -N,
> which I dont think we want.
> 
> Comments?
> 
> Thanks,
> Steve
> 
> 
> 
> Gabriel Dos Reis <address@hidden> writes:
> 
> > Hi,
> > 
> >   This thinko while caugh while building build-improvements with
> > SBCL.  The error is that the value of abs(N) should not be part
> > of the arguments to error() and should be computed separately.
> > Fixed thusly.
> > 
> > Applied to build-improvements.
> > Will apply silver SF/SVN shortly.
> > 
> > -- Gaby
> > 2007-06-30  Gabriel Dos Reis  <address@hidden>
> > 
> >     * vmlisp.lisp.pamphlet (MACRO-MISSINGARGS): Fix thinko.
> > 
> > *** vmlisp.lisp.pamphlet    (revision 22145)
> > --- vmlisp.lisp.pamphlet    (local)
> > *************** can be restored.
> > *** 1855,1867 ****
> >   (defun MACRO-MISSINGARGS (NAME ignore N)
> >     (declare (ignore ignore))
> >     (setq MACERRORCOUNT (+ 1 (eval 'MACERRORCOUNT)))
> > !   (error (concatenate 'string (symbol-name NAME) " requires "
> > !                        (if (minusp N) "at least " "exactly ")
> > !                        (setq N (abs N))
> > !                        (case N (0 "no") (1 "one") (2 "two") (3 "three")
> > !                              (4 "four") (5 "five") (6 "six")
> > !                              (t (princ-to-string N)))
> > !                        (if (eq n 1) " argument," " arguments,"))))
> >   
> >   (defun MACERR (MESSAGE &rest ignore)
> >     (declare (ignore ignore))
> > --- 1855,1867 ----
> >   (defun MACRO-MISSINGARGS (NAME ignore N)
> >     (declare (ignore ignore))
> >     (setq MACERRORCOUNT (+ 1 (eval 'MACERRORCOUNT)))
> > !   (let ((nargs (abs N)))
> > !     (error (concatenate 'string (symbol-name NAME) " requires "
> > !                   (if (minusp N) "at least " "exactly ")
> > !                   (case N (0 "no") (1 "one") (2 "two") (3 "three")
> > !                         (4 "four") (5 "five") (6 "six")
> > !                         (t (princ-to-string nargs)))
> > !                   (if (eq nargs 1) " argument," " arguments,")))))
> >   
> >   (defun MACERR (MESSAGE &rest ignore)
> >     (declare (ignore ignore))
> > 
> > 
> > _______________________________________________
> > Axiom-developer mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/axiom-developer
> 
> 
> 
> _______________________________________________
> Axiom-developer mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/axiom-developer





reply via email to

[Prev in Thread] Current Thread [Next in Thread]