From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rodrigo Canellas Newsgroups: gmane.emacs.help Subject: defun in global-set-key Date: Sun, 14 Nov 2004 12:40:08 -0200 Message-ID: <200411141240.09071.r.canellas@terra.com.br> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1100443437 18418 80.91.229.6 (14 Nov 2004 14:43:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 14 Nov 2004 14:43:57 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 14 15:43:46 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CTLbW-0004uQ-00 for ; Sun, 14 Nov 2004 15:43:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTLkA-0005Rp-Kw for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Nov 2004 09:52:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTLk2-0005Ra-Qj for help-gnu-emacs@gnu.org; Sun, 14 Nov 2004 09:52:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTLk1-0005RO-98 for help-gnu-emacs@gnu.org; Sun, 14 Nov 2004 09:52:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTLk1-0005RL-7o for help-gnu-emacs@gnu.org; Sun, 14 Nov 2004 09:52:33 -0500 Original-Received: from [200.154.55.227] (helo=itapoa.terra.com.br) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CTLbF-0000UO-VT for help-gnu-emacs@gnu.org; Sun, 14 Nov 2004 09:43:30 -0500 Original-Received: from merida.terra.com.br (merida.terra.com.br [200.154.55.132]) by itapoa.terra.com.br (Postfix) with ESMTP id 7ECE230C1C3 for ; Sun, 14 Nov 2004 12:43:27 -0200 (BRST) X-Terra-Karma: -2% X-Terra-Hash: b115f2f6abce70d8d9246ba5060dcfef Original-Received: from 160228254.rjo.virtua.com.br (160228254.rjo.virtua.com.br [200.160.228.254]) (authenticated user r.canellas) by merida.terra.com.br (Postfix) with ESMTP id 4C14A3C00B for ; Sun, 14 Nov 2004 12:43:27 -0200 (BRST) Original-To: help-gnu-emacs@gnu.org User-Agent: KMail/1.6.2 Content-Disposition: inline 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: main.gmane.org gmane.emacs.help:21964 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21964 hi, I defined this in '.emacs' this function: (defun indent-all (interactive) () (mark-whole-buffer) (indent-region) ) and associated to a key: (global-set-key [f2] 'indent-all) But when I load a file and press F2, the whole buffer is selected, but the 'indent-region' fails, and a long and uncompreensible message is displayed in the mini-buffer. Does anyone know what am I doing wrong? Thanks, Rodrigo