From xemacs-m  Wed Jun 25 14:53:55 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id OAA17446
	for <xemacs-beta@xemacs.org>; Wed, 25 Jun 1997 14:53:54 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id VAA26287; Wed, 25 Jun 1997 21:53:54 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: [PATCH] teach-extended-commands-p change
References: <kiglo41mzd5.fsf@jagor.srce.hr> <QQcvdz08657.199706231054@crystal.WonderWorks.COM> <kigu3ipk27c.fsf@jagor.srce.hr> <m2g1u8yaiz.fsf@altair.xemacs.org> <kigafkg72ce.fsf@jagor.srce.hr> <87iuz3q8ue.fsf@bittersweet.inetarena.com>
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 25 Jun 1997 21:53:53 +0200
In-Reply-To: karlheg@inetarena.com's message of "25 Jun 1997 03:23:53 -0700"
Message-ID: <kig4tam8nn2.fsf@jagor.srce.hr>
Lines: 46
X-Mailer: Gnus v5.4.59/XEmacs 20.3(beta8) - "Copenhagen"

karlheg@inetarena.com (Karl M. Hegbloom) writes:

> I have (require 'completer) in site-start.el, and when I do {M-x
> find-file /tmp}, the minibuffer shows me:
> 
> Command `completer-minibuffer-exit' is bound to key: C-x C-f
> 
>  Well, you almost have it right...

Actually, this bug has nothing to do with completer; thanks for
reporting it.  The following patch fixes it (both with completer and
without it.)  Have I ever mentioned that lexical scoping sucks.  Well, 
it does!

Exactly how much work is it to add lexical scoping to Emacs Lisp
interpreter and compiler?   *ducking under the table*


--- lisp/prim/cmdloop.el.orig	Wed Jun 25 21:47:55 1997
+++ lisp/prim/cmdloop.el	Wed Jun 25 21:48:36 1997
@@ -288,7 +288,8 @@
 	   (interactive-p))
       ;; We need to fiddle with keys: remember the keys, run the
       ;; command, and show the keys (if any).
-      (let ((_execute_command_keys_ (where-is-internal this-command)))
+      (let ((_execute_command_keys_ (where-is-internal this-command))
+	    (_execute_command_name_ this-command)) ; the name can change
 	(command-execute this-command t)
 	(when (and _execute_command_keys_
 		   ;; Wait for a while, so the user can see a message
@@ -297,7 +298,7 @@
 	  (display-message
 	   'no-log
 	   (format "Command `%s' is bound to key%s: %s"
-		   this-command
+		   _execute_command_name_
 		   (if (cdr _execute_command_keys_) "s" "")
 		   (mapconcat 'key-description
 			      (sort _execute_command_keys_


-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
"Silence!" cries Freydag. "I did not call thee in for a consultation!" 
"They are my innards! I will not have them misread by a poseur!"

