Mercurial > emacs
changeset 1948:e7b8107294b7
(syms_of_cmds): New var `overwrite-binary-mode'.
(internal_self_insert): Handle that var.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 24 Feb 1993 08:59:25 +0000 |
parents | ba1e55a4ba76 |
children | a81c98f793b6 |
files | src/cmds.c |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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.");