From d6ffd3f84f561dd8dd5f1e874a7ba1299bde8d02 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 4 Mar 2011 00:35:49 -0600 Subject: [PATCH] * calc/calc-units.el (math-to-standard-rec): Don't treat subscripted variables as units. --- lisp/ChangeLog | 5 +++++ lisp/calc/calc-units.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 477361b9493..47404444400 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-04 Jay Belanger + + * calc/calc-units.el (math-to-standard-rec): Don't treat subscripted + variables as units. + 2011-03-04 Bob Rogers * emacs-lisp/ewoc.el (ewoc-goto-next): Give a more explicit error diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index e6a6fb01132..0d58bc757f2 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -960,7 +960,10 @@ If EXPR is nil, return nil." (if (eq base 'pi) (math-pi) expr))) - (if (Math-primp expr) + (if (or + (Math-primp expr) + (and (eq (car-safe expr) 'calcFunc-subscr) + (eq (car-safe (nth 1 expr)) 'var))) expr (cons (car expr) (mapcar 'math-to-standard-rec (cdr expr)))))) -- 2.39.5