]> git.eshelyaron.com Git - emacs.git/commitdiff
calc/calc-prog.el
authorJay Belanger <jay.p.belanger@gmail.com>
Fri, 21 Jan 2011 03:48:26 +0000 (21:48 -0600)
committerJay Belanger <jay.p.belanger@gmail.com>
Fri, 21 Jan 2011 03:48:26 +0000 (21:48 -0600)
calc/calc-graph.el
calc/calc-map.el: Change `arglist' to `math-arglist' throughout.

lisp/ChangeLog
lisp/calc/calc-graph.el
lisp/calc/calc-map.el
lisp/calc/calc-prog.el

index 6da4500d2664b0c429e70f2da2b25a2c99153cd1..e973fcd6d56d889e09444d8378eaf0ca8ced959e 100644 (file)
@@ -1,3 +1,9 @@
+2011-01-21  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * calc/calc-prog.el
+         calc/calc-graph.el
+         calc/calc-map.el: Change `arglist' to `math-arglist' throughout.
+
 2011-01-21  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
 
        * calc/calc-ext.el (calc-init-extensions): Map all `undo'
index 37db8ebbd7de12f709805fb4cb23143be11623fe..86f58a8bbc8eb54f5559007c42c980290456cf0a 100644 (file)
                (setq calc-graph-xstep 1)
              (error "%s is not a suitable basis for %s" calc-graph-xname calc-graph-yname)))))
     (or (math-realp calc-graph-yvalue)
-       (let ((arglist nil))
+       (let ((math-arglist nil))
          (setq calc-graph-yvalue (math-evaluate-expr calc-graph-yvalue))
          (calc-default-formula-arglist calc-graph-yvalue)
-         (or arglist
+         (or math-arglist
              (error "%s does not contain any unassigned variables" calc-graph-yname))
-         (and (cdr arglist)
+         (and (cdr math-arglist)
               (error "%s contains more than one variable: %s"
-                     calc-graph-yname arglist))
+                     calc-graph-yname math-arglist))
          (setq calc-graph-yvalue (math-expr-subst calc-graph-yvalue
-                                       (math-build-var-name (car arglist))
+                                       (math-build-var-name (car math-arglist))
                                        '(var DUMMY var-DUMMY)))))
     (setq calc-graph-ycache (assoc calc-graph-yvalue calc-graph-data-cache))
     (delq calc-graph-ycache calc-graph-data-cache)
              calc-graph-zp calc-graph-yvalue
              calc-graph-xvec t))
     (or (math-realp calc-graph-yvalue)
-       (let ((arglist nil))
+       (let ((math-arglist nil))
          (setq calc-graph-yvalue (math-evaluate-expr calc-graph-yvalue))
          (calc-default-formula-arglist calc-graph-yvalue)
-         (setq arglist (sort arglist 'string-lessp))
-         (or (cdr arglist)
+         (setq math-arglist (sort math-arglist 'string-lessp))
+         (or (cdr math-arglist)
              (error "%s does not contain enough unassigned variables" calc-graph-yname))
-         (and (cdr (cdr arglist))
-              (error "%s contains too many variables: %s" calc-graph-yname arglist))
+         (and (cdr (cdr math-arglist))
+              (error "%s contains too many variables: %s" calc-graph-yname math-arglist))
          (setq calc-graph-yvalue (math-multi-subst calc-graph-yvalue
                                         (mapcar 'math-build-var-name
-                                                arglist)
+                                                math-arglist)
                                         '((var DUMMY var-DUMMY)
                                           (var DUMMY2 var-DUMMY2))))))
     (if (setq calc-graph-xvec (eq (car-safe calc-graph-xvalue) 'vec))
index a37fe5375f574d8ef0ad34fe10272baefacbcc43..934968c1ef629d789cd9ee6e8c0d895e13863b96 100644 (file)
             (and nargs forcenargs (/= nargs forcenargs) (>= nargs 0)
                  (error "Must be a %d-argument operator" nargs)))
            ((memq key '(?\$ ?\'))
-            (let* ((arglist nil)
+            (let* ((math-arglist nil)
                    (has-args nil)
                    (record-entry nil)
                    (expr (if (eq key ?\$)
                              (if (> calc-dollar-used 0)
                                  (progn
                                    (setq has-args calc-dollar-used
-                                         arglist (calc-invent-args has-args))
+                                         math-arglist (calc-invent-args has-args))
                                    (math-multi-subst (car func)
-                                                     (reverse arglist)
-                                                     arglist))
+                                                     (reverse math-arglist)
+                                                     math-arglist))
                                (if (> calc-hashes-used 0)
                                    (setq has-args calc-hashes-used
-                                         arglist (calc-invent-args has-args)))
+                                         math-arglist (calc-invent-args has-args)))
                                (car func))))))
               (if (eq (car-safe expr) 'calcFunc-lambda)
                   (setq oper (list "$" (- (length expr) 2) expr)
                     (progn
                       (calc-default-formula-arglist expr)
                       (setq record-entry t
-                            arglist (sort arglist 'string-lessp))
+                            math-arglist (sort math-arglist 'string-lessp))
                       (if calc-verify-arglist
-                          (setq arglist (read-from-minibuffer
+                          (setq math-arglist (read-from-minibuffer
                                          "Function argument list: "
-                                         (if arglist
-                                             (prin1-to-string arglist)
+                                         (if math-arglist
+                                             (prin1-to-string math-arglist)
                                            "()")
                                          minibuffer-local-map
                                          t)))
-                      (setq arglist (mapcar (function
+                      (setq math-arglist (mapcar (function
                                              (lambda (x)
                                                (list 'var
                                                      x
                                                       (concat
                                                        "var-"
                                                        (symbol-name x))))))
-                                            arglist))))
+                                            math-arglist))))
                 (setq oper (list "$"
-                                 (length arglist)
-                                 (append '(calcFunc-lambda) arglist
+                                 (length math-arglist)
+                                 (append '(calcFunc-lambda) math-arglist
                                          (list expr)))
                       done t))
               (if record-entry
index efdb8fc88ea12174a3e65f6bec93a57ae72c0176..a7299122598eec9e2a2a8c3756f01bb78876239d 100644 (file)
   (interactive)
   (calc-wrapper
    (let* ((form (calc-top 1))
-         (arglist nil)
+         (math-arglist nil)
          (is-lambda (and (eq (car-safe form) 'calcFunc-lambda)
                          (>= (length form) 2)))
          odef key keyname cmd cmd-base cmd-base-default
           func calc-user-formula-alist is-symb)
      (if is-lambda
-        (setq arglist (mapcar (function (lambda (x) (nth 1 x)))
+        (setq math-arglist (mapcar (function (lambda (x) (nth 1 x)))
                               (nreverse (cdr (reverse (cdr form)))))
               form (nth (1- (length form)) form))
        (calc-default-formula-arglist form)
-       (setq arglist (sort arglist 'string-lessp)))
+       (setq math-arglist (sort math-arglist 'string-lessp)))
      (message "Define user key: z-")
      (setq key (read-char))
      (if (= (calc-user-function-classify key) 0)
                                        (format "%05d" (% (random) 10000)))))))
 
      (if is-lambda
-        (setq calc-user-formula-alist arglist)
+        (setq calc-user-formula-alist math-arglist)
        (while
           (progn
             (setq calc-user-formula-alist
                    (read-from-minibuffer "Function argument list: "
-                                         (if arglist
-                                             (prin1-to-string arglist)
+                                         (if math-arglist
+                                             (prin1-to-string math-arglist)
                                            "()")
                                          minibuffer-local-map
                                          t))
-            (and (not (calc-subsetp calc-user-formula-alist arglist))
+            (and (not (calc-subsetp calc-user-formula-alist math-arglist))
                  (not (y-or-n-p
                        "Okay for arguments that don't appear in formula to be ignored? "))))))
      (setq is-symb (and calc-user-formula-alist
             (setcdr kmap (cons (cons key cmd) (cdr kmap)))))))
    (message "")))
 
-(defvar arglist)                   ; dynamically bound in all callers
+(defvar math-arglist)              ; dynamically bound in all callers
 (defun calc-default-formula-arglist (form)
   (if (consp form)
       (if (eq (car form) 'var)
-         (if (or (memq (nth 1 form) arglist)
+         (if (or (memq (nth 1 form) math-arglist)
                  (math-const-var form))
              ()
-           (setq arglist (cons (nth 1 form) arglist)))
+           (setq math-arglist (cons (nth 1 form) math-arglist)))
        (calc-default-formula-arglist-step (cdr form)))))
 
 (defun calc-default-formula-arglist-step (l)
                                              (intern (concat "calcFunc-" x))))))))
          (comps (get func 'math-compose-forms))
          entry entry2
-         (arglist nil)
+         (math-arglist nil)
          (calc-user-formula-alist nil))
      (if (math-zerop comp)
         (if (setq entry (assq calc-language comps))
             (put func 'math-compose-forms (delq entry comps)))
        (calc-default-formula-arglist comp)
-       (setq arglist (sort arglist 'string-lessp))
+       (setq math-arglist (sort math-arglist 'string-lessp))
        (while
           (progn
             (setq calc-user-formula-alist
                    (read-from-minibuffer "Composition argument list: "
-                                         (if arglist
-                                             (prin1-to-string arglist)
+                                         (if math-arglist
+                                             (prin1-to-string math-arglist)
                                            "()")
                                          minibuffer-local-map
                                          t))
-            (and (not (calc-subsetp calc-user-formula-alist arglist))
+            (and (not (calc-subsetp calc-user-formula-alist math-arglist))
                  (y-or-n-p
                   "Okay for arguments that don't appear in formula to be invisible? "))))
        (or (setq entry (assq calc-language comps))