diff --git a/ChangeLog b/ChangeLog index c011439589120b8ba747b45de8643f0ab533a1e2..e4fd9baa81a5b0d9b171ef9ff2eafb483a9c11ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ CVS code - - Miscellaneous comment fixes. (DLR) - Remove unnecessary #ifdef around termios.h #include in nano.c. (DLR) + - Sort the default strings for brackets and punct, and the "or" + atom in the default regex string for quotestr, according to + ASCII. Changes to main(), nano.1, nanorc.5, and + nanorc.sample. (DLR) - winio.c: edit_scroll() - Redraw the lines before and after the scrolled region even if @@ -11,6 +15,13 @@ CVS code - screen down one line and leaves the cursor on the last line of the screen, in which case we need to update the line after the scrolled region. (DLR) +- doc/nano.1: + - Better display the default values for quotestr. (DLR) +- doc/nanorc.5: + - Give the default values for the brackets and punct options, + and better display the default values for quotestr. (DLR) +- doc/nanorc.sample: + - Remove unneeded comment. (DLR) GNU nano 1.3.10 - 2005.12.23 - General: diff --git a/doc/man/nano.1 b/doc/man/nano.1 index 9e87ccc995a20e7d9a5d8883d9c679567dcb01f8..208ae6aa94e887ce25da29d21f84d04e7cac4b98 100644 --- a/doc/man/nano.1 +++ b/doc/man/nano.1 @@ -6,7 +6,7 @@ .\" Public License for copying conditions. There is NO warranty. .\" .\" $Id$ -.TH NANO 1 "version 1.3.10" "November 21, 2005" +.TH NANO 1 "version 1.3.10" "January 02, 2006" .\" Please adjust this date whenever revising the manpage. .\" @@ -84,8 +84,8 @@ Use the blank line below the titlebar as extra editing space. .TP .B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP) Set the quoting string for justifying. The default is -"^([\ \\t]*[|>:}#])+" if regular expression support is available, or -">\ " otherwise. +"\fI^([\ \\t]*[#:>\\|}])+\fP" if regular expression support is +available, or "\fI>\ \fP" otherwise. .TP .B \-R (\-\-restricted) Restricted mode: Don't read or write to any file not specified on the diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5 index 1a63dd8b84969ae9da8f41365f977d97603566c8..6cc11e674b9f7b37a7da72c606cd5802cf9a83ea 100644 --- a/doc/man/nanorc.5 +++ b/doc/man/nanorc.5 @@ -6,7 +6,7 @@ .\" Public License for copying conditions. There is NO warranty. .\" .\" $Id$ -.TH NANORC 5 "version 1.3.10" "November 21, 2005" +.TH NANORC 5 "version 1.3.10" "January 02, 2006" .\" Please adjust this date whenever revising the manpage. .\" .SH NAME @@ -56,7 +56,8 @@ Do backwards searches by default. .B set brackets "\fIstring\fP" Set the characters treated as closing brackets. They cannot contain blank characters. Only closing punctuation, optionally followed by -closing brackets, can end sentences. +closing brackets, can end sentences. The default value is +"\fI"')>]}\fP". .TP .B set/unset casesensitive Do case sensitive searches by default. @@ -113,7 +114,7 @@ Preserve the XON and XOFF keys (^Q and ^S). .B set punct "\fIstring\fP" Set the characters treated as closing punctuation. They cannot contain blank characters. Only closing punctuation, optionally followed by -closing brackets, can end sentences. +closing brackets, can end sentences. The default value is "\fI!.?\fP". .TP .B set/unset quickblank Do quick statusbar blanking. Statusbar messages will disappear after 1 @@ -123,11 +124,8 @@ keystroke instead of 25. The email-quote string, used to justify email-quoted paragraphs. This is an "extended regular expression" if your system supports them, otherwise a literal string. The default value is - - set quotestr "^([\ \\t]*[|>:}#])+" - -if you have regexps, otherwise set quotestr ">\ ". Note that '\\t' -above stands for a literal Tab character. +"\fI^([\ \\t]*[#:>\\|}])+\fP" if you have regexps, or "\fI>\ \fP" +otherwise. Note that '\\t' stands for a literal Tab character. .TP .B set/unset rebinddelete Interpret the Delete key differently so that both Backspace and Delete diff --git a/doc/nanorc.sample b/doc/nanorc.sample index 2c289a2da4f79d92176a7f5e5ede1154dbda3734..623e34bd53dcb5e2741e0dbdc45fe15f886c9cd7 100644 --- a/doc/nanorc.sample +++ b/doc/nanorc.sample @@ -24,7 +24,7 @@ ## blank characters. Only closing punctuation, optionally followed by ## closing brackets, can end sentences. ## -# set brackets "'")}]>" +# set brackets ""')>]}" ## Do case sensitive searches by default. # set casesensitive @@ -87,7 +87,7 @@ ## blank characters. Only closing punctuation, optionally followed by ## closing brackets, can end sentences. ## -# set punct ".?!" +# set punct "!.?" ## Do quick statusbar blanking. Statusbar messages will disappear after ## 1 keystroke instead of 25. Note that "const" cancels this out. @@ -97,11 +97,9 @@ ## The email-quote string, used to justify email-quoted paragraphs. ## This is an extended regular expression if your system supports them, ## otherwise a literal string. Default: -# set quotestr "^([ ]*[\|>:}#])+" +# set quotestr "^([ ]*[#:>\|}])+" ## if you have regexps, otherwise: # set quotestr "> " -## You can get old nano quoted-justify behavior via: -# set quotestr "(> )+" ## Fix Backspace/Delete confusion problem. # set rebinddelete diff --git a/src/nano.c b/src/nano.c index b0033b17efaa19a7f97283955e47b7623c381da5..a4f486a720dc38c5e7e78d72c620790b6b4aaadc 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1956,15 +1956,15 @@ int main(int argc, char **argv) #ifndef DISABLE_JUSTIFY if (punct == NULL) - punct = mallocstrcpy(NULL, ".?!"); + punct = mallocstrcpy(NULL, "!.?"); if (brackets == NULL) - brackets = mallocstrcpy(NULL, "'\")}]>"); + brackets = mallocstrcpy(NULL, "\"')>]}"); if (quotestr == NULL) quotestr = mallocstrcpy(NULL, #ifdef HAVE_REGEX_H - "^([ \t]*[|>:}#])+" + "^([ \t]*[#:>|}])+" #else "> " #endif