[slime-devel] SET-KEYMAP-PARENTS incorrectly implemented

Ariel Badichi abadichi at bezeqint.net
Tue Jan 9 20:50:48 UTC 2007


Hello.

The current implementation of SET-KEYMAP-PARENTS for GNU Emacs is
problematic (e.g., cc-mode will error): a keymap is represented as a
list with the first element being the symbol KEYMAP.  The function as
currently implemented will treat a keymap as any other list.  Here's a
quick fix:

(or (fboundp 'set-keymap-parents)
    (defun set-keymap-parents (m parents)
      (set-keymap-parent
       m
       (cond
         ((or (keymapp parents) (not (consp parents))) parents) ; note keymapp
         ((not (cdr parents)) (car parents))
         (t (let ((m (copy-keymap (pop parents))))
              (set-keymap-parents m parents)
              m))))))




More information about the slime-devel mailing list