From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.help Subject: Re: How to bind a key locally to a buffer (not mode!) Date: Mon, 20 Oct 2014 13:16:21 +0100 Message-ID: References: <87iojfok99.fsf@wmi.amu.edu.pl> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1413807407 1898 80.91.229.3 (20 Oct 2014 12:16:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Oct 2014 12:16:47 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 20 14:16:41 2014 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 1XgBtA-0000gK-Py for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Oct 2014 14:16:40 +0200 Original-Received: from localhost ([::1]:44393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgBtA-0006JL-BG for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Oct 2014 08:16:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgBss-0006Hu-TB for help-gnu-emacs@gnu.org; Mon, 20 Oct 2014 08:16:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgBss-0007Un-6Z for help-gnu-emacs@gnu.org; Mon, 20 Oct 2014 08:16:22 -0400 Original-Received: from mail-oi0-x230.google.com ([2607:f8b0:4003:c06::230]:53883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgBss-0007Uf-1w for help-gnu-emacs@gnu.org; Mon, 20 Oct 2014 08:16:22 -0400 Original-Received: by mail-oi0-f48.google.com with SMTP id g201so3499241oib.7 for ; Mon, 20 Oct 2014 05:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=ygPEuBwu63NyVDDYV3pCIoalm5+2DyaKz1edcqSlssY=; b=ZWORZJbrwnJP4PYHSH1cw2mTU0WPyNfQ4PwR7X9k8fG3X187+ufgTcZDjQxCgf0qV/ SvLFjih5edZleYF4yhMM9qp0lKt8JpNrsDyoqAo06MffO8XWk4iUWgzAZXTbvn3u5ZZq I+/7p9qqRCGfuoko1c704VAWCgO78i4ugpLEkv1Z+D/nAUCH7nHJ2wWjvvwWxZiAiTxp Hj4Lb/UVlaO6/DY1cRSSPkMCEL56/zrUN/KS4lVjyvTX5SGG8yclJMF38krdt3DYdVab MnvmIboHODxQcLd0lxgk8QTqbeRu76sSUjBagZQIn5Bwl7bkkhxtGxSB74frSzv+WDsI fORQ== X-Received: by 10.202.104.15 with SMTP id d15mr15125oic.123.1413807381517; Mon, 20 Oct 2014 05:16:21 -0700 (PDT) Original-Received: by 10.76.1.137 with HTTP; Mon, 20 Oct 2014 05:16:21 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: m5pjR5g41zaC7n0WojPHpK_hMdc X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::230 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:100513 Archived-At: Here it is: (use-local-map (copy-keymap (current-local-map))) (local-set-key "x" #'some-function) This will bind x to some-function only on the current buffer.