help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems binding keys


From: Sean Richards
Subject: Re: Problems binding keys
Date: Mon, 24 Nov 2003 11:51:01 +1300
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (windows-nt)

Dan Anderson <dan@mathjunkies.com> writes:

> I'm trying to figure  out how to bind some keys and  place the LISP in
> my .emacs.  I  can't figure out how to use  the "vectors" to represent
> keys.  For instance, I think the following should work:
>
> (global-set-key "C-c f" font-lock-mode)
>
> But I just get a bunch of lisp errors. 
>
> What am I doing wrong?

Using vector notation means just that, enclosing the characters that
represent the key sequence inside a vector [].
 
I think the following would probably be better :)

(global-set-key (kbd "C-c f") 'font-lock-mode)

You need the ' in front of font-lock-mode as otherwise it is evaluated
as a variable (I think). 

-- 
Sean Richards

Applied Management and Computing Division
P.O. Box 84, Lincoln University,
Canterbury, New Zealand
Phone:    (64)(3) 3252-811 ext 8015
Email:      richars3@lincoln.ac.nz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]