Commit 464f8898 authored by Richard M. Stallman's avatar Richard M. Stallman

*** empty log message ***

parent 706ac90d
......@@ -49,7 +49,7 @@ Lisp_Object Qboundp, Qfboundp;
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 @@ DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0, "T if OBJECT is a marker (editor
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,22 +283,21 @@ DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, "T if OBJECT is a number.")
return Qnil;
}
DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, "T if OBJECT is a nonnegative number.")
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)
Lisp_Object obj;
register Lisp_Object obj;
{
if (XTYPE (obj) == Lisp_Int && XINT (obj) >= 0)
if (XTYPE (obj) == Lisp_Marker || XTYPE (obj) == Lisp_Int)
return Qt;
return Qnil;
}
#ifdef LISP_FLOAT_TYPE
DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0,
"T if OBJECT is a floating point number.")
DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, "T if OBJECT is a nonnegative number.")
(obj)
Lisp_Object obj;
{
if (XTYPE (obj) == Lisp_Float)
if (XTYPE (obj) == Lisp_Int && XINT (obj) >= 0)
return Qt;
return Qnil;
}
......@@ -318,7 +307,11 @@ DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0,
(obj)
Lisp_Object obj;
{
if (XTYPE (obj) == Lisp_Float || XTYPE (obj) == Lisp_Int)
if (0
#ifdef LISP_FLOAT_TYPE
|| XTYPE (obj) == Lisp_Float
#endif
|| XTYPE (obj) == Lisp_Int)
return Qt;
return Qnil;
}
......@@ -329,12 +322,25 @@ DEFUN ("number-or-marker-p", Fnumber_or_marker_p,
(obj)
Lisp_Object obj;
{
if (XTYPE (obj) == Lisp_Float
|| XTYPE (obj) == Lisp_Int
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.")
(obj)
Lisp_Object obj;
{
if (XTYPE (obj) == Lisp_Float)
return Qt;
return Qnil;
}
#endif /* LISP_FLOAT_TYPE */
/* Extract and set components of lists */
......@@ -1922,8 +1928,8 @@ syms_of_data ()
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 @@ syms_of_data ()
defsubr (&Sconsp);
defsubr (&Satom);
defsubr (&Sintegerp);
#ifdef LISP_FLOAT_TYPE
defsubr (&Sfloatp);
defsubr (&Sinteger_or_marker_p);
defsubr (&Snumberp);
defsubr (&Snumber_or_marker_p);
#ifdef LISP_FLOAT_TYPE
defsubr (&Sfloatp);
#endif /* LISP_FLOAT_TYPE */
defsubr (&Snatnump);
defsubr (&Ssymbolp);
......@@ -1950,7 +1957,6 @@ syms_of_data ()
defsubr (&Ssequencep);
defsubr (&Sbufferp);
defsubr (&Smarkerp);
defsubr (&Sinteger_or_marker_p);
defsubr (&Ssubrp);
defsubr (&Scompiled_function_p);
defsubr (&Schar_or_string_p);
......
......@@ -3349,12 +3349,13 @@ quit_throw_to_read_char ()
DEFUN ("set-input-mode", Fset_input_mode, Sset_input_mode, 3, 4, 0,
"Set mode of reading keyboard input.\n\
First arg non-nil means use input interrupts; nil means use CBREAK mode.\n\
Second arg non-nil means use ^S/^Q flow control for output to terminal\n\
First arg INTERRUPT non-nil means use input interrupts;\n\
nil means use CBREAK mode.\n\
Second arg FLOW non-nil means use ^S/^Q flow control for output to terminal\n\
(no effect except in CBREAK mode).\n\
Third arg non-nil means accept 8-bit input (for a Meta key).\n\
Third arg META non-nil means accept 8-bit input (for a Meta key).\n\
Otherwise, the top bit is ignored, on the assumption it is parity.\n\
Optional fourth arg non-nil specifies character to use for quitting.")
Optional fourth arg QUIT if non-nil specifies character to use for quitting.")
(interrupt, flow, meta, quit)
Lisp_Object interrupt, flow, meta, quit;
{
......
......@@ -571,12 +571,12 @@ typedef unsigned char UCHAR;
#define CHECK_NUMBER_OR_FLOAT(x, i) \
{ if (XTYPE (x) != Lisp_Float && XTYPE (x) != Lisp_Int) \
x = wrong_type_argument (Qinteger_or_floatp, (x)); }
x = wrong_type_argument (Qnumberp, (x)); }
#define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x, i) \
{ if (XTYPE (x) == Lisp_Marker) XFASTINT (x) = marker_position (x); \
else if (XTYPE (x) != Lisp_Int && XTYPE (x) != Lisp_Float) \
x = wrong_type_argument (Qinteger_or_float_or_marker_p, (x)); }
x = wrong_type_argument (Qnumber_or_marker_p, (x)); }
#else /* Not LISP_FLOAT_TYPE */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment