From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: 2-key prefix and Invalid Prefix keys in sequence Date: Sun, 06 Mar 2005 08:22:24 -0900 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <112mf2gnkuip046@news.supernews.com> References: <112iadoa88vv7bc@news.supernews.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1110129639 5351 80.91.229.2 (6 Mar 2005 17:20:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Mar 2005 17:20:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 06 18:20:38 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D7zQE-0007Hu-2J for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Mar 2005 18:20:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D7zjp-0001WL-ED for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Mar 2005 12:40:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!sn-xit-03!sn-xit-12!sn-xit-01!sn-post-02!sn-post-01!supernews.com!news.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en In-Reply-To: Original-X-Complaints-To: abuse@supernews.com Original-Lines: 44 Original-Xref: shelby.stanford.edu gnu.emacs.help:129014 Original-To: help-gnu-emacs@gnu.org 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 X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.help:24560 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24560 John Paul Wallington wrote: > Tim Johnson wrote: >>I'd like to map out a series of 3-key commands, with >>control-c control-; as the prefix. >>Initially I am attempting the following: >>(global-set-key [(control \c\;) (b)] 'isearch-forward) >>;; evaluation gives me the "Invalid Prefix Keys in sequence" >>;; error message > Hi John: > (defvar foo-map (make-sparse-keymap) > "Foo keymap.") > (define-prefix-command 'foo-map) > (global-set-key [(control c) (control \;)] 'foo-map) > (define-key foo-map "b" 'isearch-forward) Great! Just what I was looking for! FYI I did find some examples in keydefs.el, but haven't had time to try them. Your example is very good and easy to implement. Thanks! > [FWIW, C-; may not be a good choice because many terminals won't pass > it to Emacs -- on my main desktop machine at home the Linux console > ignores C-; and the xterm program passes on a bare semi-colon] Good point. My linux machine (RH 9.0) with xemacs handles both C-; and C-'. On this windows XP machine emacs and xemacs process this code correctly. But the whole idea of haveing a keymap bound to a prefix key (in my mind), is that you can change the mapping to suit the OS (or the keyboard) by altering code in just once place.... > The section on Keymaps in the elisp info manual talks about defining > Prefix Keymaps. Perhaps the emacs info manual should too. I agree. I find the appropos regex service wonderful for looking up documentation. I haven't found a similar regex feature for 'info. Is there one? Best Regards tim > >