[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
defun in global-set-key
From: |
Rodrigo Canellas |
Subject: |
defun in global-set-key |
Date: |
Sun, 14 Nov 2004 12:40:08 -0200 |
User-agent: |
KMail/1.6.2 |
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
- defun in global-set-key,
Rodrigo Canellas <=