X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=init.c;h=1c870b5745dc4200c3bc348b165a3f2b1224834b;hp=37f878166ed421ed41bac8703bf06378145eeefc;hb=62781e50bfc69cf85be21ec9a18aeb32ef789952;hpb=ee1d4d931ca3ebec494694b74a1868a7a2e631e3 diff --git a/init.c b/init.c index 37f8781..1c870b5 100644 --- a/init.c +++ b/init.c @@ -41,6 +41,8 @@ #include #include +list2_t* Synonyms; + void toggle_quadoption (int opt) { int n = opt / 4; @@ -91,9 +93,12 @@ int mutt_option_index (char *s) int i; for (i = 0; MuttVars[i].option; i++) - if (safe_strcmp (s, MuttVars[i].option) == 0) + if (safe_strcmp (s, MuttVars[i].option) == 0) { + if (MuttVars[i].type == DT_SYN) + list_push_back (&Synonyms, &MuttVars[i]); return (MuttVars[i].type == DT_SYN ? mutt_option_index ((char *) MuttVars[i].data) : i); + } return (-1); } @@ -2282,6 +2287,19 @@ void mutt_init (int skip_sys_rc, LIST * commands) if (mutt_execute_commands (commands) != 0) need_pause = 1; + /* warn about synonym variables */ + if (!list_empty(Synonyms)) { + int i = 0; + fprintf (stderr, _("Warning: the following synonym variables were found:\n")); + for (i = 0; i < Synonyms->length; i++) + fprintf (stderr, "$%s ($%s should be used)\n", + ((struct option_t*) Synonyms->data[i])->option, + (char*) ((struct option_t*) Synonyms->data[i])->data); + fprintf (stderr, _("Warning: Synonym variables are scheduled for removal.\n")); + list_del (&Synonyms, NULL); + need_pause = 1; + } + if (need_pause && !option (OPTNOCURSES)) { if (mutt_any_key_to_continue (NULL) == -1) mutt_exit (1);