From 67017bf21b16541c42b8f2842109697a3a177a9a Mon Sep 17 00:00:00 2001 From: Jeremie Courreges-Anglas Date: Sun, 26 Nov 2017 20:34:16 +0000 Subject: Remove the "version" interactive function in emacs mode. Not bound by default and not very useful. ok schwarze@ anton@ --- bin/ksh/emacs.c | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'bin/ksh/emacs.c') 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 }, @@ -1622,35 +1620,6 @@ x_xchg_point_mark(int c) return KSTD; } -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) { -- cgit v1.2.3