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:
parent
117a9ea130
commit
dd6f2a637d
@ -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.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user