diff options
author | Tom Willemsen | 2013-01-04 00:06:15 +0100 |
---|---|---|
committer | Tom Willemsen | 2013-01-04 00:06:15 +0100 |
commit | 12fbc83cc7637548bcefaed1d0b7aea81064c67f (patch) | |
tree | 7cf66d3804a87e9154479d6d00f72d17002a14bf /.emacs.d/snippets/python-mode/form_valid | |
parent | ef288f8ad6c5fe22161fd55d69792e5d0f340b01 (diff) | |
parent | 1be69078ad8c1af62de79b80345a72d2b8490b04 (diff) | |
download | dotfiles-12fbc83cc7637548bcefaed1d0b7aea81064c67f.tar.gz dotfiles-12fbc83cc7637548bcefaed1d0b7aea81064c67f.zip |
Merge remote-tracking branch 'origin/master' into phoenix
Conflicts:
.emacs.d/init.el
Diffstat (limited to '.emacs.d/snippets/python-mode/form_valid')
-rw-r--r-- | .emacs.d/snippets/python-mode/form_valid | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.emacs.d/snippets/python-mode/form_valid b/.emacs.d/snippets/python-mode/form_valid new file mode 100644 index 0000000..c5a7e58 --- /dev/null +++ b/.emacs.d/snippets/python-mode/form_valid @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: Record form +# key: defm +# -- +@record_activity(model=${1:`(progn (re-search-backward "^[ \t]*model = \\([a-zA-Z_].*\\)$") (match-string 1))`}) +def form_valid(self, form): + '''Make sure any changes to the $1 model get logged.''' + return super(${2:`(progn (re-search-backward "^[ \t]*class \\(.+\\)(") (match-string 1)))`}, self).form_valid(form)
\ No newline at end of file |