+2016-02-06 Benno Schulenberg <bensberg@justemail.net>
+ * src/files.c (write_file): Remove the --nofollow option that hasn't
+ been working for a dozen years.
+
2016-02-05 Benno Schulenberg <bensberg@justemail.net>
* doc/texinfo/nano.texi: Condense the descriptions of command-key
sequences and of the screen layout, mention how to enter Unicode,
Make the 'Cut Text' command (normally ^K) cut from the current cursor
position to the end of the line, instead of cutting the entire line.
.TP
-.BR \-l ", " \-\-nofollow
-If the file being edited is a symbolic link, replace the link with
-a new file instead of following it. Good for editing files in
-\fI/tmp\fP, perhaps?
-.TP
.BR \-m ", " \-\-mouse
Enable mouse support, if available for your system. When enabled, mouse
clicks can be used to place the cursor, set the mark (with a double
.B set noconvert
Don't convert files from DOS/Mac format.
.TP
-.B set nofollow
-Don't follow symlinks when writing files.
-.TP
.B set nohelp
Don't display the two help lines at the bottom of the screen.
.TP
## Don't convert files from DOS/Mac format.
# set noconvert
-## Don't follow symlinks when writing files.
-# set nofollow
-
## Don't display the helpful shortcut lists at the bottom of the screen.
# set nohelp
icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|i?color|extendsyntax).*$"
# Keywords
-icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backwards|boldtext|casesensitive|const(antshow)?|cut|fill|historylog|locking|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|pos(ition)?log|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|suspend|tabsize|tabstospaces|tempfile|unix|view|wordbounds)\>"
+icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backwards|boldtext|casesensitive|const(antshow)?|cut|fill|historylog|locking|morespace|mouse|multibuffer|noconvert|nohelp|nonewlines|nowrap|pos(ition)?log|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|suspend|tabsize|tabstospaces|tempfile|unix|view|wordbounds)\>"
icolor yellow "^[[:space:]]*set[[:space:]]+(functioncolor|keycolor|statuscolor|titlecolor)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|operatingdir|punct|quotestr|speller|statuscolor|titlecolor|whitespace)[[:space:]]+"
icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9^_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]+(all|main|search|replace(2|with)?|gotoline|writeout|insert|ext(ernal)?cmd|help|spell|linter|browser|whereisfile|gotodir)([[:space:]]+#|[[:space:]]*$)"
Make the 'Cut Text' command (normally ^K) cut from the current cursor
position to the end of the line, instead of cutting the entire line.
-@item -l
-@itemx --nofollow
-When writing files, if the given file is a symbolic link, it is removed
-and a new file is created.
-
@item -m
@itemx --mouse
Enable mouse support, if available for your system. When enabled, mouse
@item set noconvert
Don't convert files from DOS/Mac format.
-@item set nofollow
-Don't follow symlinks when writing files.
-
@item set nohelp
Don't display the help lists at the bottom of the screen.
if (tmp && anyexists && f_open == NULL)
goto cleanup_and_exit;
- /* If NOFOLLOW_SYMLINKS is set, it doesn't make sense to prepend or
- * append to a symlink. Here we warn about the contradiction. */
- if (ISSET(NOFOLLOW_SYMLINKS) && anyexists && S_ISLNK(lst.st_mode)) {
- statusbar(
- _("Cannot prepend or append to a symlink with --nofollow set"));
- goto cleanup_and_exit;
- }
-
#ifndef NANO_TINY
/* Check whether the file (at the end of the symlink) exists. */
realexists = (stat(realname, &st) != -1);
skip_backup:
#endif /* !NANO_TINY */
- /* If NOFOLLOW_SYMLINKS is set and the file is a link, we aren't
- * doing prepend or append. So we delete the link first, and just
- * overwrite. */
- if (ISSET(NOFOLLOW_SYMLINKS) && anyexists && S_ISLNK(lst.st_mode) &&
- unlink(realname) == -1) {
- statusbar(_("Error writing %s: %s"), realname, strerror(errno));
- goto cleanup_and_exit;
- }
-
if (f_open == NULL) {
original_umask = umask(0);
print_opt("-i", "--autoindent", N_("Automatically indent new lines"));
print_opt("-k", "--cut", N_("Cut from cursor to end of line"));
#endif
- print_opt("-l", "--nofollow", N_("Don't follow symbolic links, overwrite"));
#ifndef DISABLE_MOUSE
print_opt("-m", "--mouse", N_("Enable the use of the mouse"));
#endif
{"constantshow", 0, NULL, 'c'},
{"rebinddelete", 0, NULL, 'd'},
{"help", 0, NULL, 'h'},
- {"nofollow", 0, NULL, 'l'},
#ifndef DISABLE_MOUSE
{"mouse", 0, NULL, 'm'},
#endif
SET(CUT_TO_END);
break;
#endif
- case 'l':
- SET(NOFOLLOW_SYMLINKS);
- break;
#ifndef DISABLE_MOUSE
case 'm':
SET(USE_MOUSE);
CASE_SENSITIVE,
CONST_UPDATE,
NO_HELP,
- NOFOLLOW_SYMLINKS,
SUSPEND,
NO_WRAP,
AUTOINDENT,
#ifndef DISABLE_MULTIBUFFER
{"multibuffer", MULTIBUFFER},
#endif
- {"nofollow", NOFOLLOW_SYMLINKS},
{"nohelp", NO_HELP},
{"nonewlines", NO_NEWLINES},
#ifndef DISABLE_WRAPPING