diff options
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/data.c b/src/data.c index b85d8a77106..33fe2855c99 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -2603,6 +2603,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) | |||
| 2603 | accum = 0; | 2603 | accum = 0; |
| 2604 | break; | 2604 | break; |
| 2605 | case Amult: | 2605 | case Amult: |
| 2606 | case Adiv: | ||
| 2606 | accum = 1; | 2607 | accum = 1; |
| 2607 | break; | 2608 | break; |
| 2608 | case Alogand: | 2609 | case Alogand: |
| @@ -2658,7 +2659,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) | |||
| 2658 | accum *= next; | 2659 | accum *= next; |
| 2659 | break; | 2660 | break; |
| 2660 | case Adiv: | 2661 | case Adiv: |
| 2661 | if (!argnum) | 2662 | if (! (argnum || nargs == 1)) |
| 2662 | accum = next; | 2663 | accum = next; |
| 2663 | else | 2664 | else |
| 2664 | { | 2665 | { |
| @@ -2727,7 +2728,7 @@ float_arith_driver (double accum, ptrdiff_t argnum, enum arithop code, | |||
| 2727 | accum *= next; | 2728 | accum *= next; |
| 2728 | break; | 2729 | break; |
| 2729 | case Adiv: | 2730 | case Adiv: |
| 2730 | if (!argnum) | 2731 | if (! (argnum || nargs == 1)) |
| 2731 | accum = next; | 2732 | accum = next; |
| 2732 | else | 2733 | else |
| 2733 | { | 2734 | { |
| @@ -2782,9 +2783,11 @@ usage: (* &rest NUMBERS-OR-MARKERS) */) | |||
| 2782 | } | 2783 | } |
| 2783 | 2784 | ||
| 2784 | DEFUN ("/", Fquo, Squo, 1, MANY, 0, | 2785 | DEFUN ("/", Fquo, Squo, 1, MANY, 0, |
| 2785 | doc: /* Return first argument divided by all the remaining arguments. | 2786 | doc: /* Divide number by divisors and return the result. |
| 2787 | With two or more arguments, return first argument divided by the rest. | ||
| 2788 | With one argument, return 1 divided by the argument. | ||
| 2786 | The arguments must be numbers or markers. | 2789 | The arguments must be numbers or markers. |
| 2787 | usage: (/ DIVIDEND &rest DIVISORS) */) | 2790 | usage: (/ NUMBER &rest DIVISORS) */) |
| 2788 | (ptrdiff_t nargs, Lisp_Object *args) | 2791 | (ptrdiff_t nargs, Lisp_Object *args) |
| 2789 | { | 2792 | { |
| 2790 | ptrdiff_t argnum; | 2793 | ptrdiff_t argnum; |