Function: math-check-known-scalarp
math-check-known-scalarp is a byte-compiled function defined in
calc-arith.el.gz.
Signature
(math-check-known-scalarp A)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-arith.el.gz
;;; Try to prove that A is a scalar (i.e., a non-vector).
(defun math-check-known-scalarp (a)
(cond ((Math-objectp a) t)
((memq (car a) math-scalar-functions)
t)
((memq (car a) math-real-scalar-functions)
t)
((memq (car a) math-scalar-if-args-functions)
(while (and (setq a (cdr a))
(math-check-known-scalarp (car a))))
(null a))
((eq (car a) '^)
(math-check-known-scalarp (nth 1 a)))
((math-const-var a) t)
(t
(let ((decl (if (eq (car a) 'var)
(or (assq (nth 2 a) math-decls-cache)
math-decls-all)
(assq (car a) math-decls-cache)))
val)
(cond
((memq 'scalar (nth 1 decl))
t)
((and (eq (car a) 'var)
(symbolp (nth 2 a))
(boundp (nth 2 a))
(setq val (symbol-value (nth 2 a))))
(math-check-known-scalarp val))
(t
nil))))))