From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: elisp mouse programming problems Date: Thu, 21 Aug 2003 11:44:18 -0600 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3F4504F2.60600@yahoo.com> References: <873cfwvcqp.fsf@emacswiki.org> <5wV0b.2124$pW3.242047@twister.austin.rr.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1061529023 25712 80.91.224.253 (22 Aug 2003 05:10:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 22 Aug 2003 05:10:23 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 22 07:10:21 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19q4Bo-0005bH-00 for ; Fri, 22 Aug 2003 07:10:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19pti5-0001Uq-4a for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Aug 2003 13:58:57 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!newsfeed.stueberl.de!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: 170.207.51.80 Original-X-Trace: news.uni-berlin.de 1061487852 5018030 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:116048 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:11969 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11969 David Vanderschel wrote: > "Alex Schroeder" wrote in message > news:873cfwvcqp.fsf@emacswiki.org... > >>"David Vanderschel" writes: >>> >>>Also, in testing such things, I am confused by the >>>fact that I cannot seem to redefine the bindings of a >>>mode-map by simply setting it to nil and rerunning the >>>(modified) code which builds the mode-map. ... >> >>A keymap is a list that starts with the symbol `keymap'. >>Only the cdr of that list is used by Emacs when >>looking up keys. When you just change the value of a >>mode-map, the old cdr will still be used. (Maybe you >>need to draw box diagrams to see this.) > > When I said "setting it to nil" I was talking about > the pointer to the list (Hube-mode-map, in my case). > Thus regenerating that list should also generate a new > cdr. If emacs still has a pointer to the old cdr, I > need to know how to get emacs to give it up. What > makes it adopt the cdr in the first place? > > I think I have now figured this one out. Changing the > mode-map itself is not sufficient. You must again > invoke (use-local-map whatever-mode-map). That is not true. As Alex explained, when you modify the keymap, you are modifying a part of its list structure that is shared by the variable and the mode. > (I had > erroneously believed that what emacs remembered was my > variable which held the pointer to the mode-map and > that it would use the new map when I changed it. But > there is no quote on the argument, so it cannot know. > I now recall running into another manifestation of > this. emacs will readily show you the current > mode-map, but it is difficult to discover the 'name' > of that map - ie., the variable used to create it.) That is true, but it's not relevant. -- Kevin Rodgers