unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* viper mode "r" command and swedish character ö
@ 2006-01-22 22:57 Lennart Borgman
  2006-01-24 20:42 ` Lennart Borgman
  0 siblings, 1 reply; 2+ messages in thread
From: Lennart Borgman @ 2006-01-22 22:57 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: viper mode "r" command and swedish character ö
  2006-01-22 22:57 viper mode "r" command and swedish character ö Lennart Borgman
@ 2006-01-24 20:42 ` Lennart Borgman
  0 siblings, 0 replies; 2+ messages in thread
From: Lennart Borgman @ 2006-01-24 20:42 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-24 20:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-22 22:57 viper mode "r" command and swedish character ö Lennart Borgman
2006-01-24 20:42 ` Lennart Borgman

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).