Hello,
Jeffrey Cunningham jeffrey@cunningham.net writes:
On Tue Jan 23, 2007 at 02:59:54PM +0200, Ariel Badichi wrote:
I think it's correct, and this seems to have fixed it:
(defvar slime-scratch-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parents map (list slime-mode-map lisp-mode-map)) map))
I will update the documentation accordingly.
Not just yet :)
I realized, while taking a shower, that there's something fishy there; I didn't know too much about keymaps, so I thought slime-mode-map should already have lisp-mode-map as its parent, and so wondered why this was needed. I read bits of the manual and learned about global keymaps, minor mode keymaps, and local keymaps. The conclusion I ended up with is this: the parent keymap shouldn't have been slime-mode-map, but lisp-mode-map, and only that. This is because slime-mode-map is already active because of the Slime minor mode, yet lisp-mode-map is a local map. I tested this by evaluating (current-local-map) in the SLIME scratch buffer and in an ordinary Lisp Slime buffer, and the results seem to confirm this. (Showers do that, y'know.)
So a better fix is:
(defvar slime-scratch-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map lisp-mode-map) map))
-Jeff
Ariel