aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2007-06-20 04:12:15 +0000
committerJay Belanger2007-06-20 04:12:15 +0000
commit16819e4854be13e976bd8845c46562ccec3ffe5b (patch)
treefb8e668b9293424e0f7a50a7d8a6c4d98e578c06
parent515e955e0a0efea90913b8bca66923e34c8f925e (diff)
downloademacs-16819e4854be13e976bd8845c46562ccec3ffe5b.tar.gz
emacs-16819e4854be13e976bd8845c46562ccec3ffe5b.zip
(calc-do-calc-eval): Let math-expr-opers equal the function
math-standard-ops rather than the variable math-standard-opers. (calc-algebraic-entry): Let math-expr-opers equal math-standard-ops or math-expr-ops, as appropriate. (math-expr-read-level,math-read-factor): Let math-expr-opers equal math-expr-ops.
-rw-r--r--lisp/calc/calc-aent.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el
index 4b954fabd0c..be77030c914 100644
--- a/lisp/calc/calc-aent.el
+++ b/lisp/calc/calc-aent.el
@@ -100,7 +100,7 @@
100 (cond 100 (cond
101 ((and (consp str) (not (symbolp (car str)))) 101 ((and (consp str) (not (symbolp (car str))))
102 (let ((calc-language nil) 102 (let ((calc-language nil)
103 (math-expr-opers math-standard-opers) 103 (math-expr-opers (math-standard-ops))
104 (calc-internal-prec 12) 104 (calc-internal-prec 12)
105 (calc-word-size 32) 105 (calc-word-size 32)
106 (calc-symbolic-mode nil) 106 (calc-symbolic-mode nil)
@@ -254,7 +254,7 @@ The value t means abort and give an error message.")
254 (interactive "P") 254 (interactive "P")
255 (calc-wrapper 255 (calc-wrapper
256 (let ((calc-language (if prefix nil calc-language)) 256 (let ((calc-language (if prefix nil calc-language))
257 (math-expr-opers (if prefix math-standard-opers math-expr-opers))) 257 (math-expr-opers (if prefix (math-standard-ops) (math-expr-ops))))
258 (calc-alg-entry (and auto (char-to-string last-command-char)))))) 258 (calc-alg-entry (and auto (char-to-string last-command-char))))))
259 259
260(defvar calc-alg-entry-history nil 260(defvar calc-alg-entry-history nil
@@ -876,7 +876,10 @@ in Calc algebraic input.")
876 calcFunc-eq calcFunc-neq)) 876 calcFunc-eq calcFunc-neq))
877 877
878(defun math-read-expr-level (exp-prec &optional exp-term) 878(defun math-read-expr-level (exp-prec &optional exp-term)
879 (let* ((x (math-read-factor)) (first t) op op2) 879 (let* ((math-expr-opers (math-expr-ops))
880 (x (math-read-factor))
881 (first t)
882 op op2)
880 (while (and (or (and calc-user-parse-table 883 (while (and (or (and calc-user-parse-table
881 (setq op (calc-check-user-syntax x exp-prec)) 884 (setq op (calc-check-user-syntax x exp-prec))
882 (setq x op 885 (setq x op
@@ -1121,7 +1124,8 @@ in Calc algebraic input.")
1121 (assoc math-expr-data '(("(") ("[") ("{")))))) 1124 (assoc math-expr-data '(("(") ("[") ("{"))))))
1122 1125
1123(defun math-read-factor () 1126(defun math-read-factor ()
1124 (let (op) 1127 (let ((math-expr-opers (math-expr-ops))
1128 op)
1125 (cond ((eq math-exp-token 'number) 1129 (cond ((eq math-exp-token 'number)
1126 (let ((num (math-read-number math-expr-data))) 1130 (let ((num (math-read-number math-expr-data)))
1127 (if (not num) 1131 (if (not num)