25 Jul 2016
ELisp refactoring tools
Started working on tools to help me refactor Elisp code. Here the first main function:
(defun create-new-function (function-name) "Creates a new function definition, given a selection. Removes the selection and replaces it with a call to the newly created function" (interactive "sFunction name: ") (let ((code (get-region))) (progn (save-excursion (progn (move-to-empty-point) (insert-new-function-definition function-name code))) (insert "(" function-name " )"))))
Comments welcome.