Mercurial > emacs
diff src/data.c @ 695:e3fac20d3015
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 07 Jun 1992 02:36:01 +0000 |
parents | 70b112526394 |
children | 62dd28940dc6 |
line wrap: on
line diff
--- a/src/data.c Sun Jun 07 01:50:14 1992 +0000 +++ b/src/data.c Sun Jun 07 02:36:01 1992 +0000 @@ -49,7 +49,7 @@ Lisp_Object Qcdr; #ifdef LISP_FLOAT_TYPE -Lisp_Object Qfloatp, Qinteger_or_floatp, Qinteger_or_float_or_marker_p; +Lisp_Object Qfloatp; Lisp_Object Qnumberp, Qnumber_or_marker_p; #endif @@ -246,16 +246,6 @@ return Qnil; } -DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0, - "T if OBJECT is an integer or a marker (editor pointer).") - (obj) - register Lisp_Object obj; -{ - if (XTYPE (obj) == Lisp_Marker || XTYPE (obj) == Lisp_Int) - return Qt; - return Qnil; -} - DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, "T if OBJECT is a built-in function.") (obj) Lisp_Object obj; @@ -293,6 +283,16 @@ return Qnil; } +DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0, + "T if OBJECT is an integer or a marker (editor pointer).") + (obj) + register Lisp_Object obj; +{ + if (XTYPE (obj) == Lisp_Marker || XTYPE (obj) == Lisp_Int) + return Qt; + return Qnil; +} + DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, "T if OBJECT is a nonnegative number.") (obj) Lisp_Object obj; @@ -302,6 +302,35 @@ return Qnil; } +DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, + "T if OBJECT is a number (floating point or integer).") + (obj) + Lisp_Object obj; +{ + if (0 +#ifdef LISP_FLOAT_TYPE + || XTYPE (obj) == Lisp_Float +#endif + || XTYPE (obj) == Lisp_Int) + return Qt; + return Qnil; +} + +DEFUN ("number-or-marker-p", Fnumber_or_marker_p, + Snumber_or_marker_p, 1, 1, 0, + "T if OBJECT is a number or a marker.") + (obj) + Lisp_Object obj; +{ + if (XTYPE (obj) == Lisp_Int +#ifdef LISP_FLOAT_TYPE + || XTYPE (obj) == Lisp_Float +#endif + || XTYPE (obj) == Lisp_Marker) + return Qt; + return Qnil; +} + #ifdef LISP_FLOAT_TYPE DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, "T if OBJECT is a floating point number.") @@ -312,29 +341,6 @@ return Qt; return Qnil; } - -DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, - "T if OBJECT is a number (floating point or integer).") - (obj) - Lisp_Object obj; -{ - if (XTYPE (obj) == Lisp_Float || XTYPE (obj) == Lisp_Int) - return Qt; - return Qnil; -} - -DEFUN ("number-or-marker-p", Fnumber_or_marker_p, - Snumber_or_marker_p, 1, 1, 0, - "T if OBJECT is a number or a marker.") - (obj) - Lisp_Object obj; -{ - if (XTYPE (obj) == Lisp_Float - || XTYPE (obj) == Lisp_Int - || XTYPE (obj) == Lisp_Marker) - return Qt; - return Qnil; -} #endif /* LISP_FLOAT_TYPE */ /* Extract and set components of lists */ @@ -1922,8 +1928,8 @@ staticpro (&Qinteger_or_marker_p); #ifdef LISP_FLOAT_TYPE staticpro (&Qfloatp); - staticpro (&Qinteger_or_floatp); - staticpro (&Qinteger_or_float_or_marker_p); + staticpro (&Qnumberp); + staticpro (&Qnumber_or_marker_p); #endif /* LISP_FLOAT_TYPE */ staticpro (&Qboundp); @@ -1937,10 +1943,11 @@ defsubr (&Sconsp); defsubr (&Satom); defsubr (&Sintegerp); + defsubr (&Sinteger_or_marker_p); + defsubr (&Snumberp); + defsubr (&Snumber_or_marker_p); #ifdef LISP_FLOAT_TYPE defsubr (&Sfloatp); - defsubr (&Snumberp); - defsubr (&Snumber_or_marker_p); #endif /* LISP_FLOAT_TYPE */ defsubr (&Snatnump); defsubr (&Ssymbolp); @@ -1950,7 +1957,6 @@ defsubr (&Ssequencep); defsubr (&Sbufferp); defsubr (&Smarkerp); - defsubr (&Sinteger_or_marker_p); defsubr (&Ssubrp); defsubr (&Scompiled_function_p); defsubr (&Schar_or_string_p);