# HG changeset patch # User Jay Belanger # Date 1107152886 0 # Node ID fb44bc67721e71f7ad6d89002500996b256f3e54 # Parent 9e28f5bc25bb13a328db157e1f3e5afc5996eb09 (calc-edit-user-syntax, calc-fix-token-name) (calc-write-parse-table-part): Add LaTeX support. diff -r 9e28f5bc25bb -r fb44bc67721e lisp/calc/calc-prog.el --- a/lisp/calc/calc-prog.el Mon Jan 31 06:25:17 2005 +0000 +++ b/lisp/calc/calc-prog.el Mon Jan 31 06:28:06 2005 +0000 @@ -477,6 +477,7 @@ (format "Editing %s-Mode Syntax Table. " (cond ((null lang) "Normal") ((eq lang 'tex) "TeX") + ((eq lang 'latex) "LaTeX") (t (capitalize (symbol-name lang)))))) (calc-write-parse-table (cdr (assq lang calc-user-parse-tables)) lang))) @@ -519,7 +520,7 @@ (cond ((stringp (car p)) (let ((s (car p))) (if (and (string-match "\\`\\\\dots\\>" s) - (not (eq calc-lang 'tex))) + (not (eq calc-lang '(tex latex)))) (setq s (concat ".." (substring s 5)))) (if (or (and (string-match "[a-zA-Z0-9\"{}]\\|\\`:=\\'\\|\\`#\\|\\`%%" s) @@ -582,11 +583,11 @@ (defun calc-fix-token-name (name &optional unquoted) (cond ((string-match "\\`\\.\\." name) (concat "\\dots" (substring name 2))) - ((and (equal name "{") (memq calc-lang '(tex eqn))) + ((and (equal name "{") (memq calc-lang '(tex latex eqn))) "(") - ((and (equal name "}") (memq calc-lang '(tex eqn))) + ((and (equal name "}") (memq calc-lang '(tex latex eqn))) ")") - ((and (equal name "&") (eq calc-lang 'tex)) + ((and (equal name "&") (eq calc-lang '(tex latex))) ",") ((equal name "#") (search-backward "#")