In article <[EMAIL PROTECTED]>, JS <[EMAIL PROTECTED]> 
wrote:

> 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 
> 
> To ensure normal operation, you should investigate the cause
> of the error in your initialization file and remove it.  Start
> Emacs with the `--debug-init' option to view a complete error
> backtrace
> Loading view...done
> 
> ------------------------
> 
> 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 )

It looks to me like there's a strange character in your file after 
'global-set-key', so it's trying to find a function named 
global-set-key<strangechar>.  Notice the space before the close-paren -- 
that's not normal.  Normally Emacs Lisp will escape space characters in 
symbol names, so I suspect it's an international character that happens 
to look like space.

>   (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 " …—
> ----------------------------
> 
> 
> Why is it not possible to write the second statement?

-- 
Barry Margolin, [EMAIL PROTECTED]
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to