piet@cs.ruu.nl (Piet van Oostrum) (02/22/91)
I started using mail-abbrevs that was posted recently and soon got a
problem when I used both Gnews and mail in the same session. The symptoms
were that my mail-mode got some keybindings from e-reply-mode.
I tracked it down to mail-abbrev making a non-sparse copy of the keymap
that is used by mail-mode and e-reply-mode trying to make a copy of that
keymap for private use. However, Gnews uses a private keymap-copy routine
that is incorrect: if the keymap is non-sparse it doesn't copy it, but
shares the keymap. I think this is because it was written for a version of
emacs that didn't have vector keymaps.
Anyway, the solution is to get rid of the private keymap copying routine in
Gnews:
*** prims.el.~1~ Fri Sep 15 15:25:56 1989
--- prims.el Fri Feb 22 14:45:59 1991
***************
*** 144,159 ****
(put 'gnews-replace 'lisp-indent-hook 2)
! (defun gnews-copy-keymap (keymap)
! ;; unneeded for v18.51 and up...
! "Copy a sparse KEYMAP recursively, so that no subkey in the new map
! can have a side effect on the original."
! (if (atom keymap)
! keymap
! (cons (if (consp (car keymap))
! (gnews-copy-keymap (car keymap))
! (car keymap))
! (gnews-copy-keymap (cdr keymap)))))
(defun gnews-subst-command-keys (s)
"Replace command names in string S with extra compact key descriptions;
--- 144,150 ----
(put 'gnews-replace 'lisp-indent-hook 2)
! (fset 'gnews-copy-keymap 'copy-keymap)
(defun gnews-subst-command-keys (s)
"Replace command names in string S with extra compact key descriptions;
--
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31 30 531806 Uucp: uunet!mcsun!ruuinf!piet
Telefax: +31 30 513791 Internet: piet@cs.ruu.nl (*`Pete')