From 36fc101a20b53a076957d80ce973c44a928bfe4d Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 4 Oct 2000 14:50:29 +0000 Subject: [PATCH] Fix handling of @ in math formulas git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/lyx-1_1_5@1083 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 6 ++++++ src/mathed/formula.C | 2 +- src/mathed/math_parser.C | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 85efa6ceaa..51523496c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2000-10-04 Jean-Marc Lasgouttes + * src/mathed/math_parser.C (LexInitCodes): set lexcode of "@" to + LexAlpha. + + * src/mathed/formula.C (LocalDispatch): add '@' as an LM_TC_VAR + character. + * src/lyxlex.C (GetFloat): rewrite to use strToDbl() and understand ',' instead of '.'. (GetInteger): rewrite to use strToInt(). diff --git a/src/mathed/formula.C b/src/mathed/formula.C index 474a8b4372..bdf8d6cbcc 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -1165,7 +1165,7 @@ InsetFormula::LocalDispatch(BufferView * bv, result = FINISHED; } } else - if (c == '\'') { + if (c == '\'' || c == '@') { mathcursor->Insert (c, LM_TC_VAR); } else if (c == '\\') { diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 2c8c7053cf..6d20541c54 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -128,7 +128,7 @@ void LexInitCodes() lexcode['!'] = lexcode[','] = lexcode[':'] = lexcode[';'] = LexMathSpace; lexcode['('] = lexcode[')'] = lexcode['|'] = lexcode['.'] = lexcode['?'] = LexOther; - lexcode['\'']= LexAlpha; + lexcode['\'']= lexcode['@'] = LexAlpha; lexcode['['] = lexcode[']'] = lexcode['^'] = lexcode['_'] = lexcode['&'] = LexSelf;