Skip to content

Instantly share code, notes, and snippets.

@xenodium
Last active September 27, 2023 02:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xenodium/81afee0069605691e52e2d14536ccaa0 to your computer and use it in GitHub Desktop.
Save xenodium/81afee0069605691e52e2d14536ccaa0 to your computer and use it in GitHub Desktop.
Eval commented out code
(defun ar/eval-uncommented-region (start end)
(interactive "r")
(let ((text (buffer-substring-no-properties start end)))
(with-temp-buffer
(insert text)
(emacs-lisp-mode)
(uncomment-region (point-min) (point-max))
(eval-buffer)
(message "Evaluated"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment