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: =?iso-8859-1?q?Re=3A_viper_mode_=22r=22_command_and_swedish_char?= =?iso-8859-1?q?acter_=F6?= Date: Tue, 24 Jan 2006 21:42:59 +0100 Message-ID: <43D69153.40000@student.lu.se> References: <43D40DC6.2010606@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: Quoted-Printable X-Trace: sea.gmane.org 1138142223 8800 80.91.229.2 (24 Jan 2006 22:37:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Jan 2006 22:37:03 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 24 23:36:59 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 1F1WmJ-0006JZ-UK for ged-emacs-devel@m.gmane.org; Tue, 24 Jan 2006 23:36:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F1Wp0-0006o3-Ni for ged-emacs-devel@m.gmane.org; Tue, 24 Jan 2006 17:39:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F1WkQ-00058q-S0 for emacs-devel@gnu.org; Tue, 24 Jan 2006 17:34:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F1WkP-00057y-IL for emacs-devel@gnu.org; Tue, 24 Jan 2006 17:34:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F1Wa0-0001pW-FN for emacs-devel@gnu.org; Tue, 24 Jan 2006 17:24:00 -0500 Original-Received: from [81.228.11.98] (helo=pne-smtpout1-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1F1V9W-00009k-UX for emacs-devel@gnu.org; Tue, 24 Jan 2006 15:52:39 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout1-sn1.fre.skanova.net (7.2.069.1) id 43D492980008CFA3; Tue, 24 Jan 2006 21:43:00 +0100 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: Emacs Devel , Michael Kifer In-Reply-To: <43D40DC6.2010606@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:49496 Archived-At: Lennart Borgman wrote: > I start Emacs with > > emacs -Q > > and type some text in the *Scratch* buffer. Then I switch to > > M-x viper-mode > > and type "r" (for `viper-replace-char') and then the swedish letter=20 > "=F6". The screen now instead of "=F6" shows \366. > > This is with GNU Emacs 22.0.50.1 (i386-mingw-nt5.0.2195) of=20 > 2006-01-06. C-h C gives: > > Coding system for saving this buffer: > Not set locally, use the default. > Default coding system (for new files): > 1 -- iso-latin-1 (alias: iso-8859-1 latin-1) > > Coding system for keyboard input: > * -- cp1252 (alias of windows-1252) > > Coding system for terminal output: > * -- cp1252 (alias of windows-1252) > > Defaults for subprocess I/O: > decoding: - -- undecided-dos > > encoding: - -- undecided-unix Since no one has answered yet I give some more information: This seems to be a problem in `viper-special-read-and-insert-char'. The=20 part of this function that is affected does first a `read-char' and then=20 `insert' using that char. Something like this: (defun test-read-char-insert() (let (ch) (setq ch (read-char)) (insert ch))) Since `self-insert' does what is needed. I tested this instead: (defun test-read-char-self-insert() (let (ch) (setq ch (read-char)) (let ((last-command-char ch)) (self-insert-command 1)) )) This seems to work, but I do not know if this is the correct kind of cure= =2E