summaryrefslogtreecommitdiff
path: root/lisp/calc
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2005-01-31 06:28:06 +0000
committerJay Belanger <jay.p.belanger@gmail.com>2005-01-31 06:28:06 +0000
commitdd9041c77a7a6c325df620d38f773215d3921343 (patch)
treedeada4bc58fd4a1d80c2d3e283dc08535ed243fc /lisp/calc
parent2d3ce3f29290628c20bf36db7b87c9a908ac16c9 (diff)
downloademacs-dd9041c77a7a6c325df620d38f773215d3921343.tar.gz
(calc-edit-user-syntax, calc-fix-token-name)
(calc-write-parse-table-part): Add LaTeX support.
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/calc-prog.el9
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 @@
(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 "#")