[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do you set a key in all buffers except the minibuffer?
From: |
Pascal J. Bourguignon |
Subject: |
Re: How do you set a key in all buffers except the minibuffer? |
Date: |
Wed, 08 Dec 2010 15:18:18 -0000 |
User-agent: |
Gnus/5.101 (Gnus v5.10.10) Emacs/23.2 (gnu/linux) |
Elena <egarrulo@gmail.com> writes:
> Hello,
>
> I wonder how do you set a key in all buffers except the minibuffer?
> After reading the ELisp reference, I've tried this:
>
> (global-set-key (kbd "C-l") 'my-command)
> (define-key minibuffer-local-map (kbd "C-l") nil)
>
> but it doesn't work.
>
> Any hints? Thanks.
Probably because when a key is bound to nil, it's searched in the global map?
My guess would be to try it with:
(global-set-key (kbd "C-l") 'my-command)
(define-key minibuffer-local-map (kbd "C-l") (lambda () (interactive) (beep)))
--
__Pascal Bourguignon__ http://www.informatimago.com/