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 | |
| parent | 706ac90d209be667058dc871c89d921a9027a9f1 (diff) | |
| download | emacs-464f88989ff0c5ce1ec228eaf178091bc1f591b8.tar.gz emacs-464f88989ff0c5ce1ec228eaf178091bc1f591b8.zip | |
*** empty log message ***
Diffstat (limited to 'src')
| -rw-r--r-- | src/data.c | 58 | ||||
| -rw-r--r-- | src/keyboard.c | 9 | ||||
| -rw-r--r-- | src/lisp.h | 4 |
3 files changed, 39 insertions, 32 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); |
diff --git a/src/keyboard.c b/src/keyboard.c index 2015fbf211f..7d7faa48b1d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3349,12 +3349,13 @@ quit_throw_to_read_char () | |||
| 3349 | 3349 | ||
| 3350 | DEFUN ("set-input-mode", Fset_input_mode, Sset_input_mode, 3, 4, 0, | 3350 | DEFUN ("set-input-mode", Fset_input_mode, Sset_input_mode, 3, 4, 0, |
| 3351 | "Set mode of reading keyboard input.\n\ | 3351 | "Set mode of reading keyboard input.\n\ |
| 3352 | First arg non-nil means use input interrupts; nil means use CBREAK mode.\n\ | 3352 | First arg INTERRUPT non-nil means use input interrupts;\n\ |
| 3353 | Second arg non-nil means use ^S/^Q flow control for output to terminal\n\ | 3353 | nil means use CBREAK mode.\n\ |
| 3354 | Second arg FLOW non-nil means use ^S/^Q flow control for output to terminal\n\ | ||
| 3354 | (no effect except in CBREAK mode).\n\ | 3355 | (no effect except in CBREAK mode).\n\ |
| 3355 | Third arg non-nil means accept 8-bit input (for a Meta key).\n\ | 3356 | Third arg META non-nil means accept 8-bit input (for a Meta key).\n\ |
| 3356 | Otherwise, the top bit is ignored, on the assumption it is parity.\n\ | 3357 | Otherwise, the top bit is ignored, on the assumption it is parity.\n\ |
| 3357 | Optional fourth arg non-nil specifies character to use for quitting.") | 3358 | Optional fourth arg QUIT if non-nil specifies character to use for quitting.") |
| 3358 | (interrupt, flow, meta, quit) | 3359 | (interrupt, flow, meta, quit) |
| 3359 | Lisp_Object interrupt, flow, meta, quit; | 3360 | Lisp_Object interrupt, flow, meta, quit; |
| 3360 | { | 3361 | { |
diff --git a/src/lisp.h b/src/lisp.h index b0b0cb4fc56..2831070b2cd 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -571,12 +571,12 @@ typedef unsigned char UCHAR; | |||
| 571 | 571 | ||
| 572 | #define CHECK_NUMBER_OR_FLOAT(x, i) \ | 572 | #define CHECK_NUMBER_OR_FLOAT(x, i) \ |
| 573 | { if (XTYPE (x) != Lisp_Float && XTYPE (x) != Lisp_Int) \ | 573 | { if (XTYPE (x) != Lisp_Float && XTYPE (x) != Lisp_Int) \ |
| 574 | x = wrong_type_argument (Qinteger_or_floatp, (x)); } | 574 | x = wrong_type_argument (Qnumberp, (x)); } |
| 575 | 575 | ||
| 576 | #define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x, i) \ | 576 | #define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x, i) \ |
| 577 | { if (XTYPE (x) == Lisp_Marker) XFASTINT (x) = marker_position (x); \ | 577 | { if (XTYPE (x) == Lisp_Marker) XFASTINT (x) = marker_position (x); \ |
| 578 | else if (XTYPE (x) != Lisp_Int && XTYPE (x) != Lisp_Float) \ | 578 | else if (XTYPE (x) != Lisp_Int && XTYPE (x) != Lisp_Float) \ |
| 579 | x = wrong_type_argument (Qinteger_or_float_or_marker_p, (x)); } | 579 | x = wrong_type_argument (Qnumber_or_marker_p, (x)); } |
| 580 | 580 | ||
| 581 | #else /* Not LISP_FLOAT_TYPE */ | 581 | #else /* Not LISP_FLOAT_TYPE */ |
| 582 | 582 | ||