diff options
Diffstat (limited to 'lib/libedit/emacs.c')
-rw-r--r-- | lib/libedit/emacs.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/libedit/emacs.c b/lib/libedit/emacs.c index 273de107..a3a1975 100644 --- a/lib/libedit/emacs.c +++ b/lib/libedit/emacs.c @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)emacs.c 8.1 (Berkeley) 6/4/93"; #endif /* not lint && not SCCSID */ -/* +/* * emacs.c: Emacs functions */ #include "sys.h" @@ -90,7 +90,7 @@ em_delete_next_word(el, c) if (el->el_line.cursor == el->el_line.lastchar) return CC_ERROR; - cp = c__next_word(el->el_line.cursor, el->el_line.lastchar, + cp = c__next_word(el->el_line.cursor, el->el_line.lastchar, el->el_state.argument, ce__isword); for (p = el->el_line.cursor, kp = el->el_chared.c_kill.buf; p < cp; p++) @@ -120,8 +120,8 @@ em_yank(el, c) if (el->el_chared.c_kill.last == el->el_chared.c_kill.buf) return CC_ERROR; - if (el->el_line.lastchar + - (el->el_chared.c_kill.last - el->el_chared.c_kill.buf) >= + if (el->el_line.lastchar + + (el->el_chared.c_kill.last - el->el_chared.c_kill.buf) >= el->el_line.limit) return CC_ERROR; @@ -129,13 +129,13 @@ em_yank(el, c) cp = el->el_line.cursor; /* open the space, */ - c_insert(el, el->el_chared.c_kill.last - el->el_chared.c_kill.buf); + c_insert(el, el->el_chared.c_kill.last - el->el_chared.c_kill.buf); /* copy the chars */ - for (kp = el->el_chared.c_kill.buf; kp < el->el_chared.c_kill.last; kp++) + for (kp = el->el_chared.c_kill.buf; kp < el->el_chared.c_kill.last; kp++) *cp++ = *kp; /* if an arg, cursor at beginning else cursor at end */ - if (el->el_state.argument == 1) + if (el->el_state.argument == 1) el->el_line.cursor = cp; return CC_REFRESH; @@ -251,7 +251,7 @@ em_gosmacs_traspose(el, c) el->el_line.cursor[-1] = c; return CC_REFRESH; } - else + else return CC_ERROR; } @@ -269,11 +269,11 @@ em_next_word(el, c) if (el->el_line.cursor == el->el_line.lastchar) return CC_ERROR; - el->el_line.cursor = c__next_word(el->el_line.cursor, el->el_line.lastchar, + el->el_line.cursor = c__next_word(el->el_line.cursor, el->el_line.lastchar, el->el_state.argument, ce__isword); - if (el->el_map.type == MAP_VI) + if (el->el_map.type == MAP_VI) if (el->el_chared.c_vcmd.action & DELETE) { cv_delfini(el); return CC_REFRESH; @@ -294,7 +294,7 @@ em_upper_case(el, c) { char *cp, *ep; - ep = c__next_word(el->el_line.cursor, el->el_line.lastchar, + ep = c__next_word(el->el_line.cursor, el->el_line.lastchar, el->el_state.argument, ce__isword); for (cp = el->el_line.cursor; cp < ep; cp++) @@ -320,7 +320,7 @@ em_capitol_case(el, c) { char *cp, *ep; - ep = c__next_word(el->el_line.cursor, el->el_line.lastchar, + ep = c__next_word(el->el_line.cursor, el->el_line.lastchar, el->el_state.argument, ce__isword); for (cp = el->el_line.cursor; cp < ep; cp++) { @@ -353,7 +353,7 @@ em_lower_case(el, c) { char *cp, *ep; - ep = c__next_word(el->el_line.cursor, el->el_line.lastchar, + ep = c__next_word(el->el_line.cursor, el->el_line.lastchar, el->el_state.argument, ce__isword); for (cp = el->el_line.cursor; cp < ep; cp++) @@ -383,7 +383,7 @@ em_set_mark(el, c) /* em_exchange_mark(): - * Exchange the cursor and mark + * Exchange the cursor and mark * [^X^X] */ protected el_action_t @@ -427,7 +427,7 @@ em_meta_next(el, c) EditLine *el; int c; { - el->el_state.metanext = 1; + el->el_state.metanext = 1; return CC_ARGHACK; } @@ -441,7 +441,7 @@ em_toggle_overwrite(el, c) EditLine *el; int c; { - el->el_state.inputmode = + el->el_state.inputmode = (el->el_state.inputmode == MODE_INSERT) ? MODE_REPLACE : MODE_INSERT; return CC_NORM; } @@ -463,8 +463,8 @@ em_copy_prev_word(el, c) oldc = el->el_line.cursor; /* does a bounds check */ - cp = c__prev_word(el->el_line.cursor, el->el_line.buffer, - el->el_state.argument, ce__isword); + cp = c__prev_word(el->el_line.cursor, el->el_line.buffer, + el->el_state.argument, ce__isword); c_insert(el, oldc - cp); for (dp = oldc; cp < oldc && dp < el->el_line.lastchar; cp++) |