1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00

calc/calc-units.el (math-put-default-units): Don't use "1" as a

default unit.
This commit is contained in:
Jay Belanger 2012-01-20 18:46:09 -06:00
parent 117a9ea130
commit dd6f2a637d
2 changed files with 15 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2012-01-21 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-units.el (math-put-default-units): Don't use "1" as a
default unit.
2012-01-21 Glenn Morris <rgm@gnu.org>
* international/mule.el (auto-coding-alist): Add .tbz.

View File

@ -415,18 +415,19 @@ If EXPR is nil, return nil."
(defun math-put-default-units (expr)
"Put the units in EXPR in the default units table."
(let* ((units (math-get-units expr))
(standard-units (math-get-standard-units expr))
(let ((units (math-get-units expr)))
(unless (eq units 1)
(let* ((standard-units (math-get-standard-units expr))
(default-units (gethash
standard-units
math-default-units-table)))
(cond
((not default-units)
(puthash standard-units (list units) math-default-units-table))
((not (equal units (car default-units)))
(puthash standard-units
(list units (car default-units))
math-default-units-table)))))
(cond
((not default-units)
(puthash standard-units (list units) math-default-units-table))
((not (equal units (car default-units)))
(puthash standard-units
(list units (car default-units))
math-default-units-table)))))))
(defun calc-convert-units (&optional old-units new-units)