Mercurial > emacs
changeset 86165:8d7e01d03e55
(calc-last-user-lang-parse-table): New variable.
(math-build-parse-table): Get parse information from `math-parse-table'.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Fri, 16 Nov 2007 23:46:01 +0000 |
parents | e509314f0d59 |
children | e40850c13975 |
files | lisp/calc/calc-aent.el |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calc/calc-aent.el Fri Nov 16 21:58:46 2007 +0000 +++ b/lisp/calc/calc-aent.el Fri Nov 16 23:46:01 2007 +0000 @@ -603,6 +603,7 @@ (defvar calc-user-parse-table nil) (defvar calc-last-main-parse-table nil) +(defvar calc-last-user-lang-parse-table nil) (defvar calc-last-lang-parse-table nil) (defvar calc-user-tokens nil) (defvar calc-user-token-chars nil) @@ -612,10 +613,12 @@ (defun math-build-parse-table () (let ((mtab (cdr (assq nil calc-user-parse-tables))) - (ltab (cdr (assq calc-language calc-user-parse-tables)))) + (ltab (cdr (assq calc-language calc-user-parse-tables))) + (lltab (get calc-language 'math-parse-table))) (or (and (eq mtab calc-last-main-parse-table) - (eq ltab calc-last-lang-parse-table)) - (let ((p (append mtab ltab)) + (eq ltab calc-last-user-lang-parse-table) + (eq lltab calc-last-lang-parse-table)) + (let ((p (append mtab ltab lltab)) (math-toks nil)) (setq calc-user-parse-table p) (setq calc-user-token-chars nil) @@ -629,7 +632,8 @@ (length y))))) "\\|") calc-last-main-parse-table mtab - calc-last-lang-parse-table ltab))))) + calc-last-user-lang-parse-table ltab + calc-last-lang-parse-table lltab))))) (defun math-find-user-tokens (p) (while p