From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: How do you set a key in all buffers except the minibuffer? Date: Sat, 10 Jul 2010 16:24:42 +0200 Organization: Informatimago Message-ID: <87630ne7o5.fsf@kuiper.lan.informatimago.com> References: <3dfe699c-cfb0-4ac1-9cee-99137fcbbe5c@w10g2000vbn.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291851806 12654 80.91.229.12 (8 Dec 2010 23:43:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 23:43:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 00:43:22 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQTfN-0000yt-78 for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 00:43:21 +0100 Original-Received: from localhost ([127.0.0.1]:53604 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQTR5-0002Qf-KB for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 18:28:35 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-X-Trace: individual.net 8KZLn2mhls2GkJJAODpAigTkXxjEquttjhK3eS/sR/M1XWqC41 Cancel-Lock: sha1:ZTkwNmJjYThhMzJjZTgxMGI3MGI0OTdiYWZhMDFkNDljMGY1YTAwNg== sha1:0HHZmWdBBpL28ju3SgOH+4ecI7c= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.101 (Gnus v5.10.10) Emacs/23.2 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:179679 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: news.gmane.org gmane.emacs.help:76226 Archived-At: Elena 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/