aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2007-12-02 20:00:36 +0000
committerJay Belanger2007-12-02 20:00:36 +0000
commit2b8a3002530d84d728c9009ded996ece20a571e5 (patch)
tree440a3c5d68e5e1e6f6fe91f3b3c72a2c4935cec8
parentdad9356322e49d12517a019d25c7806f1d9c384a (diff)
downloademacs-2b8a3002530d84d728c9009ded996ece20a571e5.tar.gz
emacs-2b8a3002530d84d728c9009ded996ece20a571e5.zip
(math-compose-var): Adjust argument list.
(math-compose-expr): Use adjusted `math-compose-var'.
-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 @@
70(defvar math-comp-right-bracket) 70(defvar math-comp-right-bracket)
71(defvar math-comp-comma) 71(defvar math-comp-comma)
72 72
73(defun math-compose-var (a v) 73(defun math-compose-var (a)
74 (if (and math-compose-hash-args 74 (let (v)
75 (let ((p calc-arg-values)) 75 (if (and math-compose-hash-args
76 (setq v 1) 76 (let ((p calc-arg-values))
77 (while (and p (not (equal (car p) a))) 77 (setq v 1)
78 (setq p (and (eq math-compose-hash-args t) (cdr p)) 78 (while (and p (not (equal (car p) a)))
79 v (1+ v))) 79 (setq p (and (eq math-compose-hash-args t) (cdr p))
80 p)) 80 v (1+ v)))
81 (if (eq math-compose-hash-args 1) 81 p))
82 "#" 82 (if (eq math-compose-hash-args 1)
83 (format "#%d" v)) 83 "#"
84 (if (memq calc-language calc-lang-allow-underscores) 84 (format "#%d" v))
85 (math-to-underscores (symbol-name (nth 1 a))) 85 (if (memq calc-language calc-lang-allow-underscores)
86 (symbol-name (nth 1 a))))) 86 (math-to-underscores (symbol-name (nth 1 a)))
87 (symbol-name (nth 1 a))))))
87 88
88(defun math-compose-expr (a prec) 89(defun math-compose-expr (a prec)
89 (let ((math-compose-level (1+ math-compose-level)) 90 (let ((math-compose-level (1+ math-compose-level))
@@ -332,8 +333,8 @@
332 (if v 333 (if v
333 (symbol-name (car v)) 334 (symbol-name (car v))
334 (if (setq spfn (get calc-language 'math-var-formatter)) 335 (if (setq spfn (get calc-language 'math-var-formatter))
335 (funcall spfn a v prec) 336 (funcall spfn a prec)
336 (math-compose-var a v))))) 337 (math-compose-var a)))))
337 ((eq (car a) 'intv) 338 ((eq (car a) 'intv)
338 (list 'horiz 339 (list 'horiz
339 (if (memq (nth 1 a) '(0 1)) "(" "[") 340 (if (memq (nth 1 a) '(0 1)) "(" "[")