/[emacs]/emacs/lisp/calc/calc-stuff.el
ViewVC logotype

Diff of /emacs/lisp/calc/calc-stuff.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by miles, Mon Sep 1 15:45:18 2003 UTC revision 1.8 by jpb, Fri Nov 26 22:34:59 2004 UTC
# Line 3  Line 3 
3  ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.  ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
4    
5  ;; Author: David Gillespie <daveg@synaptics.com>  ;; Author: David Gillespie <daveg@synaptics.com>
6  ;; Maintainers: D. Goel <deego@gnufans.org>  ;; Maintainer: Jay Belanger <belanger@truman.edu>
 ;;              Colin Walters <walters@debian.org>  
7    
8  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
9    
# Line 165  With a prefix, push that prefix as a num Line 164  With a prefix, push that prefix as a num
164    (interactive)    (interactive)
165    (message "Calc %s" calc-version))    (message "Calc %s" calc-version))
166    
167    ;; The following caches are declared in other files, but are
168    ;; reset here.
169    (defvar math-lud-cache) ; calc-mtx.el
170    (defvar math-log2-cache) ; calc-bin.el
171    (defvar math-radix-digits-cache) ; calc-bin.el
172    (defvar math-radix-float-cache-tag) ; calc-bin.el
173    (defvar math-random-cache) ; calc-comb.el
174    (defvar math-max-digits-cache) ; calc-bin.el
175    (defvar math-integral-cache) ; calcalg2.el
176    (defvar math-units-table) ; calc-units.el
177    (defvar math-format-date-cache) ; calc-forms.el
178    (defvar math-holidays-cache-tag) ; calc-forms.el
179    
180  (defun calc-flush-caches (&optional inhibit-msg)  (defun calc-flush-caches (&optional inhibit-msg)
181    (interactive "P")    (interactive "P")
# Line 175  With a prefix, push that prefix as a num Line 186  With a prefix, push that prefix as a num
186           math-radix-float-cache-tag nil           math-radix-float-cache-tag nil
187           math-random-cache nil           math-random-cache nil
188           math-max-digits-cache nil           math-max-digits-cache nil
          math-checked-rewrites nil  
189           math-integral-cache nil           math-integral-cache nil
190           math-units-table nil           math-units-table nil
191           math-decls-cache-tag nil           math-decls-cache-tag nil
192           math-eval-rules-cache-tag t           math-eval-rules-cache-tag t
          math-graph-var-cache nil  
          math-graph-data-cache nil  
193           math-format-date-cache nil           math-format-date-cache nil
194           math-holidays-cache-tag t)           math-holidays-cache-tag t)
195     (mapcar (function (lambda (x) (set x -100))) math-cache-list)     (mapcar (function (lambda (x) (set x -100))) math-cache-list)
# Line 270  With a prefix, push that prefix as a num Line 278  With a prefix, push that prefix as a num
278    (math-map-over-constants (function (lambda (x) (calcFunc-frac x tol)))    (math-map-over-constants (function (lambda (x) (calcFunc-frac x tol)))
279                             a))                             a))
280    
281  (defun math-map-over-constants (func expr)  ;; The variable math-moc-func is local to math-map-over-constants,
282    ;; but is used by math-map-over-constants-rec, which is called by
283    ;; math-map-over-constants.
284    (defvar math-moc-func)
285    
286    (defun math-map-over-constants (math-moc-func expr)
287    (math-map-over-constants-rec expr))    (math-map-over-constants-rec expr))
288    
289  (defun math-map-over-constants-rec (expr)  (defun math-map-over-constants-rec (expr)
290    (cond ((or (Math-primp expr)    (cond ((or (Math-primp expr)
291               (memq (car expr) '(intv sdev)))               (memq (car expr) '(intv sdev)))
292           (or (and (Math-objectp expr)           (or (and (Math-objectp expr)
293                    (funcall func expr))                    (funcall math-moc-func expr))
294               expr))               expr))
295          ((and (memq (car expr) '(^ calcFunc-subscr))          ((and (memq (car expr) '(^ calcFunc-subscr))
296                (eq func 'math-float)                (eq math-moc-func 'math-float)
297                (= (length expr) 3)                (= (length expr) 3)
298                (Math-integerp (nth 2 expr)))                (Math-integerp (nth 2 expr)))
299           (list (car expr)           (list (car expr)

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26