Guenter Milde wrote: > > 2. its not bound to enter, but to LFUN_BREAK_PARAGRAPH. > > it can be argued that math-extern should be put rather into bind > > file to "command-alternatives break-paragraph;math-extern" > > (getstatus changes of break-paragraph in mathed would be needed then). > > i think its overengineering, since enter key is not going to change > > its binding, but can go this route as well if wanted. > > The "overengineering" approach is IMV the better one: the user has a > choice to configure/disable the binding. Also, math-extern could be bound > to other keys via a "swapped" command-alternatives rule: > "command-alternatives math-extern; <text-command>" (if it is math-mode > only).
i have been warned about introducing this, so i won't ;) the only thing which i'm going to fix is that we do not disable status flag of break-paragraph in getStatus of math, thus the command-alternatives break-paragraph; math-extern maxima could not work. now any user can at least bind it to enter if he wants. pavel
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 04c5b82..374e81b 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -1479,6 +1479,11 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd, status.setEnabled(true); return true; + // we never allow this in math, and we want to bind enter + // to another actions in command-alternatives + case LFUN_BREAK_PARAGRAPH: + status.setEnabled(false); + return true; case LFUN_MATH_MUTATE: { HullType const ht = hullType(cmd.argument()); status.setOnOff(type_ == ht);