GNU bug report logs - #4240
23.1.50; C-u doesn't work with Swedish characters

Previous Next

Package: emacs;

Reported by: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>

Date: Sun, 23 Aug 2009 13:35:04 UTC

Severity: normal

Merged with 4037

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> jurta.org>
To: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>
Cc: 4240 <at> debbugs.gnu.org
Subject: bug#4240: 23.1.50; C-u doesn't work with Swedish characters
Date: Sun, 23 Aug 2009 21:54:04 +0300
> I hit "C-u ä" expecting it to come out as "ääää".  Instead it comes out
> as "ä\344\344ä".  I try "C-u C-u ä" and it comes out as "ä" followed by
> fourteen "\344" and then a trailing "ä".  This happens no matter which
> kind of repetition I'm doing, be it using C-u or using e.g. M-3.  It's
> always the leading and the trailing character that come out right, all
> of the other ones are "broken".

Please see bug#4037:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4037

I received no confirmation that my proposed fix is correct.

Maybe the right fix is to reverse negation?  It seems logical to check
if a buffer is unibyte before converting from unibyte to multibyte, but
I don't understand what this code was supposed to do.

Index: src/cmds.c
===================================================================
RCS file: /sources/emacs/emacs/src/cmds.c,v
retrieving revision 1.107
diff -u -r1.107 cmds.c
--- src/cmds.c	13 Jul 2009 01:02:51 -0000	1.107
+++ src/cmds.c	10 Aug 2009 22:54:02 -0000
@@ -337,7 +337,7 @@
 	/* Add the offset to the character, for Finsert_char.
 	   We pass internal_self_insert the unmodified character
 	   because it itself does this offsetting.  */
-	if (! NILP (current_buffer->enable_multibyte_characters))
+	if (NILP (current_buffer->enable_multibyte_characters))
 	  modified_char = unibyte_char_to_multibyte (modified_char);
 
 	XSETFASTINT (n, XFASTINT (n) - 2);

-- 
Juri Linkov
http://www.jurta.org/emacs/



This bug report was last modified 15 years and 328 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.