summaryrefslogtreecommitdiff
path: root/bin/ksh/emacs.c
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2017-11-26 20:34:16 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2017-11-26 20:34:16 +0000
commit67017bf21b16541c42b8f2842109697a3a177a9a (patch)
tree387f0841c22fefc245cb82b50e54436dc840f0f0 /bin/ksh/emacs.c
parent289047522ac56d8448c11cece23de2cb8ca631f8 (diff)
Remove the "version" interactive function in emacs mode.
Not bound by default and not very useful. ok schwarze@ anton@
Diffstat (limited to 'bin/ksh/emacs.c')
-rw-r--r--bin/ksh/emacs.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c
index 86caa1b87c4..07bfbd91458 100644
--- a/bin/ksh/emacs.c
+++ b/bin/ksh/emacs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emacs.c,v 1.74 2017/11/22 12:17:34 anton Exp $ */
+/* $OpenBSD: emacs.c,v 1.75 2017/11/26 20:34:15 jca Exp $ */
/*
* Emacs-like command line editing and history
@@ -186,7 +186,6 @@ static int x_search_char_back(int);
static int x_search_hist(int);
static int x_set_mark(int);
static int x_transpose(int);
-static int x_version(int);
static int x_xchg_point_mark(int);
static int x_yank(int);
static int x_comp_list(int);
@@ -243,7 +242,6 @@ static const struct x_ftab x_ftab[] = {
{ x_search_hist, "search-history", 0 },
{ x_set_mark, "set-mark-command", 0 },
{ x_transpose, "transpose-chars", 0 },
- { x_version, "version", 0 },
{ x_xchg_point_mark, "exchange-point-and-mark", 0 },
{ x_yank, "yank", 0 },
{ x_comp_list, "complete-list", 0 },
@@ -1623,35 +1621,6 @@ x_xchg_point_mark(int c)
}
static int
-x_version(int c)
-{
- char *o_xbuf = xbuf, *o_xend = xend;
- char *o_xbp = xbp, *o_xep = xep, *o_xcp = xcp;
- int lim = x_lastcp() - xbp;
-
- xbuf = xbp = xcp = (char *) ksh_version + 4;
- xend = xep = (char *) ksh_version + 4 + strlen(ksh_version + 4);
- x_redraw(lim);
- x_flush();
-
- c = x_e_getc();
- xbuf = o_xbuf;
- xend = o_xend;
- xbp = o_xbp;
- xep = o_xep;
- xcp = o_xcp;
- x_redraw(strlen(ksh_version));
-
- if (c < 0)
- return KSTD;
- /* This is what at&t ksh seems to do... Very bizarre */
- if (c != ' ')
- x_e_ungetc(c);
-
- return KSTD;
-}
-
-static int
x_noop(int c)
{
return KSTD;