Le 29/04/2012 14:13, Vincent van Ravesteijn a écrit :
I think it is a bug. I would vote for disabling the LFUN when the
languages are the same. This will make it possible for the reporter to
define: "command-alternatives language hebrew; language english" to toggle.

I especially object to introduce a difference in behaviour based on the
fact whether there is a selection or not. I would not expect something
different to happen.

I think these lfuns have two faces: interactive and API.
* as an API, I would expect to be able to set language to "french" and not care about what the language was before that * as an interactive function, toggling between the given value and the default is very desirable and fits what is done by other font-changing functions.

We probably need to offer the two possibilities, either by
* two sets of lfuns language/language-set, font-emph/font-emph-set
* an optional argument "set"
* a prefix command "notoggle" ("notoggle language french")

Of course, a way that preserves the preexisting semantics of lfuns would be best.

Similarly, having the possibility to have "layout" toggle between the given layout and standard layout could be useful for toolbars.

JMarc

Reply via email to