* Problems binding keys
@ 2003-11-23 22:03 Dan Anderson
2003-11-23 22:51 ` Sean Richards
2003-11-23 22:58 ` Sean Richards
0 siblings, 2 replies; 3+ messages in thread
From: Dan Anderson @ 2003-11-23 22:03 UTC (permalink / raw)
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?
Thanks,
Dan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems binding keys
2003-11-23 22:03 Problems binding keys Dan Anderson
@ 2003-11-23 22:51 ` Sean Richards
2003-11-23 22:58 ` Sean Richards
1 sibling, 0 replies; 3+ messages in thread
From: Sean Richards @ 2003-11-23 22:51 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems binding keys
2003-11-23 22:03 Problems binding keys Dan Anderson
2003-11-23 22:51 ` Sean Richards
@ 2003-11-23 22:58 ` Sean Richards
1 sibling, 0 replies; 3+ messages in thread
From: Sean Richards @ 2003-11-23 22:58 UTC (permalink / raw)
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?
Try (global-set-key ("C-c f") 'font-lock-mode)
Note the ' in front of font-lock-mode.
Sean
--
"Hver sin smak", sa vintapperen, han drakk mens de andre sloss.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-11-23 22:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-23 22:03 Problems binding keys Dan Anderson
2003-11-23 22:51 ` Sean Richards
2003-11-23 22:58 ` Sean Richards
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.