emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calc/calc-units.el,v


From: Jay Belanger
Subject: [Emacs-diffs] Changes to emacs/lisp/calc/calc-units.el,v
Date: Mon, 31 Dec 2007 02:38:19 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Jay Belanger <jpb>      07/12/31 02:38:18

Index: calc-units.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/calc/calc-units.el,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- calc-units.el       24 Oct 2007 01:51:40 -0000      1.33
+++ calc-units.el       31 Dec 2007 02:38:18 -0000      1.34
@@ -491,9 +491,14 @@
      (when (eq (car-safe unew) 'error)
        (error "Bad format in units expression: %s" (nth 2 unew)))
      (math-put-default-units unew)
-     (calc-enter-result 1 "cvtm" (math-simplify-units
+     (let ((ntemp (calc-normalize
+                   (math-simplify-units
                                  (math-convert-temperature expr uold unew
-                                                           uoldname))))))
+                                              uoldname)))))
+       (if (Math-zerop ntemp)
+           (setq ntemp (list '* ntemp unew)))
+       (let ((calc-simplify-mode 'none))
+         (calc-enter-result 1 "cvtm" ntemp))))))
 
 (defun calc-remove-units ()
   (interactive)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]