diff options
| author | Jay Belanger | 2013-03-07 20:11:25 -0600 |
|---|---|---|
| committer | Jay Belanger | 2013-03-07 20:11:25 -0600 |
| commit | 6d7ebb726dd39b5e5e9f12e0341a4bb350caf637 (patch) | |
| tree | ddf2c9be5cf92e827f04016ee61c926fbe7588d3 | |
| parent | 36075a19b2d37e38e8258dff2f774a2a3702dc55 (diff) | |
| download | emacs-6d7ebb726dd39b5e5e9f12e0341a4bb350caf637.tar.gz emacs-6d7ebb726dd39b5e5e9f12e0341a4bb350caf637.zip | |
* doc/misc/calc.texi (Basic Operations on Units): Fix
cross-reference.
* calc/calc-units.el (calc-convert-units): Fix the way that default
new units are stored.
| -rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/calc.texi | 4 | ||||
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/calc/calc-units.el | 12 |
4 files changed, 19 insertions, 7 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 12230bfb374..b634cf7433a 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-03-08 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 2 | |||
| 3 | * calc.texi (Basic Operations on Units): Fix | ||
| 4 | cross-reference. | ||
| 5 | |||
| 1 | 2013-03-07 Katsumi Yamaoka <yamaoka@jpl.org> | 6 | 2013-03-07 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 7 | ||
| 3 | * gnus-faq.texi (FAQ 3-11): Now Gnus supports POP3 UIDL. | 8 | * gnus-faq.texi (FAQ 3-11): Now Gnus supports POP3 UIDL. |
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index 2d1f59cfa68..0bf7833ec34 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi | |||
| @@ -27918,8 +27918,8 @@ simplified so that it doesn't contain any units, like @samp{ft/in} can | |||
| 27918 | be simplified to 12, then @kbd{u c} will still prompt for both old | 27918 | be simplified to 12, then @kbd{u c} will still prompt for both old |
| 27919 | units and new units. You can ignore the prompt for old units with | 27919 | units and new units. You can ignore the prompt for old units with |
| 27920 | @key{RET}, or turn off the prompt by setting the customizable variable | 27920 | @key{RET}, or turn off the prompt by setting the customizable variable |
| 27921 | @code{calc-allow-units-as-numbers} to @code{nil}. | 27921 | @code{calc-allow-units-as-numbers} to @code{nil}; |
| 27922 | @pxref{Customizing Calc}) Assuming the old and new units you give are | 27922 | @pxref{Customizing Calc}.) Assuming the old and new units you give are |
| 27923 | consistent with each other, the result also will not contain any | 27923 | consistent with each other, the result also will not contain any |
| 27924 | units. For example, @kbd{@w{u c} cm @key{RET} in @key{RET}} converts | 27924 | units. For example, @kbd{@w{u c} cm @key{RET} in @key{RET}} converts |
| 27925 | the number 2 on the stack to 5.08. | 27925 | the number 2 on the stack to 5.08. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f24f5b2c8c..c8a4a06f28d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-03-08 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 2 | |||
| 3 | * calc/calc-units.el (calc-convert-units): Fix the way that default | ||
| 4 | new units are stored. | ||
| 5 | |||
| 1 | 2013-03-07 Karl Fogel <kfogel@red-bean.com> | 6 | 2013-03-07 Karl Fogel <kfogel@red-bean.com> |
| 2 | 7 | ||
| 3 | * bookmark.el: Define a face to highlight bookmark names in | 8 | * bookmark.el: Define a face to highlight bookmark names in |
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index b334d7b3b45..335980af4dd 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el | |||
| @@ -503,11 +503,13 @@ If COMP or STD is non-nil, put that in the units table instead." | |||
| 503 | (comp (eq (car-safe units) '+))) | 503 | (comp (eq (car-safe units) '+))) |
| 504 | (unless (or unew std) | 504 | (unless (or unew std) |
| 505 | (error "No units specified")) | 505 | (error "No units specified")) |
| 506 | (let ((res | 506 | (let* ((noold (and uoldname (not (equal uoldname "1")))) |
| 507 | (if std | 507 | (res |
| 508 | (math-simplify-units (math-to-standard-units expr (nth 1 std))) | 508 | (if std |
| 509 | (math-convert-units expr units (and uoldname (not (equal uoldname "1"))))))) | 509 | (math-simplify-units (math-to-standard-units expr (nth 1 std))) |
| 510 | (math-put-default-units res (if comp units)) | 510 | (math-convert-units expr units noold)))) |
| 511 | (unless std | ||
| 512 | (math-put-default-units (if noold units res) (if comp units))) | ||
| 511 | (calc-enter-result 1 "cvun" res)))))) | 513 | (calc-enter-result 1 "cvun" res)))))) |
| 512 | 514 | ||
| 513 | (defun calc-autorange-units (arg) | 515 | (defun calc-autorange-units (arg) |