comparison lisp/calc/calc.el @ 86931:469f2c7b7648

(calc-lang-slash-idiv,calc-lang-allow-underscores,calc-lang-c-type-hex) (calc-lang-brackets-are-subscripts, calc-lang-parens-are-subscripts): New variables. (math-expr-special-function-mapping): Remove variable. (math-eqn-ignore-words, math-tex-ignore-words, math-latex-ignore-words): Move to calc-lang.el.
author Jay Belanger <jay.p.belanger@gmail.com>
date Sun, 02 Dec 2007 03:16:05 +0000
parents b7cc783e1692
children e50a2e215441 53108e6cea98
comparison
equal deleted inserted replaced
86930:cf4da0940e73 86931:469f2c7b7648
965 "Function through which to pass strings after formatting.") 965 "Function through which to pass strings after formatting.")
966 (defvar calc-language-input-filter nil 966 (defvar calc-language-input-filter nil
967 "Function through which to pass strings before parsing.") 967 "Function through which to pass strings before parsing.")
968 (defvar calc-radix-formatter nil 968 (defvar calc-radix-formatter nil
969 "Formatting function used for non-decimal numbers.") 969 "Formatting function used for non-decimal numbers.")
970 (defvar calc-lang-slash-idiv nil
971 "A list of languages in which / might represent integer division.")
972 (defvar calc-lang-allow-underscores nil
973 "A list of languages which allow underscores in variable names.")
974 (defvar calc-lang-c-type-hex nil
975 "Languages in which octal and hex numbers are written with leading 0 and 0x,")
976 (defvar calc-lang-brackets-are-subscripts nil
977 "Languages in which subscripts are indicated by brackets.")
978 (defvar calc-lang-parens-are-subscripts nil
979 "Languages in which subscripts are indicated by parentheses.")
970 980
971 (defvar calc-last-kill nil) ; Last number killed in calc-mode. 981 (defvar calc-last-kill nil) ; Last number killed in calc-mode.
972 (defvar calc-dollar-values nil) ; Values to be used for '$'. 982 (defvar calc-dollar-values nil) ; Values to be used for '$'.
973 (defvar calc-dollar-used nil) ; Highest order of '$' that occurred. 983 (defvar calc-dollar-used nil) ; Highest order of '$' that occurred.
974 (defvar calc-hashes-used nil) ; Highest order of '#' that occurred. 984 (defvar calc-hashes-used nil) ; Highest order of '#' that occurred.
987 (defvar calc-standalone-flag nil) 997 (defvar calc-standalone-flag nil)
988 (defvar var-EvalRules nil) 998 (defvar var-EvalRules nil)
989 (defvar math-eval-rules-cache-tag t) 999 (defvar math-eval-rules-cache-tag t)
990 (defvar math-radix-explicit-format t) 1000 (defvar math-radix-explicit-format t)
991 (defvar math-expr-function-mapping nil) 1001 (defvar math-expr-function-mapping nil)
992 (defvar math-expr-special-function-mapping nil)
993 (defvar math-expr-variable-mapping nil) 1002 (defvar math-expr-variable-mapping nil)
994 (defvar math-read-expr-quotes nil) 1003 (defvar math-read-expr-quotes nil)
995 (defvar math-working-step nil) 1004 (defvar math-working-step nil)
996 (defvar math-working-step-2 nil) 1005 (defvar math-working-step-2 nil)
997 (defvar var-i '(special-const (math-imaginary 1))) 1006 (defvar var-i '(special-const (math-imaginary 1)))
3575 (if (> (length s) math-bignum-digit-length) 3584 (if (> (length s) math-bignum-digit-length)
3576 (cons (string-to-number (substring s (- math-bignum-digit-length))) 3585 (cons (string-to-number (substring s (- math-bignum-digit-length)))
3577 (math-read-bignum (substring s 0 (- math-bignum-digit-length)))) 3586 (math-read-bignum (substring s 0 (- math-bignum-digit-length))))
3578 (list (string-to-number s)))) 3587 (list (string-to-number s))))
3579 3588
3580
3581 (defconst math-tex-ignore-words
3582 '( ("\\hbox") ("\\mbox") ("\\text") ("\\left") ("\\right")
3583 ("\\,") ("\\>") ("\\:") ("\\;") ("\\!") ("\\ ")
3584 ("\\quad") ("\\qquad") ("\\hfil") ("\\hfill")
3585 ("\\displaystyle") ("\\textstyle") ("\\dsize") ("\\tsize")
3586 ("\\scriptstyle") ("\\scriptscriptstyle") ("\\ssize") ("\\sssize")
3587 ("\\rm") ("\\bf") ("\\it") ("\\sl")
3588 ("\\roman") ("\\bold") ("\\italic") ("\\slanted")
3589 ("\\cal") ("\\mit") ("\\Cal") ("\\Bbb") ("\\frak") ("\\goth")
3590 ("\\evalto")
3591 ("\\matrix" mat) ("\\bmatrix" mat) ("\\pmatrix" mat)
3592 ("\\begin" begenv)
3593 ("\\cr" punc ";") ("\\\\" punc ";") ("\\*" punc "*")
3594 ("\\{" punc "[") ("\\}" punc "]")))
3595
3596 (defconst math-latex-ignore-words
3597 (append math-tex-ignore-words
3598 '(("\\begin" begenv))))
3599
3600 (defconst math-eqn-ignore-words
3601 '( ("roman") ("bold") ("italic") ("mark") ("lineup") ("evalto")
3602 ("left" ("floor") ("ceil"))
3603 ("right" ("floor") ("ceil"))
3604 ("arc" ("sin") ("cos") ("tan") ("sinh") ("cosh") ("tanh"))
3605 ("size" n) ("font" n) ("fwd" n) ("back" n) ("up" n) ("down" n)
3606 ("above" punc ",")))
3607
3608 (defconst math-standard-opers 3589 (defconst math-standard-opers
3609 '( ( "_" calcFunc-subscr 1200 1201 ) 3590 '( ( "_" calcFunc-subscr 1200 1201 )
3610 ( "%" calcFunc-percent 1100 -1 ) 3591 ( "%" calcFunc-percent 1100 -1 )
3611 ( "u!" calcFunc-lnot -1 1000 ) 3592 ( "u!" calcFunc-lnot -1 1000 )
3612 ( "mod" mod 400 400 185 ) 3593 ( "mod" mod 400 400 185 )