There's been a complaint about \alpha etc being more difficult to enter
in plain text nowadways. The attached patch should get us on par with
pre-1.4.0.
Andre'
Index: LyXAction.C
===================================================================
--- LyXAction.C (revision 17939)
+++ LyXAction.C (working copy)
@@ -180,6 +180,7 @@
{ LFUN_FONT_STATE, "font-state", ReadOnly },
{ LFUN_FONT_UNDERLINE, "font-underline", Noop },
{ LFUN_FOOTNOTE_INSERT, "footnote-insert", Noop },
+ { LFUN_GREEK_INSERT, "greek-insert", Noop },
{ LFUN_HFILL_INSERT, "hfill-insert", Noop },
{ LFUN_HELP_OPEN, "help-open", NoBuffer | Argument},
{ LFUN_HTML_INSERT, "html-insert", Noop },
Index: mathed/InsetMathNest.C
===================================================================
--- mathed/InsetMathNest.C (revision 17939)
+++ mathed/InsetMathNest.C (working copy)
@@ -954,6 +954,7 @@
// FIXME: We probably should swap parts of "math-insert" and "self-insert"
// handling such that "self-insert" works on "arbitrary stuff" too, and
// math-insert only handles special math things like "matrix".
+ case LFUN_GREEK_INSERT:
case LFUN_MATH_INSERT: {
recordUndo(cur, Undo::ATOMIC);
if (cmd.argument() == "^" || cmd.argument() == "_") {
@@ -1052,6 +1053,7 @@
flag.enabled(currentMode() != TEXT_MODE);
break;
+ case LFUN_GREEK_INSERT:
case LFUN_MATH_INSERT: {
bool const textarg =
arg == "\\textbf" || arg == "\\textsf" ||
Index: text3.C
===================================================================
--- text3.C (revision 17939)
+++ text3.C (working copy)
@@ -1329,6 +1329,13 @@
mathDispatch(cur, FuncRequest(LFUN_SELF_INSERT, "^"), false);
break;
+ case LFUN_GREEK_INSERT: {
+ cur.insert(new InsetMathHull(hullSimple));
+ cur.dispatch(FuncRequest(LFUN_CHAR_FORWARD));
+ cur.dispatch(FuncRequest(LFUN_CHAR_FORWARD));
+ cur.dispatch(cmd);
+ break;
+ }
case LFUN_MATH_INSERT:
case LFUN_MATH_MATRIX:
case LFUN_MATH_DELIM:
@@ -1934,7 +1941,7 @@
case LFUN_CLEARDOUBLEPAGE_INSERT:
case LFUN_MATH_DISPLAY:
case LFUN_MATH_IMPORT_SELECTION:
- case LFUN_MATH_INSERT:
+ case LFUN_GREEK_INSERT:
case LFUN_MATH_MODE:
case LFUN_MATH_MACRO:
case LFUN_MATH_MATRIX:
Index: lfuns.h
===================================================================
--- lfuns.h (revision 17939)
+++ lfuns.h (working copy)
@@ -375,11 +375,12 @@
// 285
LFUN_BOOKMARK_CLEAR, // bpeng 20061031
LFUN_TOOLBAR_TOGGLE_STATE, // bpeng 20061101
- LFUN_NOMENCL_INSERT, // Ugras
- LFUN_NOMENCL_PRINT, // Ugras
+ LFUN_NOMENCL_INSERT, // Ugras
+ LFUN_NOMENCL_PRINT, // Ugras
LFUN_CLEARPAGE_INSERT, // Ugras 20061125
//290
- LFUN_CLEARDOUBLEPAGE_INSERT, // ugras 20061125
+ LFUN_CLEARDOUBLEPAGE_INSERT, // Ugras 20061125
+ LFUN_GREEK_INSERT, // Andr� 20070402
LFUN_LASTACTION // end of the table
};