diff --git a/src/files.c b/src/files.c index 3b06671f..a031645c 100644 --- a/src/files.c +++ b/src/files.c @@ -1594,7 +1594,7 @@ bool write_file(const char *name, FILE *thefile, bool tmp, * isn't temporary. Furthermore, if we aren't appending, prepending, or * writing a selection, we back up only if the file has not been modified * by someone else since nano opened it. */ - if (ISSET(BACKUP_FILE) && is_existing_file && openfile->current_stat && + if (ISSET(MAKE_BACKUP) && is_existing_file && openfile->current_stat && (method != OVERWRITE || openfile->mark || openfile->current_stat->st_mtime == st.st_mtime)) { static struct timespec filetime[2]; @@ -2037,7 +2037,7 @@ int do_writeout(bool exiting, bool withprompt) formatstr = (openfile->fmt == DOS_FILE) ? _(" [DOS Format]") : (openfile->fmt == MAC_FILE) ? _(" [Mac Format]") : ""; - backupstr = ISSET(BACKUP_FILE) ? _(" [Backup]") : ""; + backupstr = ISSET(MAKE_BACKUP) ? _(" [Backup]") : ""; /* When the mark is on, offer to write the selection to disk, but * not when in restricted mode, because it would allow writing to @@ -2108,7 +2108,7 @@ int do_writeout(bool exiting, bool withprompt) openfile->fmt = (openfile->fmt == MAC_FILE) ? NIX_FILE : MAC_FILE; continue; } else if (func == backup_file_void) { - TOGGLE(BACKUP_FILE); + TOGGLE(MAKE_BACKUP); continue; } else if (func == prepend_void) { method = (method == PREPEND) ? OVERWRITE : PREPEND; diff --git a/src/nano.c b/src/nano.c index 435f4a88..be2947b1 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1799,7 +1799,7 @@ int main(int argc, char **argv) SET(SMART_HOME); break; case 'B': - SET(BACKUP_FILE); + SET(MAKE_BACKUP); break; case 'C': backup_dir = mallocstrcpy(backup_dir, optarg); @@ -2137,7 +2137,7 @@ int main(int argc, char **argv) /* When in restricted mode, disable backups, suspending, and history files, * since they allow writing to files not specified on the command line. */ if (ISSET(RESTRICTED)) { - UNSET(BACKUP_FILE); + UNSET(MAKE_BACKUP); UNSET(SUSPENDABLE); #ifdef ENABLE_NANORC UNSET(HISTORYLOG); diff --git a/src/nano.h b/src/nano.h index 2b86476b..745b2b5a 100644 --- a/src/nano.h +++ b/src/nano.h @@ -510,7 +510,7 @@ enum REBIND_DELETE, RAW_SEQUENCES, NO_CONVERT, - BACKUP_FILE, + MAKE_BACKUP, INSECURE_BACKUP, NO_SYNTAX, PRESERVE, diff --git a/src/rcfile.c b/src/rcfile.c index 98b30f77..9a2a276e 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -100,7 +100,7 @@ static const rcoption rcopts[] = { {"allow_insecure_backup", INSECURE_BACKUP}, {"atblanks", AT_BLANKS}, {"autoindent", AUTOINDENT}, - {"backup", BACKUP_FILE}, + {"backup", MAKE_BACKUP}, {"backupdir", 0}, {"casesensitive", CASE_SENSITIVE}, {"cutfromcursor", CUT_FROM_CURSOR},