diff options
| author | Richard M. Stallman | 1992-06-07 02:36:01 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1992-06-07 02:36:01 +0000 |
| commit | 464f88989ff0c5ce1ec228eaf178091bc1f591b8 (patch) | |
| tree | d6b3fe58edc28fabd98c143f530022d1399bd402 /src/data.c | |
| parent | 706ac90d209be667058dc871c89d921a9027a9f1 (diff) | |
| download | emacs-464f88989ff0c5ce1ec228eaf178091bc1f591b8.tar.gz emacs-464f88989ff0c5ce1ec228eaf178091bc1f591b8.zip | |
*** empty log message ***
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/src/data.c b/src/data.c index df85ef254ea..e8e5b10a4d6 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -49,7 +49,7 @@ Lisp_Object Qboundp, Qfboundp; | |||
| 49 | Lisp_Object Qcdr; | 49 | Lisp_Object Qcdr; |
| 50 | 50 | ||
| 51 | #ifdef LISP_FLOAT_TYPE | 51 | #ifdef LISP_FLOAT_TYPE |
| 52 | Lisp_Object Qfloatp, Qinteger_or_floatp, Qinteger_or_float_or_marker_p; | 52 | Lisp_Object Qfloatp; |
| 53 | Lisp_Object Qnumberp, Qnumber_or_marker_p; | 53 | Lisp_Object Qnumberp, Qnumber_or_marker_p; |
| 54 | #endif | 54 | #endif |
| 55 | 55 | ||
| @@ -246,16 +246,6 @@ DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0, "T if OBJECT is a marker (editor | |||
| 246 | return Qnil; | 246 | return Qnil; |
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0, | ||
| 250 | "T if OBJECT is an integer or a marker (editor pointer).") | ||
| 251 | (obj) | ||
| 252 | register Lisp_Object obj; | ||
| 253 | { | ||
| 254 | if (XTYPE (obj) == Lisp_Marker || XTYPE (obj) == Lisp_Int) | ||
| 255 | return Qt; | ||
| 256 | return Qnil; | ||
| 257 | } | ||
| 258 | |||
| 259 | DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, "T if OBJECT is a built-in function.") | 249 | DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, "T if OBJECT is a built-in function.") |
| 260 | (obj) | 250 | (obj) |
| 261 | Lisp_Object obj; | 251 | Lisp_Object obj; |
| @@ -293,22 +283,21 @@ DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, "T if OBJECT is a number.") | |||
| 293 | return Qnil; | 283 | return Qnil; |
| 294 | } | 284 | } |
| 295 | 285 | ||
| 296 | DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, "T if OBJECT is a nonnegative number.") | 286 | DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0, |
| 287 | "T if OBJECT is an integer or a marker (editor pointer).") | ||
| 297 | (obj) | 288 | (obj) |
| 298 | Lisp_Object obj; | 289 | register Lisp_Object obj; |
| 299 | { | 290 | { |
| 300 | if (XTYPE (obj) == Lisp_Int && XINT (obj) >= 0) | 291 | if (XTYPE (obj) == Lisp_Marker || XTYPE (obj) == Lisp_Int) |
| 301 | return Qt; | 292 | return Qt; |
| 302 | return Qnil; | 293 | return Qnil; |
| 303 | } | 294 | } |
| 304 | 295 | ||
| 305 | #ifdef LISP_FLOAT_TYPE | 296 | DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, "T if OBJECT is a nonnegative number.") |
| 306 | DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, | ||
| 307 | "T if OBJECT is a floating point number.") | ||
| 308 | (obj) | 297 | (obj) |
| 309 | Lisp_Object obj; | 298 | Lisp_Object obj; |
| 310 | { | 299 | { |
| 311 | if (XTYPE (obj) == Lisp_Float) | 300 | if (XTYPE (obj) == Lisp_Int && XINT (obj) >= 0) |
| 312 | return Qt; | 301 | return Qt; |
| 313 | return Qnil; | 302 | return Qnil; |
| 314 | } | 303 | } |
| @@ -318,7 +307,11 @@ DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, | |||
| 318 | (obj) | 307 | (obj) |
| 319 | Lisp_Object obj; | 308 | Lisp_Object obj; |
| 320 | { | 309 | { |
| 321 | if (XTYPE (obj) == Lisp_Float || XTYPE (obj) == Lisp_Int) | 310 | if (0 |
| 311 | #ifdef LISP_FLOAT_TYPE | ||
| 312 | || XTYPE (obj) == Lisp_Float | ||
| 313 | #endif | ||
| 314 | || XTYPE (obj) == Lisp_Int) | ||
| 322 | return Qt; | 315 | return Qt; |
| 323 | return Qnil; | 316 | return Qnil; |
| 324 | } | 317 | } |
| @@ -329,12 +322,25 @@ DEFUN ("number-or-marker-p", Fnumber_or_marker_p, | |||
| 329 | (obj) | 322 | (obj) |
| 330 | Lisp_Object obj; | 323 | Lisp_Object obj; |
| 331 | { | 324 | { |
| 332 | if (XTYPE (obj) == Lisp_Float | 325 | if (XTYPE (obj) == Lisp_Int |
| 333 | || XTYPE (obj) == Lisp_Int | 326 | #ifdef LISP_FLOAT_TYPE |
| 327 | || XTYPE (obj) == Lisp_Float | ||
| 328 | #endif | ||
| 334 | || XTYPE (obj) == Lisp_Marker) | 329 | || XTYPE (obj) == Lisp_Marker) |
| 335 | return Qt; | 330 | return Qt; |
| 336 | return Qnil; | 331 | return Qnil; |
| 337 | } | 332 | } |
| 333 | |||
| 334 | #ifdef LISP_FLOAT_TYPE | ||
| 335 | DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, | ||
| 336 | "T if OBJECT is a floating point number.") | ||
| 337 | (obj) | ||
| 338 | Lisp_Object obj; | ||
| 339 | { | ||
| 340 | if (XTYPE (obj) == Lisp_Float) | ||
| 341 | return Qt; | ||
| 342 | return Qnil; | ||
| 343 | } | ||
| 338 | #endif /* LISP_FLOAT_TYPE */ | 344 | #endif /* LISP_FLOAT_TYPE */ |
| 339 | 345 | ||
| 340 | /* Extract and set components of lists */ | 346 | /* Extract and set components of lists */ |
| @@ -1922,8 +1928,8 @@ syms_of_data () | |||
| 1922 | staticpro (&Qinteger_or_marker_p); | 1928 | staticpro (&Qinteger_or_marker_p); |
| 1923 | #ifdef LISP_FLOAT_TYPE | 1929 | #ifdef LISP_FLOAT_TYPE |
| 1924 | staticpro (&Qfloatp); | 1930 | staticpro (&Qfloatp); |
| 1925 | staticpro (&Qinteger_or_floatp); | 1931 | staticpro (&Qnumberp); |
| 1926 | staticpro (&Qinteger_or_float_or_marker_p); | 1932 | staticpro (&Qnumber_or_marker_p); |
| 1927 | #endif /* LISP_FLOAT_TYPE */ | 1933 | #endif /* LISP_FLOAT_TYPE */ |
| 1928 | 1934 | ||
| 1929 | staticpro (&Qboundp); | 1935 | staticpro (&Qboundp); |
| @@ -1937,10 +1943,11 @@ syms_of_data () | |||
| 1937 | defsubr (&Sconsp); | 1943 | defsubr (&Sconsp); |
| 1938 | defsubr (&Satom); | 1944 | defsubr (&Satom); |
| 1939 | defsubr (&Sintegerp); | 1945 | defsubr (&Sintegerp); |
| 1940 | #ifdef LISP_FLOAT_TYPE | 1946 | defsubr (&Sinteger_or_marker_p); |
| 1941 | defsubr (&Sfloatp); | ||
| 1942 | defsubr (&Snumberp); | 1947 | defsubr (&Snumberp); |
| 1943 | defsubr (&Snumber_or_marker_p); | 1948 | defsubr (&Snumber_or_marker_p); |
| 1949 | #ifdef LISP_FLOAT_TYPE | ||
| 1950 | defsubr (&Sfloatp); | ||
| 1944 | #endif /* LISP_FLOAT_TYPE */ | 1951 | #endif /* LISP_FLOAT_TYPE */ |
| 1945 | defsubr (&Snatnump); | 1952 | defsubr (&Snatnump); |
| 1946 | defsubr (&Ssymbolp); | 1953 | defsubr (&Ssymbolp); |
| @@ -1950,7 +1957,6 @@ syms_of_data () | |||
| 1950 | defsubr (&Ssequencep); | 1957 | defsubr (&Ssequencep); |
| 1951 | defsubr (&Sbufferp); | 1958 | defsubr (&Sbufferp); |
| 1952 | defsubr (&Smarkerp); | 1959 | defsubr (&Smarkerp); |
| 1953 | defsubr (&Sinteger_or_marker_p); | ||
| 1954 | defsubr (&Ssubrp); | 1960 | defsubr (&Ssubrp); |
| 1955 | defsubr (&Scompiled_function_p); | 1961 | defsubr (&Scompiled_function_p); |
| 1956 | defsubr (&Schar_or_string_p); | 1962 | defsubr (&Schar_or_string_p); |