Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
4c9e9550
Commit
4c9e9550
authored
Oct 19, 2012
by
Jay Belanger
Browse files
calc/calc-units.el (math-extract-units): Properly extract powers of units.
parent
1a6e7e38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/calc/calc-units.el
lisp/calc/calc-units.el
+10
-4
No files found.
lisp/ChangeLog
View file @
4c9e9550
2012-10-20 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-units.el (math-extract-units): Properly extract powers
of units.
2012-10-20 Daniel Colascione <dancol@dancol.org>
* frame.el (make-frame): Set x-display-name as we used to in order
...
...
lisp/calc/calc-units.el
View file @
4c9e9550
...
...
@@ -1481,10 +1481,16 @@ If COMP or STD is non-nil, put that in the units table instead."
(
mapcar
'math-remove-units
(
cdr
expr
))))))
(
defun
math-extract-units
(
expr
)
(
if
(
memq
(
car-safe
expr
)
'
(
*
/
))
(
cons
(
car
expr
)
(
mapcar
'math-extract-units
(
cdr
expr
)))
(
if
(
math-check-unit-name
expr
)
expr
1
)))
(
cond
((
memq
(
car-safe
expr
)
'
(
*
/
))
(
cons
(
car
expr
)
(
mapcar
'math-extract-units
(
cdr
expr
))))
((
and
(
eq
(
car-safe
expr
)
'^
)
(
math-check-unit-name
(
nth
1
expr
)))
expr
)
((
math-check-unit-name
expr
)
expr
)
(
t
1
)))
(
defun
math-build-units-table-buffer
(
enter-buffer
)
(
if
(
not
(
and
math-units-table
math-units-table-buffer-valid
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment