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

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

Re: Problems with global-set-key


From: Tim X
Subject: Re: Problems with global-set-key
Date: Fri, 22 Apr 2005 20:31:32 +1000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

JS <address@hidden> writes:

> In my .emacs file I have made this:
>
> (global-set-key "\C-z" 'shell)
>
> And it works fine when I restart emacs.
>
>
>
>
> But when I do this:
>
> (global-set-key "\M-a" 'comment-dwim)
>
> I get this error when I restart:
>
>
>
>
> An error has occurred while loading `/home/johs/.emacs':
>
> Symbol's function definition is void: global-set-key 
>
> ------------------------
>
> I have then tried to start emacs like this: emacs --debug-init and then I
> get this:
>
> Debugger entered--Lisp error: (void-function global-set-key )
>   (global-set-key  "á"   (quote comment-dwim))
>   eval-buffer(#<buffer  *load*> nil "~/.emacs" nil t)
>   load-with-code-conversion("/home/johs/.emacs" "~/.emacs" t t)
>   load("~/.emacs" t t)
>   #[nil " —
> ----------------------------
Can you execute the command witin *scratch*?

If so, maybe you need to do a (require 'newcomment) to make sure the
definition for cmment-dwim is loaded before the key binding is used?


Tim

-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!


reply via email to

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