diff options
| author | Stefan Monnier | 2014-05-27 20:50:44 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-05-27 20:50:44 -0400 |
| commit | 4c539a7b387874577136190d8e1a413da1d7e240 (patch) | |
| tree | ec7fae72e576ba2cde3553fca04cd83cf0c16d35 /src/data.c | |
| parent | 0e4857b7d84f958f66e726ed57b824427b272681 (diff) | |
| download | emacs-4c539a7b387874577136190d8e1a413da1d7e240.tar.gz emacs-4c539a7b387874577136190d8e1a413da1d7e240.zip | |
* lisp/subr.el (zerop): Move from C. Add compiler-macro.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-zerop): Remove.
* src/data.c (Fzerop): Move to Elisp.
(syms_of_data): Don't defsubr it.
* src/keyboard.c (echo_keystrokes_p): New function.
(read_char, record_menu_key, read_key_sequence): Use it.
Fixes: debbugs:17475
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/data.c b/src/data.c index bf863aaed79..0c90944f0ad 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -2332,7 +2332,7 @@ arithcompare_driver (ptrdiff_t nargs, Lisp_Object *args, | |||
| 2332 | ptrdiff_t argnum; | 2332 | ptrdiff_t argnum; |
| 2333 | for (argnum = 1; argnum < nargs; ++argnum) | 2333 | for (argnum = 1; argnum < nargs; ++argnum) |
| 2334 | { | 2334 | { |
| 2335 | if (EQ (Qnil, arithcompare (args[argnum-1], args[argnum], comparison))) | 2335 | if (EQ (Qnil, arithcompare (args[argnum - 1], args[argnum], comparison))) |
| 2336 | return Qnil; | 2336 | return Qnil; |
| 2337 | } | 2337 | } |
| 2338 | return Qt; | 2338 | return Qt; |
| @@ -2386,24 +2386,6 @@ DEFUN ("/=", Fneq, Sneq, 2, 2, 0, | |||
| 2386 | { | 2386 | { |
| 2387 | return arithcompare (num1, num2, ARITH_NOTEQUAL); | 2387 | return arithcompare (num1, num2, ARITH_NOTEQUAL); |
| 2388 | } | 2388 | } |
| 2389 | |||
| 2390 | DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, | ||
| 2391 | doc: /* Return t if NUMBER is zero. */) | ||
| 2392 | (register Lisp_Object number) | ||
| 2393 | { | ||
| 2394 | CHECK_NUMBER_OR_FLOAT (number); | ||
| 2395 | |||
| 2396 | if (FLOATP (number)) | ||
| 2397 | { | ||
| 2398 | if (XFLOAT_DATA (number) == 0.0) | ||
| 2399 | return Qt; | ||
| 2400 | return Qnil; | ||
| 2401 | } | ||
| 2402 | |||
| 2403 | if (!XINT (number)) | ||
| 2404 | return Qt; | ||
| 2405 | return Qnil; | ||
| 2406 | } | ||
| 2407 | 2389 | ||
| 2408 | /* Convert the cons-of-integers, integer, or float value C to an | 2390 | /* Convert the cons-of-integers, integer, or float value C to an |
| 2409 | unsigned value with maximum value MAX. Signal an error if C does not | 2391 | unsigned value with maximum value MAX. Signal an error if C does not |
| @@ -3650,7 +3632,6 @@ syms_of_data (void) | |||
| 3650 | defsubr (&Sleq); | 3632 | defsubr (&Sleq); |
| 3651 | defsubr (&Sgeq); | 3633 | defsubr (&Sgeq); |
| 3652 | defsubr (&Sneq); | 3634 | defsubr (&Sneq); |
| 3653 | defsubr (&Szerop); | ||
| 3654 | defsubr (&Splus); | 3635 | defsubr (&Splus); |
| 3655 | defsubr (&Sminus); | 3636 | defsubr (&Sminus); |
| 3656 | defsubr (&Stimes); | 3637 | defsubr (&Stimes); |