When editing Lisp code, occasionally it\'s useful to entirely comment out a top-level definition, like this:
;(defun some-fn-which-is-broken (x)
; ...)
You can use C-M-SPC M-;
to mark the S-expression (C-M-SPC
for mark-sexp
) and then comment it (M-;
for comment-dwim
).
In paredit 23, just typing ;
won't push anything it doesn't have to off the line. So it will do the right thing for your second example. And if you wanted to comment out z
instead of y
it would push only the closing delimiter to another line.