comparison lisp/calc/calc-prog.el @ 59983:d3632c99711e

(calc-write-parse-table-part, calc-fix-token-name): Fix a check for language type.
author Jay Belanger <jay.p.belanger@gmail.com>
date Tue, 08 Feb 2005 05:03:07 +0000
parents fb44bc67721e
children 259cc4e04cd1 3ebd9bdb4fe5
comparison
equal deleted inserted replaced
59982:107c288df93f 59983:d3632c99711e
518 (defun calc-write-parse-table-part (p) 518 (defun calc-write-parse-table-part (p)
519 (while p 519 (while p
520 (cond ((stringp (car p)) 520 (cond ((stringp (car p))
521 (let ((s (car p))) 521 (let ((s (car p)))
522 (if (and (string-match "\\`\\\\dots\\>" s) 522 (if (and (string-match "\\`\\\\dots\\>" s)
523 (not (eq calc-lang '(tex latex)))) 523 (not (memq calc-lang '(tex latex))))
524 (setq s (concat ".." (substring s 5)))) 524 (setq s (concat ".." (substring s 5))))
525 (if (or (and (string-match 525 (if (or (and (string-match
526 "[a-zA-Z0-9\"{}]\\|\\`:=\\'\\|\\`#\\|\\`%%" s) 526 "[a-zA-Z0-9\"{}]\\|\\`:=\\'\\|\\`#\\|\\`%%" s)
527 (string-match "[^a-zA-Z0-9\\]" s)) 527 (string-match "[^a-zA-Z0-9\\]" s))
528 (and (assoc s '((")") ("]") (">"))) 528 (and (assoc s '((")") ("]") (">")))
585 (concat "\\dots" (substring name 2))) 585 (concat "\\dots" (substring name 2)))
586 ((and (equal name "{") (memq calc-lang '(tex latex eqn))) 586 ((and (equal name "{") (memq calc-lang '(tex latex eqn)))
587 "(") 587 "(")
588 ((and (equal name "}") (memq calc-lang '(tex latex eqn))) 588 ((and (equal name "}") (memq calc-lang '(tex latex eqn)))
589 ")") 589 ")")
590 ((and (equal name "&") (eq calc-lang '(tex latex))) 590 ((and (equal name "&") (memq calc-lang '(tex latex)))
591 ",") 591 ",")
592 ((equal name "#") 592 ((equal name "#")
593 (search-backward "#") 593 (search-backward "#")
594 (error "Token '#' is reserved")) 594 (error "Token '#' is reserved"))
595 ((and unquoted (string-match "#" name)) 595 ((and unquoted (string-match "#" name))