summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-11-24 13:47:55 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2022-11-24 14:27:51 +0100
commit25e7290d36723525eef189e3b7b194e1110f4d31 (patch)
tree91df8f2e3c626bc82054958572af319636a42974
parent9fcff114b8fe2d538699172fe756606441e67b92 (diff)
downloademacs-25e7290d36723525eef189e3b7b194e1110f4d31.tar.gz
Add new SI prefixes
* lisp/calc/calc-units.el (math-unit-prefixes): * lisp/files.el (file-size-human-readable): Add ronna, quetta, ronto and quecto. (We get the future IEC binary prefixes Ri and Qi (robi and quebi) in `file-size-human-readable` for free.)
-rw-r--r--lisp/calc/calc-units.el9
-rw-r--r--lisp/files.el2
2 files changed, 8 insertions, 3 deletions
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index c8405c7d1a0..42156b94606 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -317,7 +317,9 @@ If you change this, be sure to set `math-units-table' to nil to ensure
that the combined units table will be rebuilt.")
(defvar math-unit-prefixes
- '( ( ?Y (^ 10 24) "Yotta" )
+ '( ( ?Q (^ 10 30) "quetta" )
+ ( ?R (^ 10 27) "ronna" )
+ ( ?Y (^ 10 24) "Yotta" )
( ?Z (^ 10 21) "Zetta" )
( ?E (^ 10 18) "Exa" )
( ?P (^ 10 15) "Peta" )
@@ -340,7 +342,10 @@ that the combined units table will be rebuilt.")
( ?f (^ 10 -15) "Femto" )
( ?a (^ 10 -18) "Atto" )
( ?z (^ 10 -21) "zepto" )
- ( ?y (^ 10 -24) "yocto" )))
+ ( ?y (^ 10 -24) "yocto" )
+ ( ?r (^ 10 -27) "ronto" )
+ ( ?q (^ 10 -30) "quecto" )
+ ))
(defvar math-standard-units-systems
'( ( base nil )
diff --git a/lisp/files.el b/lisp/files.el
index 60c0eb917e5..f1f890430f1 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1533,7 +1533,7 @@ in all cases, since that is the standard symbol for byte."
(let ((power (if (or (null flavor) (eq flavor 'iec))
1024.0
1000.0))
- (prefixes '("" "k" "M" "G" "T" "P" "E" "Z" "Y")))
+ (prefixes '("" "k" "M" "G" "T" "P" "E" "Z" "Y" "R" "Q")))
(while (and (>= file-size power) (cdr prefixes))
(setq file-size (/ file-size power)
prefixes (cdr prefixes)))