Commits

Anonymous committed 065dbd8

using new hook names

Comments (0)

Files changed (1)

             callback.interaction = ''
 
     def add_hook(self, name, callback, hook):
+        mapping = {'before_save': 'before-save-hook',
+                   'after_save': 'after-save-hook',
+                   'exit': 'kill-emacs-hook'}
         globals()[name] = callback
-        lisp.add_hook(lisp[hook], lisp[_lisp_name(name)])
+        lisp.add_hook(lisp[mapping[hook]], lisp[_lisp_name(name)])
 
     @property
     @utils.cacheit