Skip to content

Instantly share code, notes, and snippets.

@yonta
Last active May 17, 2016 04:39
Show Gist options
  • Save yonta/a34b306ec5edd3ce36141f64ea91c1e0 to your computer and use it in GitHub Desktop.
Save yonta/a34b306ec5edd3ce36141f64ea91c1e0 to your computer and use it in GitHub Desktop.
連番作るコマンドを作りたい
(setq my-repeat-num-command
"(loop for i from 1 to 10 do (insert (format \"%d\n\" i)))")
(defun my-insert-command () (insert my-repeat-num-command))
(defun eval-repeat-number ()
(progn
(add-hook 'eval-expression-minibuffer-setup-hook 'my-insert-command)
(eval-expression)
(remove-hook 'eval-expression-minibuffer-setup-hook 'my-insert-command)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment