On Mon, Jul 30, 2001 at 09:38:56AM +0200, Juergen Vigna wrote:
>

Let's look at the two reason why you added the language_inherit

1) Consistency with other font properties
2) Previously, a special code was needed to set the language when creating
   an empty insettext. So the change simplifies the code

I don't care about argument one. If you want a cleaner code than move the
language (and also the emph field) out of LyXfont.

As for the second argument, I don't think that language_inherit simplifies
the code. Here is why:

First, I don't know how you want to interpret language_inherit.

Option a: If a text has language_inherit language then its language is the
document language.

Option b: If a text in insettext has language_inherit language, then its
language is according to the language in the position of the inset in 
the paragraph above.

If you use option-a, then you the use of language_inherit doesn't solve the
problem of item 2 above: suppose that you want to create a tabular in a
French paragraph in an English document. Then, when you enter an empty cell,
you need to set the language to French!

Now, suppose that you use option-b.
The problem now is that you have a much more complicated copy&paste code
(actually, this happen also with option-a).
Suppose that I have a tabular (in French) in a French paragraph in an
English document. The text in the tabular has language_inherit language.
Now if you copy some text from a cell, and paste it into an English
paragraph, you need to change the language of the copied text to French!

So the language_inherit saves you ~3 lines in the code, but adds >10 lines
to the code of copy&paste. This doesn't really simplifies the code!

Reply via email to