From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: JS Newsgroups: gmane.emacs.help Subject: Problems with global-set-key Date: Fri, 22 Apr 2005 11:18:44 +0200 Organization: UNI-C Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit X-Trace: sea.gmane.org 1114161385 6120 80.91.229.2 (22 Apr 2005 09:16:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 22 Apr 2005 09:16:25 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 22 11:16:24 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DOuG1-0002fe-3e for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Apr 2005 11:15:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOuKt-0007cm-RR for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Apr 2005 05:20:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!uninett.no!news.net.uni-c.dk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: 130.225.245.182 Original-X-Trace: news.net.uni-c.dk 1114161426 10462 130.225.245.182 (22 Apr 2005 09:17:06 GMT) Original-X-Complaints-To: usenet@news.net.uni-c.dk Original-NNTP-Posting-Date: Fri, 22 Apr 2005 09:17:06 +0000 (UTC) User-Agent: KNode/0.7.7 Original-Xref: shelby.stanford.edu gnu.emacs.help:130360 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:25931 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25931 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 ) (global-set-key  "á"   (quote comment-dwim)) eval-buffer(# 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?