Subject: viper-mode disappears when switching to c++-mode using ESC-x but not when using M-x

From: Matthew Carter <[email-masked]>
Date: Wed, 23 Oct 2013 14:29:45 -0400

$ emacs --version
GNU Emacs 23.3.1

$ uname -a
Linux taurus 3.3.7-1.fc16.x86_64 #1 SMP Tue May 22 13:59:39 UTC 2012 
x86_64 x86_64 x86_64 GNU/Linux

$ cat .emacs
(setq viper-mode t)
(require 'viper)

$ cat .viper
(setq viper-no-multiple-ESC 'nil)
(setq viper-inhibit-startup-message 't)
(setq viper-expert-level '5)

$ ls > 1.cpp.ftl

Test 1:
$ emacs 1.cpp.ftl
Press and release the Esc key.
Press and release the x key.
Type "c++-mode" (without the quotes) and press Enter.
Result: Buffer switches to c++-mode but viper-mode is off.

Test 2:
$ emacs 1.cpp.ftl
Press and hold the Meta (Alt) key.
Press and release the x key.
Release the Meta (Alt) key.
Type "c++-mode" (without the quotes) and press Enter.
Result: Buffer switches to c++-mode but viper-mode is on.

I have reproduced these results with 2 different emacs installations 
on 2 different machines, one Linux, one Windows 7.

I expected, in Test 1, for the buffer to remain in viper-mode upon 
switching to c++-mode .  I believe that it is a defect that it lost 
viper-mode.

Please let me know if you have any questions.

Thank you.