]> git.lyx.org Git - features.git/commitdiff
remove the hard-coded greek stuff, it is handled in math.bind nowadays
authorAndré Pönitz <poenitz@gmx.net>
Tue, 23 Oct 2001 08:14:52 +0000 (08:14 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 23 Oct 2001 08:14:52 +0000 (08:14 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2912 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/formulabase.C
src/mathed/math_cursor.C

index 954e0374e0266acb0e30bc0062c72d6d4698fda6..f683cf88c5a1f003dbfa235e6c168674a36d102c 100644 (file)
@@ -488,7 +488,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
        case LFUN_GREEK: 
                handleFont(bv, LM_TC_GREEK1);
                if (arg.size())
-                       mathcursor->interpret(arg[0]);
+                       mathcursor->interpret(arg);
                break;
 
        case LFUN_MATH_MODE:
index 0fe0ef1dd6426c9bcc24906b1dd3d561452f5320..c4027c2a309eaee28d9d4e0a88dddec573a58960 100644 (file)
@@ -1377,31 +1377,14 @@ void MathCursor::interpret(char c)
                return;
        }
 
-       if (isalpha(c) && (lastcode_ == LM_TC_GREEK || lastcode_ == LM_TC_GREEK1)) {
-               static char const greekl[][26] =
-                       {"alpha", "beta", "chi", "delta", "epsilon", "phi",
-                        "gamma", "eta", "iota", "epsilon", "kappa", "lambda", "mu",
-                        "nu", "omega", "pi", "vartheta", "rho", "sigma",
-                        "tau", "upsilon", "theta", "omega", "xi", "varphi", "zeta"};
-               static char const greeku[][26] =
-                       {"alpha", "beta", "chi", "Delta", "varepsilon", "Phi",
-                        "Gamma", "varepsilon", "varepsilon", "epsilon", "kappa", "Lambda", "mu",
-                        "Nu", "Omega", "Pi", "vartheta", "varrho", "Sigma", "varsigma",
-                        "Upsilon", "Theta", "Omega", "Xi", "Varphi", "zeta"};
-       
-               latexkeys const * l = 0;        
-               if ('a' <= c && c <= 'z')
-                       l = in_word_set(greekl[c - 'a']);
-               if ('A' <= c && c <= 'Z')
-                       l = in_word_set(greeku[c - 'A']);
-       
-               if (l)
-                       insert(createMathInset(l));
-               else
-                       insert(c, LM_TC_VAR);
+       if (isalpha(c) && lastcode_ == LM_TC_GREEK) {
+               insert(c, LM_TC_VAR);
+               return; 
+       }
 
-               if (lastcode_ == LM_TC_GREEK1)
-                       lastcode_ = LM_TC_VAR;
+       if (isalpha(c) && lastcode_ == LM_TC_GREEK1) {
+               insert(c, LM_TC_VAR);
+               lastcode_ = LM_TC_VAR;
                return; 
        }