]> git.eshelyaron.com Git - emacs.git/commitdiff
(math-compose-var): Adjust argument list.
authorJay Belanger <jay.p.belanger@gmail.com>
Sun, 2 Dec 2007 20:00:36 +0000 (20:00 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Sun, 2 Dec 2007 20:00:36 +0000 (20:00 +0000)
(math-compose-expr): Use adjusted `math-compose-var'.

lisp/calc/calccomp.el

index 0d25a52c8f61ac9733d0418075e32a759f43e97c..dd59b36688176f293570c36296481c34655b61a7 100644 (file)
 (defvar math-comp-right-bracket)
 (defvar math-comp-comma)
 
-(defun math-compose-var (a v)
-  (if (and math-compose-hash-args
-           (let ((p calc-arg-values))
-             (setq v 1)
-             (while (and p (not (equal (car p) a)))
-               (setq p (and (eq math-compose-hash-args t) (cdr p))
-                     v (1+ v)))
-             p))
-      (if (eq math-compose-hash-args 1)
-          "#"
-        (format "#%d" v))
-    (if (memq calc-language calc-lang-allow-underscores)
-        (math-to-underscores (symbol-name (nth 1 a)))
-      (symbol-name (nth 1 a)))))
+(defun math-compose-var (a)
+  (let (v)
+    (if (and math-compose-hash-args
+             (let ((p calc-arg-values))
+               (setq v 1)
+               (while (and p (not (equal (car p) a)))
+                 (setq p (and (eq math-compose-hash-args t) (cdr p))
+                       v (1+ v)))
+               p))
+        (if (eq math-compose-hash-args 1)
+            "#"
+          (format "#%d" v))
+      (if (memq calc-language calc-lang-allow-underscores)
+          (math-to-underscores (symbol-name (nth 1 a)))
+        (symbol-name (nth 1 a))))))
 
 (defun math-compose-expr (a prec)
   (let ((math-compose-level (1+ math-compose-level))
        (if v
            (symbol-name (car v))
           (if (setq spfn (get calc-language 'math-var-formatter))
-              (funcall spfn a prec)
-            (math-compose-var a v)))))
+              (funcall spfn a prec)
+            (math-compose-var a)))))
      ((eq (car a) 'intv)
       (list 'horiz
             (if (memq (nth 1 a) '(0 1)) "(" "[")