defun prog-common-function (common mode-hook func)

replace general-minor-mode() with prog-common-function()