From: Benno Schulenberg Date: Mon, 21 Apr 2014 12:31:52 +0000 (+0000) Subject: Deleting a large bunch of unused defines. X-Git-Tag: v2.3.3~138 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=8c5b9e79cd1401c503eae2dcdc25a8443fc560a7;p=nano.git Deleting a large bunch of unused defines. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4792 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 987730e3..f5972a33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ uppercases them. Also put control first, for clarity. * src/global.c (strtosc, strtomenu): Sort functions slightly better, and allow things to be rebound in the linter menu. + * src/nano.h: Delete a large bunch of unused defines. 2014-04-16 Benno Schulenberg * src/winio.c (get_mouseinput): Properly find also the zeroeth diff --git a/src/nano.h b/src/nano.h index 8365e738..8cb67345 100644 --- a/src/nano.h +++ b/src/nano.h @@ -419,8 +419,6 @@ typedef struct shortcut { /* Whether there should be a blank line after the help entry * text for this function. */ #endif - /* Note: Key values that aren't used should be set to - * NANO_NO_KEY. */ int ctrlval; /* The special sentinel key or control key we want bound, if * any. */ @@ -557,235 +555,17 @@ enum /* Control key sequences. Changing these would be very, very bad. */ #define NANO_CONTROL_SPACE 0 -#define NANO_CONTROL_A 1 -#define NANO_CONTROL_B 2 -#define NANO_CONTROL_C 3 -#define NANO_CONTROL_D 4 -#define NANO_CONTROL_E 5 -#define NANO_CONTROL_F 6 -#define NANO_CONTROL_G 7 -#define NANO_CONTROL_H 8 #define NANO_CONTROL_I 9 -#define NANO_CONTROL_J 10 -#define NANO_CONTROL_K 11 -#define NANO_CONTROL_L 12 -#define NANO_CONTROL_M 13 -#define NANO_CONTROL_N 14 -#define NANO_CONTROL_O 15 -#define NANO_CONTROL_P 16 -#define NANO_CONTROL_Q 17 -#define NANO_CONTROL_R 18 -#define NANO_CONTROL_S 19 -#define NANO_CONTROL_T 20 -#define NANO_CONTROL_U 21 -#define NANO_CONTROL_V 22 -#define NANO_CONTROL_W 23 -#define NANO_CONTROL_X 24 -#define NANO_CONTROL_Y 25 -#define NANO_CONTROL_Z 26 #define NANO_CONTROL_3 27 -#define NANO_CONTROL_4 28 -#define NANO_CONTROL_5 29 -#define NANO_CONTROL_6 30 #define NANO_CONTROL_7 31 #define NANO_CONTROL_8 127 -/* Meta key sequences. */ -#define NANO_META_SPACE ' ' -#define NANO_META_LPARENTHESIS '(' -#define NANO_META_RPARENTHESIS ')' -#define NANO_META_PLUS '+' -#define NANO_META_COMMA ',' -#define NANO_META_MINUS '-' -#define NANO_META_PERIOD '.' -#define NANO_META_SLASH '/' -#define NANO_META_0 '0' -#define NANO_META_6 '6' -#define NANO_META_9 '9' -#define NANO_META_LCARET '<' -#define NANO_META_EQUALS '=' -#define NANO_META_RCARET '>' -#define NANO_META_QUESTION '?' -#define NANO_META_BACKSLASH '\\' -#define NANO_META_RBRACKET ']' -#define NANO_META_CARET '^' -#define NANO_META_UNDERSCORE '_' -#define NANO_META_A 'a' -#define NANO_META_B 'b' -#define NANO_META_C 'c' -#define NANO_META_D 'd' -#define NANO_META_E 'e' -#define NANO_META_F 'f' -#define NANO_META_G 'g' -#define NANO_META_H 'h' -#define NANO_META_I 'i' -#define NANO_META_J 'j' -#define NANO_META_K 'k' -#define NANO_META_L 'l' -#define NANO_META_M 'm' -#define NANO_META_N 'n' -#define NANO_META_O 'o' -#define NANO_META_P 'p' -#define NANO_META_Q 'q' -#define NANO_META_R 'r' -#define NANO_META_S 's' -#define NANO_META_T 't' -#define NANO_META_U 'u' -#define NANO_META_V 'v' -#define NANO_META_W 'w' -#define NANO_META_X 'x' -#define NANO_META_Y 'y' -#define NANO_META_Z 'z' -#define NANO_META_LCURLYBRACKET '{' -#define NANO_META_PIPE '|' -#define NANO_META_RCURLYBRACKET '}' - -/* Some semi-changeable keybindings; don't play with these unless you're - * sure you know what you're doing. Assume ERR is defined as -1. */ - -/* No key at all. */ -#define NANO_NO_KEY -2 - -/* Normal keys. */ -#define NANO_XON_KEY NANO_CONTROL_Q -#define NANO_XOFF_KEY NANO_CONTROL_S -#define NANO_CANCEL_KEY NANO_CONTROL_C -#define NANO_EXIT_KEY NANO_CONTROL_X -#define NANO_EXIT_FKEY KEY_F(2) -#define NANO_INSERTFILE_KEY NANO_CONTROL_R -#define NANO_INSERTFILE_FKEY KEY_F(5) -#define NANO_TOOTHERINSERT_KEY NANO_CONTROL_X -#define NANO_WRITEOUT_KEY NANO_CONTROL_O -#define NANO_WRITEOUT_FKEY KEY_F(3) -#define NANO_GOTOLINE_KEY NANO_CONTROL_7 -#define NANO_GOTOLINE_FKEY KEY_F(13) -#define NANO_GOTOLINE_METAKEY NANO_META_G -#define NANO_GOTODIR_KEY NANO_CONTROL_7 -#define NANO_GOTODIR_FKEY KEY_F(13) -#define NANO_GOTODIR_METAKEY NANO_META_G -#define NANO_TOGOTOLINE_KEY NANO_CONTROL_T -#define NANO_HELP_KEY NANO_CONTROL_G -#define NANO_HELP_FKEY KEY_F(1) -#define NANO_WHEREIS_KEY NANO_CONTROL_W -#define NANO_WHEREIS_FKEY KEY_F(6) -#define NANO_WHEREIS_NEXT_KEY NANO_META_W -#define NANO_WHEREIS_NEXT_FKEY KEY_F(16) -#define NANO_TOOTHERWHEREIS_KEY NANO_CONTROL_T -#define NANO_REGEXP_KEY NANO_META_R -#define NANO_REPLACE_KEY NANO_CONTROL_4 -#define NANO_REPLACE_FKEY KEY_F(14) -#define NANO_REPLACE_METAKEY NANO_META_R -#define NANO_TOOTHERSEARCH_KEY NANO_CONTROL_R -#define NANO_PREVPAGE_KEY NANO_CONTROL_Y -#define NANO_PREVPAGE_FKEY KEY_F(7) -#define NANO_NEXTPAGE_KEY NANO_CONTROL_V -#define NANO_NEXTPAGE_FKEY KEY_F(8) -#define NANO_CUT_KEY NANO_CONTROL_K -#define NANO_CUT_FKEY KEY_F(9) -#define NANO_COPY_KEY NANO_META_CARET -#define NANO_COPY_METAKEY NANO_META_6 -#define NANO_UNCUT_KEY NANO_CONTROL_U -#define NANO_UNCUT_FKEY KEY_F(10) -#define NANO_CURSORPOS_KEY NANO_CONTROL_C -#define NANO_CURSORPOS_FKEY KEY_F(11) -#define NANO_SPELL_KEY NANO_CONTROL_T -#define NANO_SPELL_FKEY KEY_F(12) -#define NANO_FIRSTLINE_KEY NANO_PREVPAGE_KEY -#define NANO_FIRSTLINE_FKEY NANO_PREVPAGE_FKEY -#define NANO_FIRSTLINE_METAKEY NANO_META_BACKSLASH -#define NANO_FIRSTLINE_METAKEY2 NANO_META_PIPE -#define NANO_FIRSTFILE_KEY NANO_FIRSTLINE_KEY -#define NANO_FIRSTFILE_FKEY NANO_FIRSTLINE_FKEY -#define NANO_FIRSTFILE_METAKEY NANO_FIRSTLINE_METAKEY -#define NANO_FIRSTFILE_METAKEY2 NANO_FIRSTLINE_METAKEY2 -#define NANO_LASTLINE_KEY NANO_NEXTPAGE_KEY -#define NANO_LASTLINE_FKEY NANO_NEXTPAGE_FKEY -#define NANO_LASTLINE_METAKEY NANO_META_SLASH -#define NANO_LASTLINE_METAKEY2 NANO_META_QUESTION -#define NANO_LASTFILE_KEY NANO_LASTLINE_KEY -#define NANO_LASTFILE_FKEY NANO_LASTLINE_FKEY -#define NANO_LASTFILE_METAKEY NANO_LASTLINE_METAKEY -#define NANO_LASTFILE_METAKEY2 NANO_LASTLINE_METAKEY2 -#define NANO_REFRESH_KEY NANO_CONTROL_L -#define NANO_JUSTIFY_KEY NANO_CONTROL_J -#define NANO_JUSTIFY_FKEY KEY_F(4) -#define NANO_UNJUSTIFY_KEY NANO_UNCUT_KEY -#define NANO_UNJUSTIFY_FKEY NANO_UNCUT_FKEY -#define NANO_PREVLINE_KEY NANO_CONTROL_P -#define NANO_NEXTLINE_KEY NANO_CONTROL_N -#define NANO_FORWARD_KEY NANO_CONTROL_F -#define NANO_BACK_KEY NANO_CONTROL_B -#define NANO_MARK_KEY NANO_CONTROL_6 -#define NANO_MARK_METAKEY NANO_META_A -#define NANO_MARK_FKEY KEY_F(15) -#define NANO_HOME_KEY NANO_CONTROL_A -#define NANO_END_KEY NANO_CONTROL_E -#define NANO_DELETE_KEY NANO_CONTROL_D -#define NANO_BACKSPACE_KEY NANO_CONTROL_H -#define NANO_TAB_KEY NANO_CONTROL_I -#define NANO_INDENT_KEY NANO_META_RCURLYBRACKET -#define NANO_UNINDENT_KEY NANO_META_LCURLYBRACKET -#define NANO_SUSPEND_KEY NANO_CONTROL_Z -#define NANO_ENTER_KEY NANO_CONTROL_M -#define NANO_TOFILES_KEY NANO_CONTROL_T -#define NANO_APPEND_KEY NANO_META_A -#define NANO_PREPEND_KEY NANO_META_P -#define NANO_PREVFILE_KEY NANO_META_LCARET -#define NANO_PREVFILE_METAKEY NANO_META_COMMA -#define NANO_NEXTFILE_KEY NANO_META_RCARET -#define NANO_NEXTFILE_METAKEY NANO_META_PERIOD -#define NANO_BRACKET_KEY NANO_META_RBRACKET -#define NANO_NEXTWORD_KEY NANO_CONTROL_SPACE -#define NANO_PREVWORD_KEY NANO_META_SPACE -#define NANO_WORDCOUNT_KEY NANO_META_D -#define NANO_SCROLLUP_KEY NANO_META_MINUS -#define NANO_SCROLLDOWN_KEY NANO_META_PLUS -#define NANO_SCROLLUP_METAKEY NANO_META_UNDERSCORE -#define NANO_SCROLLDOWN_METAKEY NANO_META_EQUALS -#define NANO_CUTTILLEND_METAKEY NANO_META_T -#define NANO_PARABEGIN_KEY NANO_CONTROL_W -#define NANO_PARABEGIN_METAKEY NANO_META_LPARENTHESIS -#define NANO_PARABEGIN_METAKEY2 NANO_META_9 -#define NANO_PARAEND_KEY NANO_CONTROL_O -#define NANO_PARAEND_METAKEY NANO_META_RPARENTHESIS -#define NANO_PARAEND_METAKEY2 NANO_META_0 -#define NANO_FULLJUSTIFY_KEY NANO_CONTROL_U -#define NANO_FULLJUSTIFY_METAKEY NANO_META_J -#define NANO_VERBATIM_KEY NANO_META_V - -/* Toggles do not exist if NANO_TINY is defined. */ -#ifndef NANO_TINY - -/* No toggle at all. */ -#define TOGGLE_NO_KEY -2 - -/* Normal toggles. */ -#define TOGGLE_NOHELP_KEY NANO_META_X -#define TOGGLE_CONST_KEY NANO_META_C -#define TOGGLE_MORESPACE_KEY NANO_META_O -#define TOGGLE_SMOOTH_KEY NANO_META_S -#define TOGGLE_WHITESPACE_KEY NANO_META_P -#define TOGGLE_SYNTAX_KEY NANO_META_Y -#define TOGGLE_SMARTHOME_KEY NANO_META_H -#define TOGGLE_AUTOINDENT_KEY NANO_META_I -#define TOGGLE_CUTTOEND_KEY NANO_META_K -#define TOGGLE_WRAP_KEY NANO_META_L -#define TOGGLE_TABSTOSPACES_KEY NANO_META_Q -#define TOGGLE_BACKUP_KEY NANO_META_B -#define TOGGLE_MULTIBUFFER_KEY NANO_META_F -#define TOGGLE_MOUSE_KEY NANO_META_M -#define TOGGLE_NOCONVERT_KEY NANO_META_N -#define TOGGLE_SUSPEND_KEY NANO_META_Z -#define TOGGLE_CASE_KEY NANO_META_C -#define TOGGLE_BACKWARDS_KEY NANO_META_B -#define TOGGLE_DOS_KEY NANO_META_D -#define TOGGLE_MAC_KEY NANO_META_M +#ifndef NANO_TINY /* Extra bits for the undo function. */ #define UNdel_del (1<<0) #define UNdel_backspace (1<<1) #define UNsplit_madenew (1<<2) - #endif /* !NANO_TINY */ #define VIEW TRUE