From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Disabling M-q Date: Thu, 16 May 2013 09:59:26 +0700 Message-ID: References: <87txm4w97w.fsf@Aspire.decebal.nl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1368673182 27300 80.91.229.3 (16 May 2013 02:59:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 May 2013 02:59:42 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Cecil Westerhof Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 16 04:59:40 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 1UcoPs-00034G-Pf for geh-help-gnu-emacs@m.gmane.org; Thu, 16 May 2013 04:59:40 +0200 Original-Received: from localhost ([::1]:54551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcoPr-0002xR-Tl for geh-help-gnu-emacs@m.gmane.org; Wed, 15 May 2013 22:59:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcoPh-0002x9-Mc for help-gnu-emacs@gnu.org; Wed, 15 May 2013 22:59:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcoPg-0004cr-GQ for help-gnu-emacs@gnu.org; Wed, 15 May 2013 22:59:29 -0400 Original-Received: from mail-la0-x22b.google.com ([2a00:1450:4010:c03::22b]:36467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcoPg-0004ck-9R for help-gnu-emacs@gnu.org; Wed, 15 May 2013 22:59:28 -0400 Original-Received: by mail-la0-f43.google.com with SMTP id ez20so1288140lab.2 for ; Wed, 15 May 2013 19:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Bb7hFkpkxjHjhNSs+DOHUslThJRjtQW/g8j90MZN75o=; b=PLUyvrWbgIRiN8PBqS3cII8O77nrLQMXJlgEaH5lzzXok4T/aFlTJNqtPQCXse2FtV 599iizoEOz6C6JYmODcJ0w4PG5fW4XjoFcAymy9JXhWGXEGCpyNDa41CknSKYfIORMb3 6UXYZdn7YRk+SastTgBbkHuWHyeUtNARq+Z93/TDkcbKsFhXt/DwuVuZGds2q+pMbmCo MB3P7e16DfnCXBg1xjpwhfm5LYchzCNDesqyPxFguteOgEGdeJeSBhVC6Ad2DkDJvGyp /UgwTKfBA5D0KdEr7l389CI0w0MjO8jlAU7q0OXqlAsOg0jYTUBXvD98eoFy97mZQvwX C1KQ== X-Received: by 10.152.22.168 with SMTP id e8mr19237952laf.20.1368673166964; Wed, 15 May 2013 19:59:26 -0700 (PDT) Original-Received: by 10.114.182.177 with HTTP; Wed, 15 May 2013 19:59:26 -0700 (PDT) In-Reply-To: <87txm4w97w.fsf@Aspire.decebal.nl> X-Google-Sender-Auth: BLV_3ot6hBq_WWTVhbHzoTnxw-w X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22b 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:90829 Archived-At: 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.