From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.help Subject: Re: Looking up and CALLING a key binding Date: Tue, 6 Jan 2009 16:20:04 +0100 Message-ID: References: <21291485.post@talk.nabble.com> <5e307aad-4ae3-4527-8fef-cee66fd9c2aa@o40g2000prn.googlegroups.com> <21312291.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1231255283 3815 80.91.229.12 (6 Jan 2009 15:21:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Jan 2009 15:21:23 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: TheLonelyStar Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 06 16:22:34 2009 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.50) id 1LKDlJ-0008SK-FH for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Jan 2009 16:22:33 +0100 Original-Received: from localhost ([127.0.0.1]:45394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKDk3-0004bO-E5 for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Jan 2009 10:21:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKDiy-0004GL-7h for help-gnu-emacs@gnu.org; Tue, 06 Jan 2009 10:20:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKDiw-0004FX-Tt for Help-gnu-emacs@gnu.org; Tue, 06 Jan 2009 10:20:07 -0500 Original-Received: from [199.232.76.173] (port=56341 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKDiw-0004FK-LJ for Help-gnu-emacs@gnu.org; Tue, 06 Jan 2009 10:20:06 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.153]:52319) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LKDiw-0007tV-1b for Help-gnu-emacs@gnu.org; Tue, 06 Jan 2009 10:20:06 -0500 Original-Received: by fg-out-1718.google.com with SMTP id l26so2995811fgb.30 for ; Tue, 06 Jan 2009 07:20:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=0dpgThzDccZQFRUL9RB+OT/w5zTyS2C2PVLegyxZo1Y=; b=xZZUYl1z/JMWMuHQ0n5vuncbKKr06lXRcOt8pE8A89v1F8k2unueRwbqBB0iKiy7XO 6/vilr8m11plpkMXbeAnTLQOfVZlhXgsaBR+1i8XxgL+5Qzmk1HPJnN4GrEnaBSdrlNS x/0zowgGaCnadfMuhLAqQZl5H8ogoYPs2xPRg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=YdOkrs9tQNw9gKdqNU16ieZTkmZ3dUx7U5TpnZ/YcQKgdyQxlPNNVzVpP2lZivZsK3 9RfUes7GASPCrvdZZ2amm4IKb2fEn2TCSLhPlKEAs8KsSaB9UkgU+ZTSnGLizpQqCD0D Q5n+7dSOxbRKii5PrK8HGdhfH2czKFImZXUd8= Original-Received: by 10.86.74.4 with SMTP id w4mr12944725fga.2.1231255204586; Tue, 06 Jan 2009 07:20:04 -0800 (PST) Original-Received: by 10.86.35.9 with HTTP; Tue, 6 Jan 2009 07:20:04 -0800 (PST) In-Reply-To: <21312291.post@talk.nabble.com> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:61112 Archived-At: On Tue, Jan 6, 2009 at 4:14 PM, TheLonelyStar wrote: > > Hi, > > I need this for the following two things: > > 1. I want to bind a key (the tab key) to a special function which can fail. > If the function fails, I want to call the original binding of the key > (which is differerent depending on which mode I am in). This is what tabkey2 mode (and its predecessor) tries to do. Please see EmacsWiki. > 2. I want to bind a key to the insertion of a little code snippet. > i.E. { -> to > { > | > } > But since in many modes the "{" and "}" keys are bound to some special > function, I want to call these keybindings for the insertions of the "{" and > "}". You can use a minor mode for this. Minor mode key bindings comes before major mode.