[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112224: * lisp/calc/calc.el (calc-al
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112224: * lisp/calc/calc.el (calc-allow-units-as-numbers): Move declaration. |
Date: |
Thu, 04 Apr 2013 21:20:35 -0500 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112224
committer: Jay Belanger <address@hidden>
branch nick: trunk
timestamp: Thu 2013-04-04 21:20:35 -0500
message:
* lisp/calc/calc.el (calc-allow-units-as-numbers): Move declaration.
* lisp/calc/calc-units.el (calc-convert-units): Redo conditional.
modified:
lisp/ChangeLog
lisp/calc/calc-units.el
lisp/calc/calc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-04-04 03:46:25 +0000
+++ b/lisp/ChangeLog 2013-04-05 02:20:35 +0000
@@ -1,3 +1,7 @@
+2013-04-05 Jay Belanger <address@hidden>
+
+ * calc/calc-units.el (calc-convert-units): Rewrite conditional.
+
2013-04-04 Glenn Morris <address@hidden>
* electric.el (electric-pair-inhibit-predicate): Add :version.
=== modified file 'lisp/calc/calc-units.el'
--- a/lisp/calc/calc-units.el 2013-03-08 02:11:25 +0000
+++ b/lisp/calc/calc-units.el 2013-04-05 02:20:35 +0000
@@ -437,7 +437,7 @@
(list new-units (car default-units))
math-default-units-table))))))
-(defvar calc-allow-units-as-numbers)
+(defvar calc-allow-units-as-numbers t)
(defun calc-convert-units (&optional old-units new-units)
(interactive)
@@ -451,7 +451,9 @@
defunits)
(if (or (not (math-units-in-expr-p expr t))
(setq unitscancel (and
- calc-allow-units-as-numbers
+ (if (get 'calc-allow-units-as-numbers
'saved-value)
+ (car (get 'calc-allow-units-as-numbers
'saved-value))
+ calc-allow-units-as-numbers)
(eq (math-get-standard-units expr) 1))))
(let ((uold (or old-units
(progn
=== modified file 'lisp/calc/calc.el'
--- a/lisp/calc/calc.el 2013-02-09 23:17:05 +0000
+++ b/lisp/calc/calc.el 2013-04-05 02:20:35 +0000
@@ -426,14 +426,6 @@
:version "24.3"
:type 'boolean)
-(defcustom calc-allow-units-as-numbers
- t
- "If non-nil, allow unit expressions to be treated like numbers
-when converting units, if the expression can be simplified to be unitless."
- :group 'calc
- :version "24.4"
- :type 'boolean)
-
(defcustom calc-undo-length
100
"The number of undo steps that will be preserved when Calc is quit."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112224: * lisp/calc/calc.el (calc-allow-units-as-numbers): Move declaration.,
Jay Belanger <=