+ (if (looking-at "(defvar")
+ (funcall do-string
+ ;; replace `defvar' with `defparameter'
+ (concat "(defparameter "
+ (buffer-substring-no-properties (+ (point) 7) end)
+ "\n"))
+ (funcall do-region (point) end)))))
+
+(defun lisp-eval-defun (&optional and-go)
+ "Send the current defun to the inferior Lisp process.
+DEFVAR forms reset the variables to the init values.
+Prefix argument means switch to the Lisp buffer afterwards."
+ (interactive "P")
+ (lisp-do-defun 'lisp-eval-string 'lisp-eval-region)