Function: math-rwapply-remember

math-rwapply-remember is a byte-compiled function defined in calc-rewr.el.gz.

Signature

(math-rwapply-remember OLD NEW)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-rewr.el.gz
(defun math-rwapply-remember (old new)
  (let ((varval (symbol-value (nth 2 (car math-apply-rw-ruleset))))
	(rules (assq (car-safe old) math-apply-rw-ruleset)))
    (if (and (eq (car-safe varval) 'vec)
	     (not (memq (car-safe old) '(nil schedule + -)))
	     rules)
	(progn
	  (setcdr varval (cons (list 'calcFunc-assign
				     (if (math-rwcomp-no-vars old)
					 old
				       (list 'calcFunc-quote old))
				     new)
			       (cdr varval)))
	  (setcdr rules (cons (list (vector nil old)
				    (list (list 'same 0 1)
					  (list 'done new nil))
				    nil nil)
			      (cdr rules)))))))