1 note &
Calling code
C-c C-y (slime-call-defun):
When the point is inside a defun and C-c C-y is pressed,
(I’ll use [] as an indication where the cursor is)
(defun foo () nil[])
then “(foo [])” will be inserted into the REPL, so that you can write additional arguments and run it.
If FOO was in a different package than the package of the REPL, (package:foo ) or (package::foo ) will be inserted.
This feature is very useful for testing a function you just wrote.
That works not only for defun, but also for defgeneric, defmethod, defmacro, and define-compiler-macro in the same fashion as for defun.
For defvar, defparameter, defconstant: “[] *foo*” will be inserted (the cursor is poistioned before the symbol so that you can easily wrap it into a function call).
For defclass: (make-instance ‘class-name )
Inserting calls to frames in the debugger
C-y in SLDB on a frame will insert a call to that frame into the REPL, e.g.,
(/ 0) =>
…
1: (CCL::INTEGER-/-INTEGER 1 0)
…
C-y will insert (CCL::INTEGER-/-INTEGER 1 0)