* Cyrus Harmon [2012-05-06 16:24] writes:
Since I haven't done this before, and I'd like that keybinding locally, is this the proper way to do that in one's .emacs:
(add-hook 'slime-mode-hook (lambda () (pushnew (list "\C-c\C-f" 'slime-pprint-eval-region) slime-editing-keys :test 'equalp) (slime-init-keymaps)))
thanks again,
Yes, that should work. So should this:
(add-hook 'slime-load-hook 'my-slime-load-hook)
(defun my-slime-load-hook () (define-key slime-mode-map (kbd "C-c C-f") 'slime-pprint-eval-region))
slime-load-hook is run at the end of slime.el, i.e. only once not for every time when slime-mode is turned on.
Helmut