From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Re: Creating submenu Date: Wed, 2 Dec 2009 10:49:42 -0800 (PST) Message-ID: <35484.130.55.118.19.1259779782.squirrel@webmail.lanl.gov> References: <4B166573.4030609@mousecar.com> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1259788851 13868 80.91.229.12 (2 Dec 2009 21:20:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Dec 2009 21:20:51 +0000 (UTC) Cc: emacs-bug To: gebser@mousecar.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 02 22:20:43 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NFwcq-00036O-E2 for ged-emacs-devel@m.gmane.org; Wed, 02 Dec 2009 22:20:40 +0100 Original-Received: from localhost ([127.0.0.1]:54852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFwcp-0008KN-Io for ged-emacs-devel@m.gmane.org; Wed, 02 Dec 2009 16:20:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFuGu-0004iR-9g for emacs-devel@gnu.org; Wed, 02 Dec 2009 13:49:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFuGp-0004bA-4n for emacs-devel@gnu.org; Wed, 02 Dec 2009 13:49:51 -0500 Original-Received: from [199.232.76.173] (port=43336 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFuGo-0004ao-V9 for emacs-devel@gnu.org; Wed, 02 Dec 2009 13:49:46 -0500 Original-Received: from proofpoint1.lanl.gov ([204.121.3.25]:59436) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NFuGo-0007a6-Ex for emacs-devel@gnu.org; Wed, 02 Dec 2009 13:49:46 -0500 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by proofpoint1.lanl.gov (8.14.3/8.14.3) with ESMTP id nB2Inhkq013255; Wed, 2 Dec 2009 11:49:43 -0700 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 5F9DF183D96; Wed, 2 Dec 2009 11:49:43 -0700 (MST) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 4C817183D94; Wed, 2 Dec 2009 11:49:43 -0700 (MST) Original-Received: by webmail1.lanl.gov (Postfix, from userid 48) id 48E181DE03B7; Wed, 2 Dec 2009 11:49:42 -0700 (MST) Original-Received: from 130.55.118.19 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Wed, 2 Dec 2009 10:49:42 -0800 (PST) In-Reply-To: <4B166573.4030609@mousecar.com> User-Agent: SquirrelMail/1.4.8-5.7.lanl7 X-Priority: 3 (Normal) Importance: Normal X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.8161:2.4.5, 1.2.40, 4.0.166 definitions=2009-12-02_15:2009-11-30, 2009-12-02, 2009-12-02 signatures=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118153 Archived-At: > ;Make ^C-cg a key prefix for chars menu > (global-set-key [?\C-c ?g] ctl-x-map) You're reusing the keymap that C-x is normally bound to, so now C-c g is an alias for C-x in every respect. Don't do that! Make a new keymap: (defvar chars-map (make-sparse-keymap) "Keymap for inserting special characters.") (global-set-key [?\C-c ?g] chars-map) You can omit "sparse-" if you're planning to bind lots of ASCII characters (like, say, C-c g a, C-c g 0, etc.). > (fset 'list-all-chars [?\C-x ?8 f1]) You can do this more idomatically with (defun list-all-chars () "Describe the C-x 8 keybindings." (interactive) (describe-bindings "\C-x8")) (`describe-bindings' is what implements `f1' after a prefix key.) But there might be a better way: one that used the binding of C-x 8 directly so that it would work even if the user had moved that binding elsewhere. I don't know what it would be, though. Hope this helps, Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.