Jean-Marc Lasgouttes wrote:
Mael Hilléreau <[EMAIL PROTECTED]> writes:
No, in fact it wasn't the case with LyX-Code. I updated the patch so that
LyX-Code paragraphs are no more spellchecked (see attached).
I have to say that I do not like that at all: we should never hardcode
layout names.
Agreed. But how *should* this kind of thing be done?
Regarding the rest of the patch --- I think it's good, Mael. I haven't
tested it yet, but the code looks good and the approach seems to be a
sound one IMO.
I think we should first decide what we want to do with the LaTeX
language. If we keep it in some form (or call it nolanguage), then
there is not real need for complicated stuff.
I don't think that using the language is an option: for example, if this
text that I don't want spell-checked is in Hebrew (within a Hebrew
document), I can't change it's language to something else just in order
to avoid spell-checking: that'll mess up the bidi algorithm, not to
mention the latex output (say, if it's a branch, which is sometimes
output and sometimes not). We must have something besides the language
which specifies the spell-checking status --- or general rules, such as
Mael implemented here.
After seeing this patch, I'm starting to think that Mael's idea of a
non-spell-checked inset is actually pretty good (in addition to this
patch). Just adding this new type on inset, which of course will not be
spell-checked, regardless of the onlyOutput flag, (and which should have
no visible effect at all on the output) would solve the problem of
being able to choose arbitrary text to be ignored during spell-checking.
I don't think this is necessary to have, but it would be nice, and
probably not that hard to implement.
On the other hand, I like the idea of not spellchecking stuff that is
not output (although your test in note inset is very weird).
Looks OK to me...?
JMarc
Dov