There seems to be a bug in
clojure-mode (mentioned here) because it does things in a mode hook (for
paredit-mode) but doesn't undo them when the mode is turned off.
I understand that
add-hook can register a function to run when a mode is turned on, but is there a way to run a hook when a mode is turned off?
Here's a github link see the
clojure-mode code that adds the hook.