[Q]: commit: Provide #'special-form-p, for the use of advice.el, perhaps other files.

Aidan Kehoe kehoea at parhasard.net
Tue Dec 18 16:41:35 EST 2007


 Ar an t-ochtú lá déag de mí na Nollaig, scríobh Jerry James: 

 > QUERY
 > 
 > On Dec 18, 2007 1:51 PM, Aidan Kehoe <aidan-guest at alioth.debian.org> wrote:
 > 
 > > +DEFUN ("special-form-p", Fspecial_form_p, 1, 1, 0, /*
 > > +Return whether SUBR is a special form.  SUBR must be built-in.
 > > +*/
 > > +       (subr))
 > > +{
 > > +  subr = indirect_function (subr, 1);
 > > +  CHECK_SUBR (subr);
 > > +
 > > +  return XSUBR (subr)->max_args == UNEVALLED ? Qt : Qnil;
 > >  }
 > >
 > 
 > I personally hate predicates that throw errors.  

I personally hate functions that don’t throw errors when they reasonably
could, hah. But I get your reasoning, and will make that change. Thanks for
the review!

 > If I pass a string or an
 > integer to this function, I would like it to return nil.  Would you object
 > to changing that code to something like this?
 > 
 > {
 >   subr = indirect_function (subr, 0);
 >   return (SUBRP (subr) && XSUBR (subr)->max_args == UNEVALLED) ? Qt : Qnil;
 > }

-- 
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?



More information about the XEmacs-Patches mailing list