summaryrefslogtreecommitdiff
path: root/lisp/calc/calccomp.el
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2007-12-02 20:00:36 +0000
committerJay Belanger <jay.p.belanger@gmail.com>2007-12-02 20:00:36 +0000
commit2b8a3002530d84d728c9009ded996ece20a571e5 (patch)
tree440a3c5d68e5e1e6f6fe91f3b3c72a2c4935cec8 /lisp/calc/calccomp.el
parentdad9356322e49d12517a019d25c7806f1d9c384a (diff)
downloademacs-2b8a3002530d84d728c9009ded996ece20a571e5.tar.gz
(math-compose-var): Adjust argument list.
(math-compose-expr): Use adjusted `math-compose-var'.
Diffstat (limited to 'lisp/calc/calccomp.el')
-rw-r--r--lisp/calc/calccomp.el33
1 files changed, 17 insertions, 16 deletions
diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el
index 0d25a52c8f6..dd59b366881 100644
--- a/lisp/calc/calccomp.el
+++ b/lisp/calc/calccomp.el
@@ -70,20 +70,21 @@
(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))
@@ -332,8 +333,8 @@
(if v
(symbol-name (car v))
(if (setq spfn (get calc-language 'math-var-formatter))
- (funcall spfn a v 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)) "(" "[")