]> code.delx.au - gnu-emacs/blobdiff - lisp/calculator.el
(unify-8859-on-encoding-mode): Set init value to t to reflect reality.
[gnu-emacs] / lisp / calculator.el
index b0ca5b4f449852b131fc27c2b998b977924ae2ec..0aca51b2a46f1eae1ab19973f3ae931aa0b040ce 100644 (file)
@@ -4,7 +4,6 @@
 
 ;; Author: Eli Barzilay <eli@barzilay.org>
 ;; Keywords: tools, convenience
-;; Time-stamp: <2001-09-23 02:24:35 eli>
 
 ;; This file is part of GNU Emacs.
 
@@ -129,14 +128,14 @@ character, in this case the `calculator-standard-displayer' function
 will be used with this character for a format string.")
 
 (defcustom calculator-displayers
-  '(((std ?n) "Standard dislpay, decimal point or scientific")
+  '(((std ?n) "Standard display, decimal point or scientific")
     (calculator-eng-display "Eng display")
     ((std ?f) "Standard display, decimal point")
-    ((std ?e) "Standard dislpay, scientific")
+    ((std ?e) "Standard display, scientific")
     ("%S"     "Emacs printer"))
   "*A list of displayers.
 Each element is a list of a displayer and a description string.  The
-first element is the one which is curently used, this is for the display
+first element is the one which is currently used, this is for the display
 of result values not values in expressions.  A displayer specification
 is the same as the values that can be stored in `calculator-displayer'.
 
@@ -721,7 +720,7 @@ See the documentation for `calculator-mode' for more information."
     (calculator)))
 
 ;;;---------------------------------------------------------------------
-;;; Operatos
+;;; Operators
 
 (defun calculator-op-arity (op)
   "Return OP's arity, 2, +1 or -1."
@@ -988,7 +987,9 @@ the 'left or 'right when one of the standard modes is used."
                       (setq num (/ num 1000.0)) (setq exp (+ exp 3))
                       (setq i (1+ i)))))))
       (or calculator-eng-tmp-show (setq calculator-eng-extra nil))
-      (let ((str (format (concat "%." calculator-number-digits "f")
+      (let ((str (format (concat "%." (number-to-string
+                                       calculator-number-digits)
+                                 "f")
                          num)))
         (concat (let ((calculator-remove-zeros
                        ;; make sure we don't leave integers