From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Rogers Newsgroups: gmane.emacs.devel Subject: Spurious shell/comint "shadowed bindings" in C-h m Date: Sun, 30 Apr 2006 16:15:56 -0400 Message-ID: <17493.6908.813917.579798@rgrjr.dyndns.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1146428187 28675 80.91.229.2 (30 Apr 2006 20:16:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Apr 2006 20:16:27 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 30 22:16:19 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FaIL1-0001zT-Mk for ged-emacs-devel@m.gmane.org; Sun, 30 Apr 2006 22:16:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaIL1-0003Zl-5W for ged-emacs-devel@m.gmane.org; Sun, 30 Apr 2006 16:16:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaIKo-0003Xk-Gc for emacs-devel@gnu.org; Sun, 30 Apr 2006 16:16:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FaIKk-0003Ub-2F for emacs-devel@gnu.org; Sun, 30 Apr 2006 16:16:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaIKj-0003UY-S8 for emacs-devel@gnu.org; Sun, 30 Apr 2006 16:15:57 -0400 Original-Received: from [24.128.218.106] (helo=rgrjr.dyndns.org) by monty-python.gnu.org with smtp (Exim 4.52) id 1FaIOO-0004nB-Np for emacs-devel@gnu.org; Sun, 30 Apr 2006 16:19:44 -0400 Original-Received: (qmail 831 invoked by uid 500); 30 Apr 2006 20:15:56 -0000 Original-To: emacs-devel@gnu.org X-Mailer: VM 7.19 under Emacs 21.3.1 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:53688 Archived-At: After doing "M-x shell RET C-h m" [1], I noticed a curious thing in the *Help* buffer output. All but three C-c and ESC prefix commands appear twice, with the second appearance identical to the first except for having a "that binding is shadowed" note after it. Here is a sample: C-c M-r comint-previous-matching-input-from-input C-c M-s comint-next-matching-input-from-input C-c M-r comint-previous-matching-input-from-input (that binding is currently shadowed by another mode) C-c M-s comint-next-matching-input-from-input (that binding is currently shadowed by another mode) The exceptions are M-? (comint-dynamic-list-filename-completions), C-c C-b (shell-backward-command), and C-c C-f (shell-forward-command). All of these three commands are bound in shell-mode-map; if I do "C-x b foo RET M-x comint-mode RET C-h m", I see the plain comint-mode help, which does not have this problem. Examining shell-mode-map shows that the repeated commands do appear bound to the same keys twice via list sharing. You can see this for yourself by evaluating the following in *scratch*: (let ((print-circle t) (print-length nil) (standard-output (current-buffer))) (prin1 shell-mode-map)) [I won't quote the actual output, though; it's pretty messy.] Commenting-out the exceptional shell-mode prefix command bindings mentioned above (shell-backward-command, shell-forward-command, and comint-dynamic-list-filename-completions) in the shell-mode-map init makes all of the repeats disappear, so it looks like define-key is confusing describe_map by copying some inherited comint-mode-map bindings when it doesn't have to. But I'm not fluent enough with the C source to be willing/able to follow it further. HTH, -- Bob Rogers http://rgrjr.dyndns.org/ [1] All of this is with CVS HEAD as of 6 hours ago (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars), using "emacs -Q".