diff --git a/ChangeLog b/ChangeLog index 53ed221f81ca30f86637e76b00778c0e0f342a0a..55402eab546e45db1227b662e1ced8df1c308bd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2015-03-14 Benno Schulenberg <bensberg@justemail.net> + * src/text.c (do_formatter): Fix a message plus a few comments. + 2015-03-14 Mark Majeres <mark@engine12.com> * src/nano.c (renumber): Get out if there is nothing to renumber. This prevents do_undo() from falling over when trying to renumber diff --git a/src/text.c b/src/text.c index 79a6892e47c4b702612340c32cf666df2a70be96..332555e8d5c241dabfef038a8870bf6f117815e5 100644 --- a/src/text.c +++ b/src/text.c @@ -3229,7 +3229,7 @@ free_lints_and_return: /* Run a formatter for the given syntax. * Expects the formatter to be non-interactive and * operate on a file in-place, which we'll pass it - * on the command line. Another mashuhp of the speller + * on the command line. Another mashup of the speller * and alt_speller routines. */ void do_formatter(void) @@ -3249,10 +3249,9 @@ void do_formatter(void) char *finalstatus = NULL; /* Check whether we're using syntax highlighting - * and formatter option it set - */ + * and the formatter option is set. */ if (openfile->syntax == NULL || openfile->syntax->formatter == NULL) { - statusbar(_("Error: no linter defined")); + statusbar(_("Error: no formatter defined")); return; } @@ -3266,7 +3265,7 @@ void do_formatter(void) return; } - /* we're not supporting partial formatting, oi vey */ + /* We're not supporting partial formatting, oi vey. */ openfile->mark_set = FALSE; status = write_file(temp, temp_file, TRUE, OVERWRITE, FALSE); @@ -3304,10 +3303,10 @@ void do_formatter(void) /* Start a new process for the formatter. */ if ((pid_format = fork()) == 0) { - /* Start alternate format program; we are using $PATH. */ + /* Start the formatting program; we are using $PATH. */ execvp(formatargs[0], formatargs); - /* Should not be reached, if alternate formatter is found!!! */ + /* Should not be reached, if the formatter is found! */ exit(1); } @@ -3350,9 +3349,7 @@ void do_formatter(void) sprintf(format_error, invoke_error, openfile->syntax->formatter); finalstatus = format_error; } else { - - /* Replace the text of the current buffer with the format-checked - * text. */ + /* Replace the text of the current buffer with the formatted text. */ replace_buffer(temp); /* Go back to the old position, and mark the file as modified. */ @@ -3372,7 +3369,7 @@ void do_formatter(void) currmenu = MMAIN; - /* If the spell-checker printed any error messages onscreen, make + /* If the formatter printed any error messages onscreen, make * sure that they're cleared off. */ total_refresh();