Reputation: 341
Is there a way to bind C-l in SLIME to clear the screen?
Thank you!
Upvotes: 4
Views: 1600
Reputation: 362
@nosefouratyou the problem with the add-hook was that you need to add it to the 'slime-repl-mode-hook instead of 'slime-mode-hook:
(defun my-slime-keybindings ()
"For use in `slime-mode-hook' and 'slime-repl-mode-hook."
(local-set-key (kbd "C-l") 'slime-repl-clear-buffer))
(add-hook 'slime-mode-hook #'my-slime-keybindings)
(add-hook 'slime-repl-mode-hook #'my-slime-keybindings)
Upvotes: 1
Reputation: 6303
What you probably want is slime-repl-clear-buffer
, which is by default bound to C-c M-o
. You can bind the function on the Slime REPL buffer in the normal way, for example
(local-set-key [(control l)] 'slime-repl-clear-buffer)
Upvotes: 4