mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Further simplification
This commit is contained in:
parent
27f15ac930
commit
6d6eda3950
@ -572,7 +572,7 @@ def insert_document_option(document, option):
|
||||
return
|
||||
|
||||
# add it to the end of the options
|
||||
document.header[options_line] += " ,%s" % option
|
||||
document.header[options_line] += ",%s" % option
|
||||
|
||||
|
||||
def remove_document_option(document, option):
|
||||
@ -746,13 +746,7 @@ def revert_language(document, lyxname, babelname, polyglossianame):
|
||||
|
||||
# With babel, we need to add the language options
|
||||
if with_babel and (primary or secondary):
|
||||
k = find_token(document.header, "\\options")
|
||||
if k != -1:
|
||||
opts = get_value(document.header, "\\options", i)
|
||||
document.header[k] = "\\options %s,%s" % (opts, babelname)
|
||||
else:
|
||||
l = find_token(document.header, "\\use_default_options")
|
||||
document.header.insert(l + 1, "\\options %s" % babelname)
|
||||
insert_document_option(document, babelname)
|
||||
if secondary:
|
||||
# Since the user options are always placed after the babel options,
|
||||
# we need to reset the main language
|
||||
|
Loading…
Reference in New Issue
Block a user