diff options
| author | Juanma Barranquero | 2006-12-10 23:48:40 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2006-12-10 23:48:40 +0000 |
| commit | 8f2904a5d7cce61edce90a3cc7e6ecd010aedcbd (patch) | |
| tree | 635f126dd88dde571e9462b68bd91d757f2ef0bb | |
| parent | 6a964bb15341b4c8fa4ddc16569438daedb2d9a4 (diff) | |
| download | emacs-8f2904a5d7cce61edce90a3cc7e6ecd010aedcbd.tar.gz emacs-8f2904a5d7cce61edce90a3cc7e6ecd010aedcbd.zip | |
(calc-eval-error): Doc fix.
| -rw-r--r-- | lisp/calc/calc-aent.el | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index fe5bf4cf9e0..af1113dca76 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el | |||
| @@ -232,9 +232,9 @@ | |||
| 232 | 232 | ||
| 233 | (defvar calc-eval-error nil | 233 | (defvar calc-eval-error nil |
| 234 | "Determines how calc handles errors. | 234 | "Determines how calc handles errors. |
| 235 | NIL means return a list containing the character position of error. | 235 | If nil, return a list containing the character position of error. |
| 236 | STRING means return error message as string rather than list. | 236 | STRING means return error message as string rather than list. |
| 237 | T means abort and give an error message.") | 237 | The value t means abort and give an error message.") |
| 238 | 238 | ||
| 239 | (defun calc-eval-error (msg) | 239 | (defun calc-eval-error (msg) |
| 240 | (if calc-eval-error | 240 | (if calc-eval-error |
| @@ -700,10 +700,10 @@ in Calc algebraic input.") | |||
| 700 | (math-read-token)))))) | 700 | (math-read-token)))))) |
| 701 | ((or (and (>= ch ?0) (<= ch ?9)) | 701 | ((or (and (>= ch ?0) (<= ch ?9)) |
| 702 | (and (eq ch '?\.) | 702 | (and (eq ch '?\.) |
| 703 | (eq (string-match "\\.[0-9]" math-exp-str math-exp-pos) | 703 | (eq (string-match "\\.[0-9]" math-exp-str math-exp-pos) |
| 704 | math-exp-pos)) | 704 | math-exp-pos)) |
| 705 | (and (eq ch '?_) | 705 | (and (eq ch '?_) |
| 706 | (eq (string-match "_\\.?[0-9]" math-exp-str math-exp-pos) | 706 | (eq (string-match "_\\.?[0-9]" math-exp-str math-exp-pos) |
| 707 | math-exp-pos) | 707 | math-exp-pos) |
| 708 | (or (eq math-exp-pos 0) | 708 | (or (eq math-exp-pos 0) |
| 709 | (and (memq calc-language '(nil flat big unform | 709 | (and (memq calc-language '(nil flat big unform |
| @@ -713,7 +713,7 @@ in Calc algebraic input.") | |||
| 713 | (1- math-exp-pos)))))) | 713 | (1- math-exp-pos)))))) |
| 714 | (or (and (eq calc-language 'c) | 714 | (or (and (eq calc-language 'c) |
| 715 | (string-match "0[xX][0-9a-fA-F]+" math-exp-str math-exp-pos)) | 715 | (string-match "0[xX][0-9a-fA-F]+" math-exp-str math-exp-pos)) |
| 716 | (string-match "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\(0*\\([2-9]\\|1[0-4]\\)\\(#\\|\\^\\^\\)[0-9a-dA-D.]+[eE][-+_]?[0-9]+\\|0*\\([2-9]\\|[0-2][0-9]\\|3[0-6]\\)\\(#\\|\\^\\^\\)[0-9a-zA-Z:.]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?" | 716 | (string-match "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\(0*\\([2-9]\\|1[0-4]\\)\\(#\\|\\^\\^\\)[0-9a-dA-D.]+[eE][-+_]?[0-9]+\\|0*\\([2-9]\\|[0-2][0-9]\\|3[0-6]\\)\\(#\\|\\^\\^\\)[0-9a-zA-Z:.]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?" |
| 717 | math-exp-str math-exp-pos)) | 717 | math-exp-str math-exp-pos)) |
| 718 | (setq math-exp-token 'number | 718 | (setq math-exp-token 'number |
| 719 | math-expr-data (math-match-substring math-exp-str 0) | 719 | math-expr-data (math-match-substring math-exp-str 0) |
| @@ -751,7 +751,7 @@ in Calc algebraic input.") | |||
| 751 | math-expr-data (math-match-substring math-exp-str 0) | 751 | math-expr-data (math-match-substring math-exp-str 0) |
| 752 | math-exp-pos (match-end 0))) | 752 | math-exp-pos (match-end 0))) |
| 753 | ((and (eq ch ?\") | 753 | ((and (eq ch ?\") |
| 754 | (string-match "\\(\"\\([^\"\\]\\|\\\\.\\)*\\)\\(\"\\|\\'\\)" | 754 | (string-match "\\(\"\\([^\"\\]\\|\\\\.\\)*\\)\\(\"\\|\\'\\)" |
| 755 | math-exp-str math-exp-pos)) | 755 | math-exp-str math-exp-pos)) |
| 756 | (if (eq calc-language 'eqn) | 756 | (if (eq calc-language 'eqn) |
| 757 | (progn | 757 | (progn |
| @@ -765,9 +765,9 @@ in Calc algebraic input.") | |||
| 765 | math-exp-pos (match-end 0)))) | 765 | math-exp-pos (match-end 0)))) |
| 766 | ((and (= ch ?\\) (eq calc-language 'tex) | 766 | ((and (= ch ?\\) (eq calc-language 'tex) |
| 767 | (< math-exp-pos (1- (length math-exp-str)))) | 767 | (< math-exp-pos (1- (length math-exp-str)))) |
| 768 | (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" | 768 | (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" |
| 769 | math-exp-str math-exp-pos) | 769 | math-exp-str math-exp-pos) |
| 770 | (string-match "\\(\\\\\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\)" | 770 | (string-match "\\(\\\\\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\)" |
| 771 | math-exp-str math-exp-pos)) | 771 | math-exp-str math-exp-pos)) |
| 772 | (setq math-exp-token 'symbol | 772 | (setq math-exp-token 'symbol |
| 773 | math-exp-pos (match-end 0) | 773 | math-exp-pos (match-end 0) |
| @@ -791,11 +791,11 @@ in Calc algebraic input.") | |||
| 791 | (aset math-exp-str right ?\]))))))) | 791 | (aset math-exp-str right ?\]))))))) |
| 792 | ((and (= ch ?\\) (eq calc-language 'latex) | 792 | ((and (= ch ?\\) (eq calc-language 'latex) |
| 793 | (< math-exp-pos (1- (length math-exp-str)))) | 793 | (< math-exp-pos (1- (length math-exp-str)))) |
| 794 | (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" | 794 | (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" |
| 795 | math-exp-str math-exp-pos) | 795 | math-exp-str math-exp-pos) |
| 796 | (string-match "\\\\text *{\\([a-zA-Z0-9]+\\)}" | 796 | (string-match "\\\\text *{\\([a-zA-Z0-9]+\\)}" |
| 797 | math-exp-str math-exp-pos) | 797 | math-exp-str math-exp-pos) |
| 798 | (string-match "\\(\\\\\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\)" | 798 | (string-match "\\(\\\\\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\)" |
| 799 | math-exp-str math-exp-pos)) | 799 | math-exp-str math-exp-pos)) |
| 800 | (setq math-exp-token 'symbol | 800 | (setq math-exp-token 'symbol |
| 801 | math-exp-pos (match-end 0) | 801 | math-exp-pos (match-end 0) |
| @@ -821,7 +821,7 @@ in Calc algebraic input.") | |||
| 821 | (string= envname "pmatrix")) | 821 | (string= envname "pmatrix")) |
| 822 | (if (string-match (concat "\\\\end{" envname "}") | 822 | (if (string-match (concat "\\\\end{" envname "}") |
| 823 | math-exp-str math-exp-pos) | 823 | math-exp-str math-exp-pos) |
| 824 | (setq math-exp-str | 824 | (setq math-exp-str |
| 825 | (replace-match "]" t t math-exp-str)) | 825 | (replace-match "]" t t math-exp-str)) |
| 826 | (error "%s" (concat "No closing \\end{" envname "}")))))) | 826 | (error "%s" (concat "No closing \\end{" envname "}")))))) |
| 827 | ((and (eq (nth 1 code) 'mat) | 827 | ((and (eq (nth 1 code) 'mat) |
| @@ -852,7 +852,7 @@ in Calc algebraic input.") | |||
| 852 | (setq math-exp-token 'punc | 852 | (setq math-exp-token 'punc |
| 853 | math-expr-data (math-match-substring math-exp-str 0) | 853 | math-expr-data (math-match-substring math-exp-str 0) |
| 854 | math-exp-pos (match-end 0)) | 854 | math-exp-pos (match-end 0)) |
| 855 | (and (eq (string-match "\\\\dots\\." math-exp-str math-exp-pos) | 855 | (and (eq (string-match "\\\\dots\\." math-exp-str math-exp-pos) |
| 856 | math-exp-pos) | 856 | math-exp-pos) |
| 857 | (setq math-exp-pos (match-end 0))) | 857 | (setq math-exp-pos (match-end 0))) |
| 858 | (if (memq (aref math-expr-data 0) '(?~ ?^)) | 858 | (if (memq (aref math-expr-data 0) '(?~ ?^)) |