[slime-devel] slime-pprint-eval-region

Helmut Eller heller at common-lisp.net
Sun May 6 16:37:13 UTC 2012


* 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





More information about the slime-devel mailing list