# HG changeset patch # User Richard M. Stallman # Date 730544365 0 # Node ID e7b8107294b72e8ca19cbafb95f99c8abefd760d # Parent ba1e55a4ba76630d6014294250480ae17f81d0e0 (syms_of_cmds): New var `overwrite-binary-mode'. (internal_self_insert): Handle that var. diff -r ba1e55a4ba76 -r e7b8107294b7 src/cmds.c --- a/src/cmds.c Tue Feb 23 18:49:33 1993 +0000 +++ b/src/cmds.c Wed Feb 24 08:59:25 1993 +0000 @@ -26,6 +26,7 @@ Lisp_Object Qkill_forward_chars, Qkill_backward_chars, Vblink_paren_function; +int overwrite_binary_mode; DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "p", "Move point right ARG characters (left if ARG negative).\n\ @@ -277,8 +278,9 @@ if (!NILP (current_buffer->overwrite_mode) && point < ZV - && c != '\n' && FETCH_CHAR (point) != '\n' - && (FETCH_CHAR (point) != '\t' + && (overwrite_binary_mode || (c != '\n' && FETCH_CHAR (point) != '\n')) + && (overwrite_binary_mode + || FETCH_CHAR (point) != '\t' || XINT (current_buffer->tab_width) <= 0 || !((current_column () + 1) % XFASTINT (current_buffer->tab_width)))) { @@ -332,6 +334,12 @@ Qkill_forward_chars = intern ("kill-forward-chars"); staticpro (&Qkill_forward_chars); + DEFVAR_BOOL ("overwrite-binary-mode", &overwrite_binary_mode, + "*Non-nil means overwrite mode treats tab and newline normally.\n\ +Ordinarily, overwriting preserves a tab until its whole width is overwritten\n\ +and never replaces a newline."); + overwrite_tabs_mode = 1; + DEFVAR_LISP ("blink-paren-function", &Vblink_paren_function, "Function called, if non-nil, whenever a close parenthesis is inserted.\n\ More precisely, a char with closeparen syntax is self-inserted.");