消极和积极的谓词

The negative and positive predicates

我参考17.5.7.4 Predicates看演示:

— Function: zerop x

Returns true if x is numerically zero, in any of the Calc data types. (Note that for some types, such as error forms and intervals,

it never makes sense to return true.) In defmath, the expression ‘(= x 0)’ will automatically be converted to ‘(math-zerop x)’, and ‘(/= x 0)’ will be converted to ‘(not (math-zerop x))’.

但是应用的时候报错

ELISP> (math-zerop 0)
*** Eval error ***  Symbol’s function definition is void: math-zerop
ELISP> (math-zerop 1)
*** Eval error ***  Symbol’s function definition is void: math-zerop

有什么问题?

Emacs 尝试延迟加载(称为自动加载)它的一些功能。 math-zerop 被定义为 calc-misc 功能的一部分(在 calc-misc.el 中)。

您可以通过 (require 'calc) 加载它,这会加载 calc-misc 功能。