Closed L42y closed 11 years ago
Make sure you use the mode's hook, not the mode toggle command. This one works for me, just adding "-hook
":
(add-hook 'skewer-css-mode-hook
(lambda ()
(add-hook 'after-save-hook 'skewer-css-eval-buffer nil t)))
I didn't realize it until you had me investigate: define-minor-mode
will not actually declare the hook as a variable. It only interns the symbol. add-hook
creates the variable binding automatically if not already bound. So you won't see skewer-css-mode-hook
as a variable until you've added a hook function. Maybe that's why you didn't see it.
Thanks for opening this issue! I'll wait to close this until you confirm that this works for you.
Thank you so much, it works.
Seems my solution doesn't work: