diff options
-rw-r--r-- | usr.bin/mg/extend.c | 8 | ||||
-rw-r--r-- | usr.bin/mg/help.c | 9 | ||||
-rw-r--r-- | usr.bin/mg/ttykbd.c | 20 |
3 files changed, 19 insertions, 18 deletions
diff --git a/usr.bin/mg/extend.c b/usr.bin/mg/extend.c index 53c4385ee06..4c8d67d7965 100644 --- a/usr.bin/mg/extend.c +++ b/usr.bin/mg/extend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: extend.c,v 1.10 2001/05/23 20:57:54 art Exp $ */ +/* $OpenBSD: extend.c,v 1.11 2001/05/23 22:12:10 art Exp $ */ /* * Extended (M-X) commands, rebinding, and startup file processing. @@ -473,7 +473,7 @@ int bindtokey(f, n) int f, n; { - return dobind(map_table[0].p_map, "Global set key: ", FALSE); + return dobind(fundamental_map, "Global set key: ", FALSE); } /* @@ -514,7 +514,7 @@ int unbindtokey(f, n) int f, n; { - return dobind(map_table[0].p_map, "Global unset key: ", TRUE); + return dobind(fundamental_map, "Global unset key: ", TRUE); } int @@ -727,7 +727,7 @@ excline(line) #ifdef FKEYS if (fp == bindtokey || fp == unbindtokey) { bind = BINDARG; - curmap = map_table[0].p_map; + curmap = fundamental_map; } else if (fp == localbind || fp == localunbind) { bind = BINDARG; curmap = curbp->b_modes[curbp->b_nmodes]->p_map; diff --git a/usr.bin/mg/help.c b/usr.bin/mg/help.c index 301c2933556..cd4a15fb80e 100644 --- a/usr.bin/mg/help.c +++ b/usr.bin/mg/help.c @@ -1,4 +1,4 @@ -/* $OpenBSD: help.c,v 1.8 2001/05/23 21:47:33 art Exp $ */ +/* $OpenBSD: help.c,v 1.9 2001/05/23 22:12:10 art Exp $ */ /* * Help functions for Mg 2 @@ -115,7 +115,7 @@ wallchart(f, n) return FALSE; } if ((addline(bp, "Global bindings:") == FALSE) || - (showall(bp, map_table[0].p_map, "") == FALSE)) + (showall(bp, fundamental_map, "") == FALSE)) return FALSE; return popbuftop(bp); } @@ -190,11 +190,12 @@ apropos_command(f, n) fnames = complete_function_list("", NULL); for (el = fnames; el != NULL; el = el->l_next) { char buf[32]; + if (strstr(el->l_name, string) == NULL) continue; + buf[0] = '\0'; - findbind(name_map("fundamental"), - name_function(el->l_name), buf); + findbind(fundamental_map, name_function(el->l_name), buf); if (addlinef(bp, "%-32s%s", el->l_name, buf) == FALSE) { free_file_list(fnames); diff --git a/usr.bin/mg/ttykbd.c b/usr.bin/mg/ttykbd.c index beea2b80fda..f05c7be2466 100644 --- a/usr.bin/mg/ttykbd.c +++ b/usr.bin/mg/ttykbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttykbd.c,v 1.7 2001/01/29 01:58:10 niklas Exp $ */ +/* $OpenBSD: ttykbd.c,v 1.8 2001/05/23 22:12:10 art Exp $ */ /* * Name: MG 2a @@ -36,23 +36,23 @@ ttykeymapinit() #ifdef FKEYS /* Bind keypad function keys. */ if (key_left) - dobindkey(map_table[0].p_map, "backward-char", key_left); + dobindkey(fundamental_map, "backward-char", key_left); if (key_right) - dobindkey(map_table[0].p_map, "forward-char", key_right); + dobindkey(fundamental_map, "forward-char", key_right); if (key_up) - dobindkey(map_table[0].p_map, "previous-line", key_up); + dobindkey(fundamental_map, "previous-line", key_up); if (key_down) - dobindkey(map_table[0].p_map, "next-line", key_down); + dobindkey(fundamental_map, "next-line", key_down); if (key_beg) - dobindkey(map_table[0].p_map, "beginning-of-line", key_beg); + dobindkey(fundamental_map, "beginning-of-line", key_beg); else if (key_home) - dobindkey(map_table[0].p_map, "beginning-of-line", key_home); + dobindkey(fundamental_map, "beginning-of-line", key_home); if (key_end) - dobindkey(map_table[0].p_map, "end-of-line", key_end); + dobindkey(fundamental_map, "end-of-line", key_end); if (key_npage) - dobindkey(map_table[0].p_map, "scroll-up", key_npage); + dobindkey(fundamental_map, "scroll-up", key_npage); if (key_ppage) - dobindkey(map_table[0].p_map, "scroll-down", key_ppage); + dobindkey(fundamental_map, "scroll-down", key_ppage); #endif /* FKEYS */ #ifndef NO_STARTUP |