[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106900: calc/calc-units.el (math-put
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106900: calc/calc-units.el (math-put-default-units): Don't use "1" as a |
Date: |
Fri, 20 Jan 2012 18:46:09 -0600 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106900
committer: Jay Belanger <address@hidden>
branch nick: trunk
timestamp: Fri 2012-01-20 18:46:09 -0600
message:
calc/calc-units.el (math-put-default-units): Don't use "1" as a
default unit.
modified:
lisp/ChangeLog
lisp/calc/calc-units.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-01-21 00:42:09 +0000
+++ b/lisp/ChangeLog 2012-01-21 00:46:09 +0000
@@ -1,3 +1,8 @@
+2012-01-21 Jay Belanger <address@hidden>
+
+ * calc/calc-units.el (math-put-default-units): Don't use "1" as a
+ default unit.
+
2012-01-21 Glenn Morris <address@hidden>
* international/mule.el (auto-coding-alist): Add .tbz.
=== modified file 'lisp/calc/calc-units.el'
--- a/lisp/calc/calc-units.el 2012-01-19 07:21:25 +0000
+++ b/lisp/calc/calc-units.el 2012-01-21 00:46:09 +0000
@@ -415,18 +415,19 @@
(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106900: calc/calc-units.el (math-put-default-units): Don't use "1" as a,
Jay Belanger <=