Rewrite `scratch-message-toggle-activate' like `define-minor-mode'