all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.