Merge branch 'master' into rexy712

This commit is contained in:
rexy712 2022-12-04 04:32:02 -08:00
commit 9980a98607
55 changed files with 22104 additions and 21662 deletions

View File

@ -8,7 +8,9 @@ Chris Allegretta <chrisa@asty.org>
Benno Schulenberg <bensberg@telfort.nl>
* An array of small bug fixes, the cut-word and block-jump
routines, text selection by holding Shift, macro recording
and replay, plus some key bindings. Current maintainer.
and replay, extra key bindings, the --indicator, --minibar,
and --zero options, and braced functions in string binds.
Current maintainer.
David Lawrence Ramsey <pooka109@gmail.com>
* Former stable series maintainer. Multiple buffer support,

100
ChangeLog
View File

@ -1,3 +1,103 @@
Changes between v6.4 and v7.0:
------------------------------
Benno Schulenberg (94):
build: add options --disable-formatter and --disable-linter to configure
build: exclude some pieces that are not needed with --disable-nanorc
build: exclude two unneeded functions correctly from the tiny version
build: fix compilation when configured with --enable-tiny
bump version numbers and add a news item for the 7.0 release
completion: search through all open buffers for possible completions
docs: clarify the distinction between binding a function and "{function}"
docs: describe --disable-formatter and --disable-linter configure options
docs: explain how to include a double quote plus space in a nanorc regex
docs: improve the legibility of an itemized list
docs: mention in the man page how M-V can insert any Unicode code point
docs: mention that string binds may contain function names between braces
docs: replace control codes in the examples with {command} cartouches
docs: suggest a key binding for snipping trailing blanks
execute: show "Cancelled" instead of "Error" when the user hits ^C
extra: use the whole terminal for the crawl, and quicken it a bit
feedback: suppress undo/redo messages when option --zero is in effect
files: before sending data to an external command, decode LF back to NUL
files: improve the error handling when executing an external command
filtering: terminate also the sender process when the user hits ^C
filtering: when returning to a line number, ensure it is within range
gnulib: update to its current upstream state
goto: don't center the current line when the user specified a column only
help: don't show the New-Buffer toggle when in view mode
help: move the M-Del item up, so that M-PgUp and M-PgDn are paired
help: prioritize the unshifted Meta keystrokes for buffer switching
input: allocate a small keystroke buffer, and never free it
input: allocate two small character buffers too, and never free them
input: give up when the capacity of the keystroke buffer overflows
input: interpret commands of the form {functionname} inside string binds
memory: avoid a leak when a string bind specifies an unknown menu
prompt: allow rebinding also ^N, ^Q, and ^Y at the yes-no prompt
prompt: ingest queued characters before handling any subsequent function
prompt: prevent execution of inadmissible functions in view mode
prompt: return FALSE for non-editing functions also in the tiny version
prompt: toggle the help lines only for the 'nohelp' toggle
search: skip a match on the magic line, as it is a just convenience line
startup: ensure that +/string centers the match also with --linenumbers
startup: for +/string, center the found occurrence when possible
startup: quit when standard input is not a TTY (after handling arguments)
startup: report an empty search string also when there is a modifier
syntax: nanorc: colorize valid function names plus surrounding braces
tweaks: add parentheses for consistency, and reshuffle for conciseness
tweaks: allow the linter to be used in view mode, as it makes no changes
tweaks: attribute some of the features that were added in the last years
tweaks: avoid iterating over the same string twice in a row
tweaks: avoid sometimes calling a function three times in a row
tweaks: check the multiline regexes only for Delete and Backspace
tweaks: condense a comment, add two small ones, and reshuffle a line
tweaks: delete a flag that is no longer used
tweaks: determine in another way whether a shortcut is okay in view mode
tweaks: discard a bracketed paste in the browser more efficiently
tweaks: don't use a pointer when the value itself is all that is needed
tweaks: drop an unneeded check for permissibility of prompt shortcuts
tweaks: drop a parameter that is no longer used
tweaks: drop shunting of flags by calling the needed function directly
tweaks: elide a function that does not need to be a separate function
tweaks: elide an assignment by iterating with the target variable
tweaks: elide an intermediary variable that is no longer needed
tweaks: elide an unused parameter
tweaks: elide an unused return value
tweaks: elide a parameter by moving the general case one level up
tweaks: elide a variable, rename another, and reshuffle an assignment
tweaks: fold two cases together, because they basically do the same
tweaks: group the special keycodes for implanted strings together
tweaks: improve two comments, and exclude two unneeded prototypes
tweaks: make the crawl use the whole screen also in the tiny version
tweaks: make two error messages more succinct and easier to translate
tweaks: move the arrays of menu names and symbols to where they are used
tweaks: move the --magic option up, so that --zero comes last
tweaks: move to a given line number more efficiently
tweaks: move two checks plus corresponding calls to a better place
tweaks: normalize the indentation after the previous change
tweaks: reduce four variations of a message to a single common form
tweaks: rename a macro for clarity, and normalize some indentation
tweaks: rename a variable, away from an abbreviation
tweaks: rename two record elements and three parameters, for clarity
tweaks: replace sizeof(char) with 1, as that is assumed anyway
tweaks: reshuffle a declaration, and correct the wording of a comment
tweaks: reshuffle a line, to group things better
tweaks: reshuffle some code and drop some comments, for conciseness
tweaks: reshuffle some code, to not determine a shortcut twice
tweaks: reshuffle some lines, to be more readable instead of compact
tweaks: reshuffle two lines, for conciseness and in preparation
tweaks: reword and/or condense four comments
tweaks: rewrap line, improve wording, and correct typo in old news item
tweaks: rewrap some lines, drop a redundant call, and reshuffle a line
tweaks: simplify a function now that a Unicode code can be typed quicker
tweaks: simplify a pasting routine, modelling it after the injection one
tweaks: use an auxiliary variable to avoid dereferences of 'shortcut'
undo: make sure the current line is defined before it is referenced
verbatim: allow the user to finish Unicode input with <Enter> or <Space>
verbatim: do not overwrite the status bar when the code is invalid
verbatim: don't show dots during Unicode input, as they give wrong idea
Changes between v6.3 and v6.4:
------------------------------

View File

@ -1,6 +1,11 @@
Improvements in GNU nano
========================
Since 7.0:
- String binds may contain bindable function names between braces.
- Word completion looks for candidates in all open buffers.
- Unicode codes can be entered without leading zeroes.
Since 6.0:
- Option --zero hides the interface and uses the whole terminal for editing.
- Colors can be given also in #rgb hexadecimal, to select the nearest color

12
NEWS
View File

@ -1,3 +1,15 @@
2022.11.15 - GNU nano 7.0 "Una existencia simple bajo el sol"
• String binds may contain bindable function names between braces.
For example, to move the current line down to after the next one:
bind ^D "{cut}{down}{paste}{up}" main. Of course, braced function
names may be mixed with literal text. If an existing string bind
contains a literal {, replace it with {{}.
• Unicode codes can be entered (via M-V) without leading zeroes,
by finishing short codes with <Space> or <Enter>.
• Word completion (^]) looks for candidates in all open buffers.
• No regular expression matches the final empty line any more.
2022.08.02 - GNU nano 6.4 "Regentag Dunkelbunt Hundertwasser"
• The file browser does not crash when moving up to the root folder.
• Softwrapping very long lines is done more efficiently.

2
README
View File

@ -15,7 +15,7 @@ Appearance
In rough ASCII graphics, this is what nano's screen looks like:
____________________________________________________________________
| GNU nano 6.4 filename Modified |
| GNU nano 7.0 filename Modified |
--------------------------------------------------------------------
| This is the text window, displaying the contents of a 'buffer', |
| the contents of the file you are editing. |

View File

@ -2,7 +2,7 @@
# Generate configure & friends for GIT users.
gnulib_url="git://git.sv.gnu.org/gnulib.git"
gnulib_hash="f00af4baf2c7416c5d7c4674c072ef2a51e40668"
gnulib_hash="0ab73798b5bc703233195c1d37f96d977fc26ad8"
modules="
futimens

View File

@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see https://www.gnu.org/licenses/.
AC_INIT([GNU nano], [6.4], [nano-devel@gnu.org], [nano])
AC_INIT([GNU nano], [7.0], [nano-devel@gnu.org], [nano])
AC_CONFIG_SRCDIR([src/nano.c])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([1.14])

View File

@ -92,7 +92,7 @@
<h3><a name="1.3"></a>1.3. Why the name change from TIP?</h3>
<blockquote><p>On January 10, 2000, TIP was officially renamed to nano because of a namespace conflict with another program called 'tip'. The original 'tip' program &quot;establishes a full duplex terminal connection to a remote host&quot;, and was included with many older Unix systems (and newer ones like Solaris). The conflict was not noticed at first because there is no 'tip' utility included with most GNU/Linux distributions (where nano was developed).</p></blockquote>
<h3><a name="1.4"></a>1.4. What is the current version of nano?</h3>
<blockquote><p>The current version of nano <i>should</i> be <b>6.4</b>. Of course, you should always check the <a href="https://nano-editor.org/">nano homepage</a> to see what the latest and greatest version is.</p></blockquote>
<blockquote><p>The current version of nano <i>should</i> be <b>7.0</b>. Of course, you should always check the <a href="https://nano-editor.org/">nano homepage</a> to see what the latest and greatest version is.</p></blockquote>
<h3><a name="1.5"></a>1.5. I want to read the man page without having to download the program!</h3>
<blockquote><p>Jeez, demanding, aren't we? Okay, look <a href="https://nano-editor.org/dist/latest/nano.1.html">here</a>.</p></blockquote>
<hr width="100%">

View File

@ -16,7 +16,7 @@
.\" Documentation License along with this program. If not, see
.\" <https://www.gnu.org/licenses/>.
.\"
.TH NANO 1 "version 6.4" "August 2022"
.TH NANO 1 "version 7.0" "November 2022"
.SH NAME
nano \- Nano's ANOther editor, inspired by Pico

View File

@ -12,9 +12,9 @@ The complete manual for the GNU nano text editor.
@end documentdescription
@smallbook
@set EDITION 0.6
@set VERSION 6.4
@set UPDATED August 2022
@set EDITION 0.7
@set VERSION 7.0
@set UPDATED November 2022
@dircategory Editors
@direntry
@ -29,7 +29,7 @@ The complete manual for the GNU nano text editor.
@title GNU @command{nano}
@subtitle a small and friendly text editor
@subtitle version 6.4
@subtitle version 7.0
@author Chris Allegretta
@ -79,7 +79,7 @@ For suggesting improvements: @email{nano-devel@@gnu.org}
@node Top
@top
This manual documents GNU @command{nano}, version 6.4.
This manual documents GNU @command{nano}, version 7.0.
@menu
* Introduction::

View File

@ -16,7 +16,7 @@
.\" Documentation License along with this program. If not, see
.\" <https://www.gnu.org/licenses/>.
.\"
.TH NANORC 5 "version 6.4" "August 2022"
.TH NANORC 5 "version 7.0" "November 2022"
.SH NAME
nanorc \- GNU nano's configuration file

View File

@ -16,7 +16,7 @@
.\" Documentation License along with this program. If not, see
.\" <https://www.gnu.org/licenses/>.
.\"
.TH RNANO 1 "version 6.4" "August 2022"
.TH RNANO 1 "version 7.0" "November 2022"
.SH NAME
rnano \- a restricted nano

1129
po/bg.po

File diff suppressed because it is too large Load Diff

1139
po/ca.po

File diff suppressed because it is too large Load Diff

1139
po/cs.po

File diff suppressed because it is too large Load Diff

1136
po/da.po

File diff suppressed because it is too large Load Diff

1143
po/de.po

File diff suppressed because it is too large Load Diff

1139
po/eo.po

File diff suppressed because it is too large Load Diff

1141
po/es.po

File diff suppressed because it is too large Load Diff

1129
po/eu.po

File diff suppressed because it is too large Load Diff

1135
po/fi.po

File diff suppressed because it is too large Load Diff

1141
po/fr.po

File diff suppressed because it is too large Load Diff

1141
po/ga.po

File diff suppressed because it is too large Load Diff

1135
po/gl.po

File diff suppressed because it is too large Load Diff

1159
po/hr.po

File diff suppressed because it is too large Load Diff

1133
po/hu.po

File diff suppressed because it is too large Load Diff

1169
po/id.po

File diff suppressed because it is too large Load Diff

1131
po/is.po

File diff suppressed because it is too large Load Diff

1155
po/it.po

File diff suppressed because it is too large Load Diff

1143
po/ja.po

File diff suppressed because it is too large Load Diff

1139
po/ko.po

File diff suppressed because it is too large Load Diff

1177
po/ms.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1139
po/nb.po

File diff suppressed because it is too large Load Diff

1139
po/nl.po

File diff suppressed because it is too large Load Diff

1135
po/pl.po

File diff suppressed because it is too large Load Diff

1135
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1311
po/ro.po

File diff suppressed because it is too large Load Diff

1141
po/ru.po

File diff suppressed because it is too large Load Diff

1141
po/sk.po

File diff suppressed because it is too large Load Diff

1133
po/sl.po

File diff suppressed because it is too large Load Diff

1198
po/sq.po

File diff suppressed because it is too large Load Diff

1150
po/sr.po

File diff suppressed because it is too large Load Diff

1155
po/sv.po

File diff suppressed because it is too large Load Diff

1135
po/tr.po

File diff suppressed because it is too large Load Diff

1147
po/uk.po

File diff suppressed because it is too large Load Diff

1135
po/vi.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION="6.4"
VERSION="7.0"
./configure -C --enable-tiny && make && ./configure -C &&
@ -20,7 +20,7 @@ gpg -a -b nano-$VERSION.tar.xz &&
gpg --verify nano-$VERSION.tar.gz.asc &&
gpg --verify nano-$VERSION.tar.xz.asc &&
git tag -u A0ACE884 -a v$VERSION -m "the nano $VERSION release" &&
git tag -u B8E1961F -a v$VERSION -m "the nano $VERSION release" &&
make pdf && rm -rf doc/nano.t2p &&
scp doc/nano.pdf bens@wh0rd.org:nano.pdf &&

View File

@ -1402,11 +1402,14 @@ bool changes_something(const void *f)
#ifndef NANO_TINY
f == chop_previous_word || f == chop_next_word ||
f == zap_text || f == cut_till_eof || f == do_execute ||
f == do_indent || f == do_unindent || f == do_comment ||
f == do_indent || f == do_unindent ||
#endif
#ifdef ENABLE_JUSTIFY
f == do_justify || f == do_full_justify ||
#endif
#ifdef ENABLE_COMMENT
f == do_comment ||
#endif
#ifdef ENABLE_SPELLER
f == do_spell ||
#endif

View File

@ -908,7 +908,7 @@ void parse_one_include(char *file, syntaxtype *syntax)
FILE *rcstream;
/* Don't open directories, character files, or block files. */
if (!is_good_file(file))
if (access(file, R_OK) == 0 && !is_good_file(file))
return;
rcstream = fopen(file, "rb");
@ -976,7 +976,7 @@ void parse_includes(char *ptr)
/* Expand a tilde first, then try to match the globbing pattern. */
expanded = real_dir_from_tilde(pattern);
result = glob(expanded, GLOB_ERR, NULL, &files);
result = glob(expanded, GLOB_ERR|GLOB_NOCHECK, NULL, &files);
/* If there are matches, process each of them. Otherwise, only
* report an error if it's something other than zero matches. */
@ -1707,7 +1707,7 @@ void do_rcfiles(void)
{
if (custom_nanorc) {
nanorc = get_full_path(custom_nanorc);
if (access(nanorc, F_OK) != 0)
if (nanorc == NULL || access(nanorc, F_OK) != 0)
die(_("Specified rcfile does not exist\n"));
} else
nanorc = mallocstrcpy(nanorc, SYSCONFDIR "/nanorc");

View File

@ -891,7 +891,7 @@ void do_enter(void)
if (extra > openfile->current_x)
extra = openfile->current_x;
else if (extra == openfile->current_x)
allblanks = TRUE;
allblanks = (indent_length(openfile->current->data) == extra);
}
#endif /* NANO_TINY */
newnode->data = nmalloc(strlen(openfile->current->data +

View File

@ -8,8 +8,8 @@ comment "#"
color ,red " + +"
# Nano's release motto, then name plus version.
color italic,lime "\<[Nn]ano [1-6]\.[0-9][-.[:alnum:]]* "[^"]+""
color brightred "\<(GNU )?[Nn]ano [1-6]\.[0-9][-.[:alnum:]]*\>"
color italic,lime "\<[Nn]ano [1-7]\.[0-9][-.[:alnum:]]* "[^"]+""
color brightred "\<(GNU )?[Nn]ano [1-7]\.[0-9][-.[:alnum:]]*\>"
# Dates
color latte "\<[12][0-9]{3}\.(0[1-9]|1[012])\.(0[1-9]|[12][0-9]|3[01])\>"