unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Subject: Re: viper mode "r" command and swedish character ö
Date: Tue, 24 Jan 2006 21:42:59 +0100	[thread overview]
Message-ID: <43D69153.40000@student.lu.se> (raw)
In-Reply-To: <43D40DC6.2010606@student.lu.se>

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 
> "ö". The screen now instead of "ö" shows \366.
>
> This is with GNU Emacs 22.0.50.1 (i386-mingw-nt5.0.2195) of 
> 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 
part of this function that is affected does first a `read-char' and then 
`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.

      reply	other threads:[~2006-01-24 20:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-22 22:57 viper mode "r" command and swedish character ö Lennart Borgman
2006-01-24 20:42 ` Lennart Borgman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43D69153.40000@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).