summaryrefslogtreecommitdiff
path: root/lisp/calc
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2010-11-18 19:14:36 -0600
committerJay Belanger <jay.p.belanger@gmail.com>2010-11-18 19:14:36 -0600
commit1265829ec33f6d23787733a3f312984f4f268a33 (patch)
tree4e97e83ec3b44852bfdb20420498163e101b4059 /lisp/calc
parent84dfc8a7faccf53d54231ab47a2dc237c80251fb (diff)
downloademacs-1265829ec33f6d23787733a3f312984f4f268a33.tar.gz
emacs-1265829ec33f6d23787733a3f312984f4f268a33.tar.bz2
emacs-1265829ec33f6d23787733a3f312984f4f268a33.zip
calc.texi (TeX and LaTeX Language Modes, Predefined Units):
calc-units.el (math-build-units-table-buffer): README: Mention that the TeX specific units won't use the `tex' prefix in TeX mode. calc-lang.el (math-variable-table): Don't use the `tex' prefix for units in TeX mode.
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/README3
-rw-r--r--lisp/calc/calc-lang.el10
-rw-r--r--lisp/calc/calc-units.el25
3 files changed, 28 insertions, 10 deletions
diff --git a/lisp/calc/README b/lisp/calc/README
index cf3a697c5d7..b23666018e5 100644
--- a/lisp/calc/README
+++ b/lisp/calc/README
@@ -74,6 +74,9 @@ Summary of changes to "Calc"
Emacs 24.1
+* Calc no longer uses the tex prefix for TeX specific unit
+names when using TeX or LaTeX mode.
+
* Added option to highlight selections using faces.
* Gave `calc-histogram' the option of using a vector to determine the bins.
diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el
index f461c47aafd..6c0a65f5567 100644
--- a/lisp/calc/calc-lang.el
+++ b/lisp/calc/calc-lang.el
@@ -540,6 +540,16 @@
( \\Psi . var-Psi )
( \\omega . var-omega )
( \\Omega . var-Omega )
+ ;; Units
+ ( pt . var-texpt )
+ ( pc . var-texpc )
+ ( bp . var-texbp )
+ ( dd . var-texdd )
+ ( cc . var-texcc )
+ ( sp . var-texsp )
+ ( pint . var-pt )
+ ( parsec . var-pc)
+
;; Others
( \\ell . var-ell )
( \\infty . var-inf )
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index a88e87dffbc..8fd1983ac6d 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -57,23 +57,23 @@
"149597870691 m (*)")
;; (approx) NASA JPL (http://neo.jpl.nasa.gov/glossary/au.html)
( lyr "c yr" "Light Year" )
- ( pc "3.0856775854*10^16 m" "Parsec" nil
+ ( pc "3.0856775854*10^16 m" "Parsec (**)" nil
"3.0856775854 10^16 m (*)") ;; (approx) ESUWM
( nmi "1852 m" "Nautical Mile" )
( fath "6 ft" "Fathom" )
( fur "660 ft" "Furlong")
( mu "1 um" "Micron" )
( mil "(1/1000) in" "Mil" )
- ( point "(1/72) in" "Point (1/72 inch)" )
+ ( point "(1/72) in" "Point (PostScript convention)" )
( Ang "10^(-10) m" "Angstrom" )
( mfi "mi+ft+in" "Miles + feet + inches" )
;; TeX lengths
- ( texpt "(100/7227) in" "Point (TeX conventions)" )
- ( texpc "12 texpt" "Pica" )
- ( texbp "point" "Big point (TeX conventions)" )
- ( texdd "(1238/1157) texpt" "Didot point" )
- ( texcc "12 texdd" "Cicero" )
- ( texsp "(1/65536) texpt" "Scaled TeX point" )
+ ( texpt "(100/7227) in" "Point (TeX convention) (**)" )
+ ( texpc "12 texpt" "Pica (TeX convention) (**)" )
+ ( texbp "point" "Big point (TeX convention) (**)" )
+ ( texdd "(1238/1157) texpt" "Didot point (TeX convention) (**)" )
+ ( texcc "12 texdd" "Cicero (TeX convention) (**)" )
+ ( texsp "(1/65536) texpt" "Scaled TeX point (TeX convention) (**)" )
;; Area
( hect "10000 m^2" "*Hectare" )
@@ -86,7 +86,7 @@
( l "L" "Liter" )
( gal "4 qt" "US Gallon" )
( qt "2 pt" "Quart" )
- ( pt "2 cup" "Pint" )
+ ( pt "2 cup" "Pint (**)" )
( cup "8 ozfl" "Cup" )
( ozfl "2 tbsp" "Fluid Ounce" )
( floz "2 tbsp" "Fluid Ounce" )
@@ -1531,7 +1531,12 @@ If EXPR is nil, return nil."
(indent-to 15)
(insert " " (nth 2 u) "\n")
(while (eq (car (car (setq uptr (cdr uptr)))) 0)))
- (insert "\n"))
+ (insert "\n\n")
+ (insert "(**) When in TeX or LaTeX display mode, the TeX specific unit\n"
+ "names will not use the `tex' prefix; the unit name for a\n"
+ "TeX point will be `pt' instead of `texpt', for example.\n"
+ "To avoid conflicts, the unit names for pint and parsec will\n"
+ "be `pint' and `parsec' instead of `pt' and `pc'."))
(view-mode)
(message "Formatting units table...done"))
(setq math-units-table-buffer-valid t)