From cfa4a9c4fe801c0d7575445d04cf85efb46109bb Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Sun, 24 Oct 2004 17:20:31 +0000 Subject: [PATCH] remove the global DOS/Mac format toggles, for consistency with other file operations like Append/Prepend that are specific to the "Write File" prompt, and change the Mac format toggle to Meta-M, since that no longer conflicts with the mouse support toggle; update the documentation accordingly git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2023 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 12 ++++++++++-- doc/man/nano.1 | 2 +- doc/texinfo/nano.texi | 8 +------- src/global.c | 12 ++++-------- src/nano.c | 6 ------ src/nano.h | 2 +- 6 files changed, 17 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index d63653d0..4af20b34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -71,7 +71,12 @@ CVS code - read_file(), add_open_file(), and load_open_file(). (DLR, suggested by Bill Soudan) - Remove the -D/--dos and -M/--mac command line options, as they - aren't much use with the new file format autodetection. (DLR) + aren't much use with the new file format autodetection. Also + remove the global versions of the toggles, so that they can + only be used at the "Write File" prompt as similar options + can. Finally, change the Mac format toggle to Meta-M, since + that no longer conflicts with the global -m/--mouse toggle. + (DLR) - Add support for reading in UTF-8 sequences to the low-level input routines. Changes to get_kbinput() and get_translated_kbinput(). (DLR) @@ -295,9 +300,12 @@ CVS code - - README.CVS: - Mention the requirement for glib 2.x on systems lacking v?snprintf(), and add minor formatting changes. -- nano.1, nano.texi +- nano.1: - Eliminate references to the now removed -D/--dos and -M/--mac command line options. (DLR) +- nano.texi: + - Eliminate references to the now removed -D/--dos and -M/--mac + command line options, and their corresponding toggles. (DLR) - m4/glib-2.0.m4: - New file imported from glib 2.4.7. This is needed to detect glib 2.x on systems that may not have it installed. (DLR, diff --git a/doc/man/nano.1 b/doc/man/nano.1 index 2c72f508..d1d79f70 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.4" "August 17, 2004" +.TH NANO 1 "version 1.3.4" "October 24, 2004" .\" Please adjust this date whenever revising the manpage. .\" diff --git a/doc/texinfo/nano.texi b/doc/texinfo/nano.texi index ba799739..043f8322 100644 --- a/doc/texinfo/nano.texi +++ b/doc/texinfo/nano.texi @@ -9,7 +9,7 @@ @smallbook @set EDITION 0.1 @set VERSION 1.3.4 -@set UPDATED 17 Aug 2004 +@set UPDATED 24 Oct 2004 @dircategory Editors @direntry @@ -342,9 +342,6 @@ The following global toggles are available: @item Backup File Toggle (Meta-B) toggles the -B (@code{--backup}) command line flag. -@item DOS Format Toggle (Meta-D) -toggles writing the file in DOS format. - @item Multiple Files Toggle (Meta-F) toggles the -F (@code{--multibuffer}) command line flag. @@ -363,9 +360,6 @@ toggles the -w (@code{--nowrap}) command line flag. @item Mouse Toggle (Meta-M) toggles the -m (@code{--mouse}) command line flag. -@item Mac Format Toggle (Meta-O) -toggles writing the file in Mac format. - @item Smooth Scrolling Toggle (Meta-S) toggles the -S (@code{--smooth}) command line flag. diff --git a/src/global.c b/src/global.c index e557add3..1f4d42ab 100644 --- a/src/global.c +++ b/src/global.c @@ -1074,17 +1074,13 @@ void toggle_init(void) #ifndef DISABLE_MOUSE toggle_init_one(TOGGLE_MOUSE_KEY, N_("Mouse support"), USE_MOUSE); #endif - /* If we're using restricted mode, the no-conversion, DOS format, - * Mac format, and backup toggles are disabled. The first, second, - * and third are useless since inserting files is disabled, and the - * fourth is useless since backups are disabled. */ + /* If we're using restricted mode, the no-conversion and backup + * backup toggles are disabled. The former is useless since + * inserting files is disabled, and the latter is useless since + * backups are disabled. */ if (!ISSET(RESTRICTED)) { toggle_init_one(TOGGLE_NOCONVERT_KEY, N_("No conversion from DOS/Mac format"), NO_CONVERT); - toggle_init_one(TOGGLE_DOS_KEY, N_("Writing file in DOS format"), - DOS_FILE); - toggle_init_one(TOGGLE_MAC_KEY, N_("Writing file in Mac format"), - MAC_FILE); toggle_init_one(TOGGLE_BACKUP_KEY, N_("Backup files"), BACKUP_FILE); } toggle_init_one(TOGGLE_SMOOTH_KEY, N_("Smooth scrolling"), SMOOTHSCROLL); diff --git a/src/nano.c b/src/nano.c index 45cbe9ae..237faba9 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2913,12 +2913,6 @@ void do_toggle(const toggle *which) edit_refresh(); display_main_list(); break; - case TOGGLE_DOS_KEY: - UNSET(MAC_FILE); - break; - case TOGGLE_MAC_KEY: - UNSET(DOS_FILE); - break; #ifdef ENABLE_COLOR case TOGGLE_SYNTAX_KEY: edit_refresh(); diff --git a/src/nano.h b/src/nano.h index 6bc2a0a1..eddd043d 100644 --- a/src/nano.h +++ b/src/nano.h @@ -470,7 +470,7 @@ typedef struct historyheadtype { #define TOGGLE_CASE_KEY NANO_ALT_C #define TOGGLE_MULTIBUFFER_KEY NANO_ALT_F #define TOGGLE_DOS_KEY NANO_ALT_D -#define TOGGLE_MAC_KEY NANO_ALT_O +#define TOGGLE_MAC_KEY NANO_ALT_M #define TOGGLE_SMOOTH_KEY NANO_ALT_S #define TOGGLE_NOCONVERT_KEY NANO_ALT_N #define TOGGLE_BACKUP_KEY NANO_ALT_B -- 2.39.5