Make my version of beginning-of-defun-function activate only when
actually running the beginning-of-defun command.

Signed-off-by: Bao Haojun <baohaojun@gmail.com>