unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Spurious shell/comint "shadowed bindings" in C-h m
@ 2006-04-30 20:15 Bob Rogers
  2006-05-01  4:20 ` Richard Stallman
  2006-05-08 22:29 ` Bug to fix! Richard Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Bob Rogers @ 2006-04-30 20:15 UTC (permalink / raw)


   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".

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-05-10  3:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-30 20:15 Spurious shell/comint "shadowed bindings" in C-h m Bob Rogers
2006-05-01  4:20 ` Richard Stallman
2006-05-08 22:29 ` Bug to fix! Richard Stallman
2006-05-09 14:31   ` Chong Yidong
2006-05-09 18:43     ` Stefan Monnier
2006-05-10  3:20     ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).