diff options
| author | Jay Belanger | 2005-01-31 06:28:06 +0000 |
|---|---|---|
| committer | Jay Belanger | 2005-01-31 06:28:06 +0000 |
| commit | dd9041c77a7a6c325df620d38f773215d3921343 (patch) | |
| tree | deada4bc58fd4a1d80c2d3e283dc08535ed243fc | |
| parent | 2d3ce3f29290628c20bf36db7b87c9a908ac16c9 (diff) | |
| download | emacs-dd9041c77a7a6c325df620d38f773215d3921343.tar.gz emacs-dd9041c77a7a6c325df620d38f773215d3921343.zip | |
(calc-edit-user-syntax, calc-fix-token-name)
(calc-write-parse-table-part): Add LaTeX support.
| -rw-r--r-- | lisp/calc/calc-prog.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index a37f3c5cedd..d5d9123d04d 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el | |||
| @@ -477,6 +477,7 @@ | |||
| 477 | (format "Editing %s-Mode Syntax Table. " | 477 | (format "Editing %s-Mode Syntax Table. " |
| 478 | (cond ((null lang) "Normal") | 478 | (cond ((null lang) "Normal") |
| 479 | ((eq lang 'tex) "TeX") | 479 | ((eq lang 'tex) "TeX") |
| 480 | ((eq lang 'latex) "LaTeX") | ||
| 480 | (t (capitalize (symbol-name lang)))))) | 481 | (t (capitalize (symbol-name lang)))))) |
| 481 | (calc-write-parse-table (cdr (assq lang calc-user-parse-tables)) | 482 | (calc-write-parse-table (cdr (assq lang calc-user-parse-tables)) |
| 482 | lang))) | 483 | lang))) |
| @@ -519,7 +520,7 @@ | |||
| 519 | (cond ((stringp (car p)) | 520 | (cond ((stringp (car p)) |
| 520 | (let ((s (car p))) | 521 | (let ((s (car p))) |
| 521 | (if (and (string-match "\\`\\\\dots\\>" s) | 522 | (if (and (string-match "\\`\\\\dots\\>" s) |
| 522 | (not (eq calc-lang 'tex))) | 523 | (not (eq calc-lang '(tex latex)))) |
| 523 | (setq s (concat ".." (substring s 5)))) | 524 | (setq s (concat ".." (substring s 5)))) |
| 524 | (if (or (and (string-match | 525 | (if (or (and (string-match |
| 525 | "[a-zA-Z0-9\"{}]\\|\\`:=\\'\\|\\`#\\|\\`%%" s) | 526 | "[a-zA-Z0-9\"{}]\\|\\`:=\\'\\|\\`#\\|\\`%%" s) |
| @@ -582,11 +583,11 @@ | |||
| 582 | (defun calc-fix-token-name (name &optional unquoted) | 583 | (defun calc-fix-token-name (name &optional unquoted) |
| 583 | (cond ((string-match "\\`\\.\\." name) | 584 | (cond ((string-match "\\`\\.\\." name) |
| 584 | (concat "\\dots" (substring name 2))) | 585 | (concat "\\dots" (substring name 2))) |
| 585 | ((and (equal name "{") (memq calc-lang '(tex eqn))) | 586 | ((and (equal name "{") (memq calc-lang '(tex latex eqn))) |
| 586 | "(") | 587 | "(") |
| 587 | ((and (equal name "}") (memq calc-lang '(tex eqn))) | 588 | ((and (equal name "}") (memq calc-lang '(tex latex eqn))) |
| 588 | ")") | 589 | ")") |
| 589 | ((and (equal name "&") (eq calc-lang 'tex)) | 590 | ((and (equal name "&") (eq calc-lang '(tex latex))) |
| 590 | ",") | 591 | ",") |
| 591 | ((equal name "#") | 592 | ((equal name "#") |
| 592 | (search-backward "#") | 593 | (search-backward "#") |