On Fri, 12 Dec 2003, Andre Poenitz wrote: > On Fri, Dec 12, 2003 at 03:06:12PM +0100, Christian Ridderström wrote: > > This is about a _minor_ problem, for now I'm really only planning to > > "bugzilla and forget" about it. > > > > However, if you already are in math-mode, you accidentally insert a > > \textrm{} into the mathInset which in IMO is a bug. > > > > One solution is to replace the command 'math-mode' with > > something like 'ensure-math-mode'? Is there such an LFUN? > > > > Which makes me think.... why is it that 'math-mode' in a math-inset > > actually inserts a \textrm{}? > > Shouldn't the LFUN be named something like 'math-mode-toggle' then? > > This LFUN 'overload' is a mess and I would not mind removing it at once. > Last time I tried I got heavy flak, though...
yes... it does seem to be a mess with the LFUN, and it makes me wonder what the purpose of the LFUNs really is, but I'll raise that question in a different thread I think. Some long-term solutions I can think of include: * Modify behaviour of math-mode and math-display, i.e. let them take an argument specifying if this is 'ensure-math-mode' or 'toggle-math-mode' * Create 'ensure-math-mode' and 'ensure-math-display' * If (when) key-bindings and menu-actions are mode sensistive, I guess different command sequences can be used. * If/when we get some kind of scripting language, the command-sequences could check what the mode is and behave differently. anyway, I've filed this as a minor bug, so this problem shouldn't be forgotten at least. /Christian -- Christian Ridderström http://www.md.kth.se/~chr