From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: prefix key with its own map as binding? Date: 25 Mar 2007 20:55:58 GMT Message-ID: NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1174858705 17960 80.91.229.12 (25 Mar 2007 21:38:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Mar 2007 21:38:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 25 23:38:19 2007 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 1HVaPr-0002Ik-Bv for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Mar 2007 23:38:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HVaS1-0003a3-LP for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Mar 2007 16:40:33 -0500 Original-Path: shelby.stanford.edu!newshub.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-X-Trace: individual.net i51leJvyDkQSawLQbFK7aQxySg2DN0J6wRJF9PLkKymG+DWc8p Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/0.9.8.1 (Linux) Original-Xref: shelby.stanford.edu gnu.emacs.help:146580 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:42184 Archived-At: is there a "conventional" way of binding a prefix key to the very same keymap it is in? basically thus: (defvar some-mode-map (make-keymap)) (suppress-keymap some-mode-map) (define-key some-mode-map "a" 'some-function) (define-key some-mode-map "b" 'some-other-function) (define-key some-mode-map "c" 'yet-some-other-function) (define-key some-mode-map ...) (define-key some-mode-map ":" 'some-mode-map) (fset 'some-mode-map some-mode-map) the idea is that every function that is bound to a key in some-mode-map can be called either by pressing its command key, or by pressing `:' followed by its command key. the function called can then use this-command-keys to determine how it was called, and determine its behaviour accordingly. alternatively, if all this sounds like A Bad Idea(TM), is there another way to get this (or similar) behaviour? (using a prefix argument is not really an option, btw.) TIA -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)