Function: math-rwcomp-match-vars

math-rwcomp-match-vars is a byte-compiled function defined in calc-rewr.el.gz.

Signature

(math-rwcomp-match-vars EXPR)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-rewr.el.gz
(defun math-rwcomp-match-vars (expr)
  (if (Math-primp expr)
      (if (eq (car-safe expr) 'var)
	  (let ((entry (assq (nth 2 expr) math-regs)))
	    (if entry
		(math-rwcomp-register-expr (nth 1 entry))
	      expr))
	expr)
    (if (and (eq (car expr) 'calcFunc-quote)
	     (= (length expr) 2))
	(math-rwcomp-match-vars (nth 1 expr))
      (if (and (eq (car expr) 'calcFunc-plain)
	       (= (length expr) 2)
	       (not (Math-primp (nth 1 expr))))
	  (list (car expr)
		(cons (car (nth 1 expr))
		      (mapcar 'math-rwcomp-match-vars (cdr (nth 1 expr)))))
	(cons (car expr)
	      (mapcar 'math-rwcomp-match-vars (cdr expr)))))))