[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40155: 27.0.90; `math-truc' called with `nil' during `calc-graph-fas
From: |
Mattias Engdegård |
Subject: |
bug#40155: 27.0.90; `math-truc' called with `nil' during `calc-graph-fast' call |
Date: |
Fri, 27 Mar 2020 18:37:17 +0100 |
Thanks for the report. Explanation:
The graph code does
(and (Math-num-integerp lstyle) (math-trunc lstyle))
but Math-num-integerp returns true for nil, and math-trunc returns the argument
if it satisfies Math-integerp, which used to return true for nil as well. Thus,
the expression above 'works' (ie, returns nil) when lstyle is nil as well.
However, Math-integerp was changed in Emacs 27 to use native bignums, and no
longer returns true for nil, resulting in the error. Changing Math-num-integerp
to return false for nil would make the code work again, this time in the way
originally intended.
Would you try this patch? (Please try various other operations as well, in case
the change had unintended consequences.)
0001-Calc-don-t-treat-nil-as-an-integer-bug-40155.patch
Description: Binary data