From 6397b592fbc08714e538ef5e77221ec10c694d70 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 20 Apr 2006 22:36:10 +0000 Subject: [PATCH] cleanups: fix M-M/M-N toggle inversion, and reorder toggle #defines in nano.h to match the new order in toggle_init() git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3405 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/global.c | 8 ++++---- src/nano.h | 26 +++++++++++++------------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc328152..c3bcdce6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -85,6 +85,9 @@ CVS code - - nano.c: renumber() - Remove invalid assert. (DLR, found by Filipe Moreira) +- nano.h: + - Reorder the toggle #defines to match their corresponding order + in toggle_init(). (DLR) - rcfile.c: parse_argument() - Rename variable ptr_bak to ptr_save, for consistency. (DLR) diff --git a/src/global.c b/src/global.c index 2bbd6ce3..bfc6231b 100644 --- a/src/global.c +++ b/src/global.c @@ -1268,16 +1268,16 @@ void toggle_init(void) N_("Multiple file buffers"), MULTIBUFFER); #endif +#ifndef DISABLE_MOUSE + toggle_init_one(TOGGLE_MOUSE_KEY, N_("Mouse support"), USE_MOUSE); +#endif + /* If we're using restricted mode, the DOS/Mac conversion toggle is * disabled. It's useless since inserting files is disabled. */ if (!ISSET(RESTRICTED)) toggle_init_one(TOGGLE_NOCONVERT_KEY, N_("No conversion from DOS/Mac format"), NO_CONVERT); -#ifndef DISABLE_MOUSE - toggle_init_one(TOGGLE_MOUSE_KEY, N_("Mouse support"), USE_MOUSE); -#endif - /* If we're using restricted mode, the suspend toggle is disabled. * It's useless since suspending is disabled. */ if (!ISSET(RESTRICTED)) diff --git a/src/nano.h b/src/nano.h index 6d171fe4..7be742a2 100644 --- a/src/nano.h +++ b/src/nano.h @@ -554,26 +554,26 @@ typedef struct rcoption { #define TOGGLE_NO_KEY -2 /* Normal toggles. */ +#define TOGGLE_NOHELP_KEY NANO_ALT_X #define TOGGLE_CONST_KEY NANO_ALT_C +#define TOGGLE_MORESPACE_KEY NANO_ALT_O +#define TOGGLE_SMOOTH_KEY NANO_ALT_S +#define TOGGLE_WHITESPACE_KEY NANO_ALT_P +#define TOGGLE_SYNTAX_KEY NANO_ALT_Y +#define TOGGLE_SMARTHOME_KEY NANO_ALT_H #define TOGGLE_AUTOINDENT_KEY NANO_ALT_I -#define TOGGLE_SUSPEND_KEY NANO_ALT_Z -#define TOGGLE_NOHELP_KEY NANO_ALT_X -#define TOGGLE_MOUSE_KEY NANO_ALT_M #define TOGGLE_CUTTOEND_KEY NANO_ALT_K #define TOGGLE_WRAP_KEY NANO_ALT_L -#define TOGGLE_BACKWARDS_KEY NANO_ALT_B -#define TOGGLE_CASE_KEY NANO_ALT_C +#define TOGGLE_TABSTOSPACES_KEY NANO_ALT_Q +#define TOGGLE_BACKUP_KEY NANO_ALT_B #define TOGGLE_MULTIBUFFER_KEY NANO_ALT_F +#define TOGGLE_MOUSE_KEY NANO_ALT_M +#define TOGGLE_NOCONVERT_KEY NANO_ALT_N +#define TOGGLE_SUSPEND_KEY NANO_ALT_Z +#define TOGGLE_CASE_KEY NANO_ALT_C +#define TOGGLE_BACKWARDS_KEY NANO_ALT_B #define TOGGLE_DOS_KEY NANO_ALT_D #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 -#define TOGGLE_SYNTAX_KEY NANO_ALT_Y -#define TOGGLE_SMARTHOME_KEY NANO_ALT_H -#define TOGGLE_WHITESPACE_KEY NANO_ALT_P -#define TOGGLE_MORESPACE_KEY NANO_ALT_O -#define TOGGLE_TABSTOSPACES_KEY NANO_ALT_Q #endif /* !NANO_TINY */ #define MAIN_VISIBLE 12 -- 2.39.5