Skip to content

Instantly share code, notes, and snippets.

@epost
Last active August 29, 2015 14:02
Show Gist options
  • Save epost/6ed314598024864dbaeb to your computer and use it in GitHub Desktop.
Save epost/6ed314598024864dbaeb to your computer and use it in GitHub Desktop.
run shell command on saving PureScript file
(defun do-something ()
(interactive) ; not sure if necessary
(shell-command "ls")
)
(defun my-purescript-mode-hook ()
(message "in purescript-mode-hook...")
(add-hook 'write-contents-hooks 'do-something nil t)
)
(add-hook 'purescript-mode-hook 'my-purescript-mode-hook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment