[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calc-aent.el
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calc-aent.el |
Date: |
Mon, 31 Jan 2005 16:51:34 -0500 |
Index: emacs/lisp/calc/calc-aent.el
diff -c emacs/lisp/calc/calc-aent.el:1.23 emacs/lisp/calc/calc-aent.el:1.24
*** emacs/lisp/calc/calc-aent.el:1.23 Mon Jan 31 09:16:44 2005
--- emacs/lisp/calc/calc-aent.el Mon Jan 31 21:51:34 2005
***************
*** 746,752 ****
(setq math-exp-token 'string
math-expr-data (math-match-substring math-exp-str 1)
math-exp-pos (match-end 0))))
! ((and (= ch ?\\) (memq calc-language '(tex latex))
(< math-exp-pos (1- (length math-exp-str))))
(or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}"
math-exp-str math-exp-pos)
--- 746,752 ----
(setq math-exp-token 'string
math-expr-data (math-match-substring math-exp-str 1)
math-exp-pos (match-end 0))))
! ((and (= ch ?\\) (eq calc-language 'tex)
(< math-exp-pos (1- (length math-exp-str))))
(or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}"
math-exp-str math-exp-pos)
***************
*** 756,761 ****
--- 756,789 ----
math-exp-pos (match-end 0)
math-expr-data (math-restore-dashes
(math-match-substring math-exp-str 1)))
+ (let ((code (assoc math-expr-data math-latex-ignore-words)))
+ (cond ((null code))
+ ((null (cdr code))
+ (math-read-token))
+ ((eq (nth 1 code) 'punc)
+ (setq math-exp-token 'punc
+ math-expr-data (nth 2 code)))
+ ((and (eq (nth 1 code) 'mat)
+ (string-match " *{" math-exp-str math-exp-pos))
+ (setq math-exp-pos (match-end 0)
+ math-exp-token 'punc
+ math-expr-data "[")
+ (let ((right (string-match "}" math-exp-str
math-exp-pos)))
+ (and right
+ (setq math-exp-str (copy-sequence math-exp-str))
+ (aset math-exp-str right ?\])))))))
+ ((and (= ch ?\\) (eq calc-language 'latex)
+ (< math-exp-pos (1- (length math-exp-str))))
+ (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}"
+ math-exp-str math-exp-pos)
+ (string-match "\\\\text *{\\([a-zA-Z0-9]+\\)}"
+ math-exp-str math-exp-pos)
+ (string-match "\\(\\\\\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\)"
+ math-exp-str math-exp-pos))
+ (setq math-exp-token 'symbol
+ math-exp-pos (match-end 0)
+ math-expr-data (math-restore-dashes
+ (math-match-substring math-exp-str 1)))
(let ((code (assoc math-expr-data math-tex-ignore-words)))
(cond ((null code))
((null (cdr code))