[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

improve the behavior of overwrite mode (mainly for CJK users)

From: K. Handa
Subject: improve the behavior of overwrite mode (mainly for CJK users)
Date: Sat, 02 May 2015 11:13:00 +0900

Oops, I forgot to attach the patch in my previuos mail.  Here it is.

2015-05-02  K. Handa  <address@hidden>

        * cmds.c (internal_self_insert): When we insert spaces for
        padding, set point before the padding spaces, not after them.

--- a/src/cmds.c
+++ b/src/cmds.c
@@ -473,7 +473,7 @@ internal_self_insert (int c, EMACS_INT n)
       replace_range (PT, PT + chars_to_delete, string, 1, 1, 1);
-      Fforward_char (make_number (n + spaces_to_insert));
+      Fforward_char (make_number (n));
   else if (n > 1)

K. Handa

I wrote;
> I've got a report from a Japanese Emacs user proposing to change the
> behavior of self-insert-command in overwrite mode.  Provided that we
> have something like the following line (CJK double-width characters),
>    あいうえお
> point is at 'あ', and we are in overwrite mode, typing "aaaa" results in:
>    a a a a お
> but typing "\C-uaaaa" results in:
>    aaaaうえお
> The proposal is to make the former attempt result in the same as the
> latter.  I too agree that it is more intuitive.  Attached is the patch
> for that.  Shall I install it?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]