unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How do you set a key in all buffers except the minibuffer?
@ 2010-07-09 23:19 Elena
  2010-07-10 14:24 ` Pascal J. Bourguignon
  0 siblings, 1 reply; 2+ messages in thread
From: Elena @ 2010-07-09 23:19 UTC (permalink / raw)
  To: help-gnu-emacs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How do you set a key in all buffers except the minibuffer?
  2010-07-09 23:19 How do you set a key in all buffers except the minibuffer? Elena
@ 2010-07-10 14:24 ` Pascal J. Bourguignon
  0 siblings, 0 replies; 2+ messages in thread
From: Pascal J. Bourguignon @ 2010-07-10 14:24 UTC (permalink / raw)
  To: help-gnu-emacs

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/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-10 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-09 23:19 How do you set a key in all buffers except the minibuffer? Elena
2010-07-10 14:24 ` Pascal J. Bourguignon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).