Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!THINK.COM!barmar From: barmar@THINK.COM Newsgroups: gnu.emacs.bug Subject: Inferior Lisp mode conflicts with Shell mode Message-ID: <8912040746.AA06448@leander.think.com> Date: 4 Dec 89 07:46:44 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 17 In GNU Emacs 18.52.25... Setting some key bindings in inferior-lisp-mode-map causes those same keys to be bound in shell-mode-map. It happens whenever you rebind a multi-key sequence whose default value is copied from Shell mode (e.g. c-c c-z). The cause is that inferior-lisp-mode-map is initialized to be (copy-alist shell-mode-map). This only copies two levels of the tree structure of the sparse keymap. The second-level alists, which are used for dispatching after a prefix key, are shared by both keymaps. When rebinding a key that is already bound in the keymap the shared cons is RPLACDed, affecting both keymaps. Instead of using copy-alist, it should be using copy-keymap, so that all levels of the keymap are copied. barmar Brought to you by Super Global Mega Corp .com