From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Problem with viper-replace-char and Swedish characters on w32 Date: Wed, 29 Mar 2006 21:37:43 +0200 Message-ID: <442AE207.6000802@student.lu.se> References: <4423DA03.2040503@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: Quoted-Printable X-Trace: sea.gmane.org 1143661087 8175 80.91.229.2 (29 Mar 2006 19:38:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Mar 2006 19:38:07 +0000 (UTC) Cc: Michael Kifer , Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 29 21:38:05 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FOgUQ-0008C9-LG for ged-emacs-devel@m.gmane.org; Wed, 29 Mar 2006 21:37:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FOgUQ-0005Vo-35 for ged-emacs-devel@m.gmane.org; Wed, 29 Mar 2006 14:37:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FOgUF-0005Vj-1k for emacs-devel@gnu.org; Wed, 29 Mar 2006 14:37:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FOgUD-0005VX-QD for emacs-devel@gnu.org; Wed, 29 Mar 2006 14:37:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FOgUD-0005VU-NY for emacs-devel@gnu.org; Wed, 29 Mar 2006 14:37:45 -0500 Original-Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FOgWE-0004eN-2O for emacs-devel@gnu.org; Wed, 29 Mar 2006 14:39:50 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn1.fre.skanova.net (7.2.070) id 43F9B8E90091DF7B; Wed, 29 Mar 2006 21:37:44 +0200 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: Lennart Borgman In-Reply-To: <4423DA03.2040503@student.lu.se> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52192 Archived-At: Lennart Borgman wrote: > This is for Emacs on w32. There is a problem in viper when replacing a=20 > character (using the "r" command - `viper-repace-char') with a Swedish=20 > character. (For example =C3=B6 which is an o with two dots above.) > > I am using Swedish keyboard layout. Under w2k this is set in Control=20 > Panel - Regional Settings - Input Locales - Keyboard Layout. I have=20 > tested two different locales, which gives different results below. The=20 > locales are found under ... - Regional Settings - General - Your Locale= =2E > > ... Since no one has answered I will try to restate the question in a more=20 general and simple manner: The user is prompted for a single character=20 and this character should then be inserted in the buffer. The question=20 is how this should be done. The current code in viper does AFAICS=20 something similar to (insert (read-char "char: ")) This gives incorrect display of character if it is a Swedish character=20 (like o with two dots above) under the conditions I explained before=20 (Swedish keyboard, Local English). The code below gives the desired resul= t: (let ((last-command-char (read-char "c:"))) (self-insert-command 1)) Is this the correct way to do it?