summaryrefslogtreecommitdiffstats
path: root/compose.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-10-12 19:53:42 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-10-12 19:53:42 +0000
commit187ac0ce86e8aa5f8103fedfc68f2ca7acf2137c (patch)
tree4963c8671ed6b33d9a8856c3590c18c5c09c919c /compose.c
parentd6b1a4d9eccd565bbafa82aee1dfbf085a4f47e2 (diff)
The attached patch removes some redundant code related to the macro
function stuff. Since each menu calls km_dokey() to get the 'op' number to execute, the 'menu' argument to km_dokey() _is_ the CurrentMenu. Hence, there is no need to explicitly save/restore the CurrentMenu all over the code. The only places it is being captured now is just before mutt_enter_comamnd() is called. This is to help the 'exec' command completion code so that it knows which menu to try and complete the function name from. (From: Vikas Agnihotri <VikasA@att.com>)
Diffstat (limited to 'compose.c')
-rw-r--r--compose.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/compose.c b/compose.c
index 263bedc5..89c9d817 100644
--- a/compose.c
+++ b/compose.c
@@ -438,12 +438,11 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */
/* Sort, SortAux could be changed in mutt_index_menu() */
int oldSort = Sort, oldSortAux = SortAux;
struct stat st;
- int savedmenu = CurrentMenu;
idx = mutt_gen_attach_list (msg->content, idx, &idxlen, &idxmax, 0, 1);
menu = mutt_new_menu ();
- menu->menu = CurrentMenu = MENU_COMPOSE;
+ menu->menu = MENU_COMPOSE;
menu->offset = HDR_ATTACH;
menu->max = idxlen;
menu->make_entry = snd_entry;
@@ -1109,7 +1108,6 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */
}
mutt_menuDestroy (&menu);
- CurrentMenu = savedmenu;
if (idxlen)
{