From: Karl Heuer Date: Sun, 22 Feb 1998 01:06:06 +0000 (+0000) Subject: (Fdelete_backward_char): Count both bytes and chars. X-Git-Tag: emacs-20.3~2116 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ceb7e4f8e7946d6225f82d497cc46a05f4b49340;p=emacs.git (Fdelete_backward_char): Count both bytes and chars. --- diff --git a/src/cmds.c b/src/cmds.c index 4dedbf6a609..ba7745ac814 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -235,18 +235,19 @@ N was explicitly specified.") { Lisp_Object value; int deleted_special = 0; - int pos, i; + int pos, pos_byte, i; CHECK_NUMBER (n, 0); /* See if we are about to delete a tab or newline backwards. */ - pos = PT_BYTE; - for (i = 0; i < XINT (n) && pos > BEGV_BYTE; i++) + pos = PT; + pos_byte = PT_BYTE; + for (i = 0; i < XINT (n) && pos_byte > BEGV_BYTE; i++) { int c; - DEC_POS (pos); - c = FETCH_BYTE (pos); + DEC_BOTH (pos, pos_byte); + c = FETCH_BYTE (pos_byte); if (c == '\t' || c == '\n') { deleted_special = 1;