From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cecil Westerhof Newsgroups: gmane.emacs.help Subject: Re: Disabling M-q Date: Tue, 21 May 2013 10:13:22 +0200 Organization: Decebal Computing Message-ID: <877giswy1p.fsf@Aspire.decebal.nl> References: <87txm4w97w.fsf@Aspire.decebal.nl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369144933 4155 80.91.229.3 (21 May 2013 14:02:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 May 2013 14:02:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 21 16:02:15 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uen8i-0002ie-GK for geh-help-gnu-emacs@m.gmane.org; Tue, 21 May 2013 16:02:08 +0200 Original-Received: from localhost ([::1]:55281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uen8i-0003ok-5M for geh-help-gnu-emacs@m.gmane.org; Tue, 21 May 2013 10:02:08 -0400 Original-Path: usenet.stanford.edu!goblin3!goblin.stu.neva.ru!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!feed.xsnews.nl!border-1.ams.xsnews.nl!feeder.xennanews.com!nf39.xennanews.com!not-for-mail Original-Newsgroups: gnu.emacs.help X-Homepage: http://www.decebal.nl/ User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:AZBISQyHc6jBNRlk7Yw1Z7Po/64= Original-X-Complaints-To: abuse@xennanews.com Original-Lines: 29 Original-NNTP-Posting-Host: 84.53.123.169 (84.53.123.169) Original-NNTP-Posting-Date: Tue, 21 May 2013 10:27:49 +0200 Original-Xref: usenet.stanford.edu gnu.emacs.help:198678 X-Mailman-Approved-At: Tue, 21 May 2013 09:59:08 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90948 Archived-At: Op donderdag 16 mei 2013 04:59 CEST schreef Yuri Khan: > On Wed, May 15, 2013 at 10:31 PM, Cecil Westerhof wrote: >> A friend asked how to disable M-q. My first thought was: >> (local-unset-key (kbd "\M-q")) >> or >> (local-set-key (kbd "M-q") nil) > > You need to unset the key in the map that sets it, or override it > with another function in a higher-priority map (as you do below with > the empty string, which is not a proper function). > >> But both did not work. I am now using: >> (local-set-key (kbd "M-q") "") >> >> and this works. Is this the best way, or is there a better way? > > You could bind the `ignore' function discussed recently on this > list. I have tried (I am not using it): (local-set-key (kbd "M-q") 'ignore) and it works. I send the improved solution to my friend. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof