SiteMap / AllPages / Out

EvalInComments

If you code lisp for TheOneAndOnly editor, you might have debugging code in your lisp files. The debugging code is commented out, of course. While working on a problem, however, you might want to evaluate such code again and again. You will spend your time uncommenting the region, hitting C-x C-e, and commenting the stuff again when you are done.

This is where eval-last-sexp-in-comments comes in. Just redefine C-x C-e, such that `eval-last-sexp-in-comments' is called instead of `eval-last-sexp'. `eval-last-sexp-in-comments' attempts to evaluate the last sexp using `eval-last-sexp'. If that raises an error, `eval-last-sexp-in-comments' will try to uncomment the last sexp in a temporary buffer and evaluate `eval-last-sexp' there.


SiteMap / AllPages / Out / kensanata@gmail.com / Last change: 2001-04-01