Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Every time I try to load viper-mode in Emacs24 using M-x viper-mode, I get error

Wrong type argument: symbolp, (quote 3)

I have observed it happens when I try to load viper-mode for the after opening Emacs or after I have issued M-x viper-go-away

So once I get this error and run the same command again, viper-mode loads successfully.

When I use toggle-viper-mode to turn it off, viper-mode goes away successfully. But when I try to turn it back on using toggle-viper-mode again, I get the above stated error. I have to use viper-go-away and then M-x viper-mode twice to get it back working.

How can I get rid of this error?

share|improve this question
1  
The kbd markup is usually used to denote (single) keyboard keys ;) –  Oliver Salzburg Jun 4 '12 at 16:36
1  
If you want to, you can debug the error by evaluating (setq debug-on-error t) before the error happens, but it may help to have the functions in question loaded in uncompiled (.el) form first. You can do that by visiting the source file(s) and typing M-x eval-current-buffer RET in each one. –  Fran Jun 5 '12 at 16:43
    
Thanks Fran, it helped. –  Andrew-Dufresne Jun 5 '12 at 19:17

1 Answer 1

up vote 0 down vote accepted

With the help of Fran comment, I was able to resolve the problem.

I placed, (setq debug-on-error t) in scratch file and evaluated it. Then I loaded the viper-mode. I got a 14 line output. The relevant part is

Debugger entered--Lisp error: (wrong-type-argument symbolp (quote 3))
(setq viper-expert-level (quote 3) (quote 3) (quote 3) (quote 3) (quote 3) (quote 5) (quote 3) (quote 3) (quote 3) (quote 5) (quote 3))
eval-buffer(# nil "/Users/andy/.viper" nil t) ; Reading at buffer position 60
load-with-code-conversion("/Users/andy/.viper" "/Users/andy/.viper" nil nil) load("~/.viper")

I didn't know there is a .viper file present in home directory. For some unknown reason it's first line was

(setq viper-expert-level '3 '3 '3 '3 '3 '5 '3 '3 '3 '5 '3)
(setq viper-inhibit-startup-message 't)

I edited the first line and the problem got solved:

(setq viper-expert-level '3)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.