Skip to content

Instantly share code, notes, and snippets.

@PuercoPop
Last active August 29, 2015 14:10
Show Gist options
  • Save PuercoPop/33d7207aea6d1db329fc to your computer and use it in GitHub Desktop.
Save PuercoPop/33d7207aea6d1db329fc to your computer and use it in GitHub Desktop.
(with-current-buffer "grovel.lisp"
(while (not (eq (point) (point-max)))
(when (search-forward "/**" (line-end-position) t)
(backward-char 3)
(delete-region (point) (line-end-position)))
(forward-line)))
(with-current-buffer "grovel.lisp"
(while (not (eq (point) (point-max)))
(when (looking-at "#")
(delete-char 1)
(insert "(")
(search-forward " " (line-end-position) t)
(insert "\"")
(search-forward " " (line-end-position) t)
(backward-char 1)
(insert "\"")
(just-one-space)
(insert "\"")
(search-forward " " (line-end-position) t)
(backward-char 1)
(insert "\"")
(insert ")")
(delete-region (point) (line-end-position))
(goto-char (line-end-position)))
(delete-horizontal-space)
(forward-line)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment