From 50a29760941c7f908c343150777f4fdfb9a92ffb Mon Sep 17 00:00:00 2001 From: Piotr Pawel Stefaniak Date: Sun, 3 Jun 2018 21:34:29 +0000 Subject: [PATCH] indent(1): revert introduction of -lpl That was committed with the wrong message. Will be re-added. --- usr.bin/indent/args.c | 2 -- usr.bin/indent/indent.1 | 18 +----------------- usr.bin/indent/indent.c | 1 - usr.bin/indent/indent_globs.h | 2 -- usr.bin/indent/io.c | 2 -- 5 files changed, 1 insertion(+), 24 deletions(-) diff --git a/usr.bin/indent/args.c b/usr.bin/indent/args.c index 62cb3b620089..3f2ba567642e 100644 --- a/usr.bin/indent/args.c +++ b/usr.bin/indent/args.c @@ -125,7 +125,6 @@ struct pro { {"i", PRO_INT, 8, 0, &ps.ind_size}, {"lc", PRO_INT, 0, 0, &block_comment_max_col}, {"ldi", PRO_INT, -1, 0, &ps.local_decl_indent}, - {"lpl", PRO_BOOL, false, ON, &lineup_to_parens_always}, {"lp", PRO_BOOL, true, ON, &lineup_to_parens}, {"l", PRO_INT, 78, 0, &max_col}, {"nbacc", PRO_BOOL, false, OFF, &blanklines_around_conditional_compilation}, @@ -144,7 +143,6 @@ struct pro { {"nfc1", PRO_BOOL, true, OFF, &format_col1_comments}, {"nfcb", PRO_BOOL, true, OFF, &format_block_comments}, {"nip", PRO_BOOL, true, OFF, &ps.indent_parameters}, - {"nlpl", PRO_BOOL, false, OFF, &lineup_to_parens_always}, {"nlp", PRO_BOOL, true, OFF, &lineup_to_parens}, {"npcs", PRO_BOOL, false, OFF, &proc_calls_space}, {"npro", PRO_SPECIAL, 0, IGN, 0}, diff --git a/usr.bin/indent/indent.1 b/usr.bin/indent/indent.1 index 85c28dfb946e..f18923665246 100644 --- a/usr.bin/indent/indent.1 +++ b/usr.bin/indent/indent.1 @@ -73,7 +73,6 @@ .Op Fl \&lc Ns Ar n .Op Fl \&ldi Ns Ar n .Op Fl \&lp | Fl nlp -.Op Fl \&lpl | Fl nlpl .Op Fl npro .Op Fl P Ns Ar file .Op Fl pcs | Fl npcs @@ -356,9 +355,7 @@ The default is for local variable names to be indented by the same amount as global ones. .It Fl \&lp , nlp Lines up code surrounded by parentheses in continuation lines. -With -.Fl \&lp , -if a line +If a line has a left paren which is not closed on that line, then continuation lines will be lined up to start at the character position just after the left paren. @@ -385,19 +382,6 @@ p1\ =\ first_procedure(second_procedure(p2, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ third_procedure(p4, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ p5)); .Ed -.It Fl \&lpl , nlpl -With -.Fl \&lpl , -code surrounded by parentheses in continuation lines is lined up even if it -would extend past the right margin. -With -.Fl \&nlpl -(the default), such a line that would extend past the right margin is moved -left to keep it within the margin, if that does not require placing it to -the left of the prevailing indentation level. -These switches have no effect if -.Fl nlp -is selected. .It Fl npro Causes the profile files, .Sq Pa ./.indent.pro diff --git a/usr.bin/indent/indent.c b/usr.bin/indent/indent.c index 98e2489c2adf..77638326e496 100644 --- a/usr.bin/indent/indent.c +++ b/usr.bin/indent/indent.c @@ -174,7 +174,6 @@ main(int argc, char **argv) #ifdef undef max_col = 78; /* -l78 */ lineup_to_parens = 1; /* -lp */ - lineup_to_parens_always = 0; /* -nlpl */ ps.ljust_decl = 0; /* -ndj */ ps.com_ind = 33; /* -c33 */ star_comment_cont = 1; /* -sc */ diff --git a/usr.bin/indent/indent_globs.h b/usr.bin/indent/indent_globs.h index 5ea00f098db7..1cff30939859 100644 --- a/usr.bin/indent/indent_globs.h +++ b/usr.bin/indent/indent_globs.h @@ -186,8 +186,6 @@ int continuation_indent;/* set to the indentation between the edge of * code and continuation lines */ int lineup_to_parens; /* if true, continued code within parens will * be lined up to the open paren */ -int lineup_to_parens_always; /* if true, do not attempt to keep - * lined-up code within the margin */ int Bill_Shannon; /* true iff a blank should always be inserted * after sizeof */ int blanklines_after_declarations_at_proctop; /* This is vaguely diff --git a/usr.bin/indent/io.c b/usr.bin/indent/io.c index 53c6159b8e9b..09ff017571f6 100644 --- a/usr.bin/indent/io.c +++ b/usr.bin/indent/io.c @@ -226,8 +226,6 @@ compute_code_target(void) if (!lineup_to_parens) target_col += continuation_indent * (2 * continuation_indent == ps.ind_size ? 1 : ps.paren_level); - else if (lineup_to_parens_always) - target_col = paren_target; else { int w; int t = paren_target;