indent_line(zerolevel : int, bracket_list : list, line : str, in_comment : bool,
                    in_symbol_region : bool, options : string|list)

    Most important function in the indentation process. It uses the bracket
    locations stored in the list to indent the line.

def indent_line(zerolevel, bracket_list, line, in_comment, in_symbol_region,
                options=None):
    """ indent_line(zerolevel : int, bracket_list : list, line : str, in_comment : bool,
                    in_symbol_region : bool, options : string|list)

    Most important function in the indentation process. It uses the bracket
    locations stored in the list to indent the line.
    """
    opts = parse_options(options)
    comment_line = re.search('^[ \t]*;', line, re.M)
    if opts.indent_comments:
        # We are allowed to indent comment lines
        comment_line = False
    if not opts.compact and bracket_list == [] and not in_comment:
        # If nocompact mode is on and there are no unclosed blocks, try to
        # find the zero level by simply counting spaces before a line that
        # is not empty or has a comment
        _line = detabify(line, opts)
        leading_spaces = re.search('^[ \t]+[^; )\n\r]', _line)
        if leading_spaces:
            # NOTE: If you don't subtract one here, the zero level will increase
            # every time you indent the file because the character at the end of
            # the regex is part of the capture.
            zerolevel = leading_spaces.end() - 1
        else:
            zerolevel = 0

    if in_symbol_region:
        # No processing done in strings and comments
        return zerolevel, line, 0
    elif not comment_line and not all_whitespace(line):
        # If this is not a comment line indent the line.
        # If the list is empty, then the current_level defaults
        # to zero
        curr_line, current_level = pad_leading_whitespace(line, zerolevel,
                                                          bracket_list, opts)
        return zerolevel, curr_line, current_level
    else:
        return zerolevel, line, 0