Fix bug with tab handling.

Commit 5804a9a introduced a bug where having the foldtabs option disabled (normal) prevented optimizations of functions. Fix it for good (hopefully). While on it, rename the nofoldtabs option to warntabs, making it default, and use it to disable a warning when there are tabs in a string.
This commit is contained in:
Sei Lisa 2016-05-07 03:18:50 +02:00
parent 95bd3209be
commit b7e6e6f7b1
4 changed files with 23 additions and 18 deletions

View file

@ -281,8 +281,9 @@ Optimizer options (+ means active by default, - means inactive by default):
expansion of functions that produce strings with tabs.
The resulting source isn't guaranteed to be
copy-paste-able to the viewer.
nofoldtabs - Suppress warning when a function can't be optimized
because it generates a string or list with a tab.
warntabs + Suppress warning when a function can't be optimized
because it generates a string or list with a tab, or
when a string contains a tab.
skippreproc + Skip preprocessor directives in the source as if they
were comments. Not useful unless the script is itself
the output of a preprocessor like GNU cpp, which inserts
@ -303,7 +304,7 @@ def main():
# Default options
options = set(('extendedglobalexpr','extendedtypecast','extendedassignment',
'allowkeyconcat','allowmultistrings','skippreproc','optimize',
'allowkeyconcat','allowmultistrings','skippreproc','warntabs','optimize',
'optsigns','optfloats','constfold','dcr','errmissingdefault',
))